From patchwork Tue Apr 24 15:51:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 134127 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2402084lji; Tue, 24 Apr 2018 08:52:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx48+IwdkSkkXeTMl/4ruc1y1TZ5Hldu9ldmgYbuzCMH50eJ9x7w8Q76zIhGAhYCKy8rFmH3i X-Received: by 2002:a17:902:5a88:: with SMTP id r8-v6mr25720318pli.78.1524585140387; Tue, 24 Apr 2018 08:52:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524585140; cv=none; d=google.com; s=arc-20160816; b=fuVFwudLhTJABDE7LFZZewBdqqLlytTxYGoVC3tF1f2idjTsy1T3HNBzskUE4M3tg+ ns+TZa2OZO8akmNExvqwcky/ydJKv6YaUxMUhEK4CZLb/wJ1WJh/eFawyBkxHMEh7/nW ZPupspQXmAiULGHrx4oLdIr/+kgnJjvRvV1s/GeLauy/sx5onq3ckCRnFw4XfnI1v2Cm Vk4dbLqklLCKed7mpKcWXd8PgFFbHEmqqzl5WCEsFiU413Ks7fLt2xY0LxpzcDUhhRZq D6Ul8x2fm0FGKY7voNQK6NoaimF5QfPp4b3W4WI6P6ASusXqoSDsKrO16pTQ6VAnNT4P wT9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=7IsZS78+cKGJkizrwmR6jlYB92tWyduRADredG6M9Ng=; b=pTQCDzyIlA5UYvJHmGyzp5oYN8aLZTqVlauMmabPqIeOOtomT0ApRE936zHTM4+2ST loks+6tIuSri4NrsYy5/TrGhWKs7Sb5wn7P4S8euMAVLzt00HGs0F8DRfoVlcMHcJlyf TSNvLjKFaaPVS81zlysAxEnyyI2upRSZaJngNNHUU7lZfHSyn+GEcW+mNyvgv1PKXpGh wLcbrU3A5Re44PUtKBC1dgkio4E8JQ9rA9zeGPUVXAzv4Bl9/KxpAW/LNWplD5oa+FsC 1JrI/VvuduGfhgg1yXC9MueO0u6LafzkTNjeHF3RWB/EC4TfRdNAwutCk20uCy5L2d30 vmUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=ri/9LGAp; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j12si13185110pfh.3.2018.04.24.08.52.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Apr 2018 08:52:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=ri/9LGAp; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 418B86E41A; Tue, 24 Apr 2018 15:51:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id D6B316E419 for ; Tue, 24 Apr 2018 15:51:42 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3OFpInY003428; Tue, 24 Apr 2018 10:51:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524585078; bh=xi65xTw9H6Csi5EvZgoGXRSI3LjNpL4o7xltnze4uek=; h=From:To:CC:Subject:Date; b=ri/9LGApvH8j5/N87uD/8hwoSmEppnfDPEcUkFURvGAMfNenMwzLl7tOtidEw8chX cOl4fDimgNQRKckZ+Z3zPF/wkJkxwnL8zwAUa39TS1OZBYdkAO0LAXTGklPq16gS0D BK9nahWQovETWW8G3H2motqGa2d5Qk3d6aHvaKkw= Received: from DFLE111.ent.ti.com (dfle111.ent.ti.com [10.64.6.32]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3OFpIJ5022451; Tue, 24 Apr 2018 10:51:18 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 24 Apr 2018 10:51:16 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 24 Apr 2018 10:51:16 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3OFpDwB022588; Tue, 24 Apr 2018 10:51:14 -0500 From: Jyri Sarha To: Subject: [PATCH v3 0/2] drm/panel: Add device link in drm_panel_attach() Date: Tue, 24 Apr 2018 18:51:06 +0300 Message-ID: X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, linux@armlinux.org.uk, Jyri Sarha , tomi.valkeinen@ti.com, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, peda@axentia.se Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" I dropped this work at the end of the previous merge window, since I had more urgent thing to do. It looks like topic has been raised again[1], so I'll respin this now. The second version of these patches can be found here: https://lists.freedesktop.org/archives/dri-devel/2018-February/167628.html Changes since v2: - Rebased both patches on top of the latest drm-next - "drm/panel: Remove drm_panel_detach() calls from all panel drives" - Updated the kernel doc for drm_panel_detach() - "drm/panel: Add device_link from panel device to drm device" - Fixed the logically wrong second paragraph in the commit message according to Eric Anholt's suggestion and added his reviewed by The first patch could be squashed to second, but kept is separate since I think it is correct even without the second patch. With these patches unbinding a panel driver in use does not cause nasty backtraces and corrupted drm core structures, but instead it cleanly unbinds the drm master device at the same time. The only down side (currently[1]) is that the drm device does not reprobe if the panel driver is bound again, but everything should work if the drm master driver is bound manually. Best regards, Jyri [1] https://lists.freedesktop.org/archives/dri-devel/2018-April/174083.html [2] https://lists.freedesktop.org/archives/dri-devel/2018-February/166907.html Jyri Sarha (2): drm/panel: Remove drm_panel_detach() calls from all panel drives drm/panel: Add device_link from panel device to drm device drivers/gpu/drm/drm_panel.c | 14 ++++++++++++++ drivers/gpu/drm/panel/panel-innolux-p079zca.c | 1 - drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 1 - drivers/gpu/drm/panel/panel-lvds.c | 1 - drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 1 - drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 1 - drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 1 - drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 1 - drivers/gpu/drm/panel/panel-simple.c | 1 - drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 1 - include/drm/drm_panel.h | 1 + 11 files changed, 15 insertions(+), 9 deletions(-)