From patchwork Thu Apr 26 08:06:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 134421 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1933687lji; Thu, 26 Apr 2018 01:07:50 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrDNy0DU1XPi4o2I8gkULQ6I7IB4/UIZOW04Y9DZIXjOrag5ZJkQ02Y7dQVz6jmhHvrnKwu X-Received: by 2002:a17:902:b60b:: with SMTP id b11-v6mr4365972pls.330.1524730070406; Thu, 26 Apr 2018 01:07:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524730070; cv=none; d=google.com; s=arc-20160816; b=eNV1WI+/IZ7W2bGjk5XnJbnxUEVqXzZjHepDzI/e/xOFE3QeNUzkcyiyEpq/myOAQl BJrvd/iXggN24iECiCI9quQjjURyjSV4IF3R+JEEy92G6RQP0jl4fwhWyxvkIBUjBVea EOteHyPPcOGfmbgTftWnCqoaSZcu4IcoDrbNQXgX71s/w0JZ9zrGsW/2AsZx00ZRI2sV MoH2QpHQ3iKJQ4DfRJILE04AcwVxqJKZloJwJ/q1z6S1wbw+NXea1A1/muw26y4wv4jj JXyFSjRU86cIoKGypdGS3cG5oVwzb4sv/B2Q5W0Dy/TApCN5f2386b3K0YS48UCyuqK8 LfIw== 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=J4sy99nrDcLZW+tharFXF6IAjL/j8U3PxZDdgigymeQ=; b=fYGnr6AtPRKlB0o8CyZt+bs3SM8uwh3H71XfeiRoRzqYb/5pYCL780lA1/SRmJuzsy vU2aN3CjNKHt490r2pFgVpPm1S84mr5azFv5SdD/9Z0fvMgt/gxaEThxO3HZpfO9S5iB bQuB/Pq4LewhcvZCMsOobjQ3DvdY5p8c53lmzCDExdlc9DkEdCaQQi5APfk+/0erBCcm Sa88rUdh02mUbo8+75N8MnTiR5py3QwXPGeJ0fUgAFDECHfnG27J1Ula5y5MfMyRn2Cf JjiO+acf0h1/ypLEpdXsw2Tahwp12N615R6kSBAwicYZdQf/1b/qsQE8dSdW4+BUlo8o nLQQ== 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=D5chA2Ys; 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 z9-v6si6670843pll.423.2018.04.26.01.07.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Apr 2018 01:07:50 -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=D5chA2Ys; 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 1BE216E648; Thu, 26 Apr 2018 08:07:18 +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 466466E648 for ; Thu, 26 Apr 2018 08:07:16 +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 w3Q8753j022538; Thu, 26 Apr 2018 03:07:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524730025; bh=gzvQ6QMVV4n7hcKDeX1uasP5jRDmjnaOBm08CHR0qZY=; h=From:To:CC:Subject:Date; b=D5chA2YsUm4LZj6sbmD7MXVcFHhzMIBW1YRWJ3pWvbtIP9BZJJSuq9wcNA7a6IR7B 0ar00A0gasDHD/81dNNqNqUFIrw9trwL4NocUbBv1I83azIWEk5kJiqqDAw3JHTG6z nClj4OYfT9eI+U5U0cVF5ql4ejQnrmLZCJuuoF74= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3Q875fG015341; Thu, 26 Apr 2018 03:07:05 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 26 Apr 2018 03:07:05 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 26 Apr 2018 03:07:05 -0500 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3Q872lS014814; Thu, 26 Apr 2018 03:07:03 -0500 From: Jyri Sarha To: Subject: [PATCH v4 0/2] drm/panel: Add device link in drm_panel_attach() Date: Thu, 26 Apr 2018 11:06:58 +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, 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 guess the first patch should be mergable. With the second, maybe it is better to wait until we have a full solution including the bridges too. What should I do to get the first patch merged? The third version of these patches can be found here: https://lists.freedesktop.org/archives/dri-devel/2018-April/174221.html Changes since v3: - "drm/panel: Remove drm_panel_detach() calls from all panel drives" - Update kerneldoc for drm_panel_detach() and drm_panel_attach() according to Daniel Vetter's suugestion and add his reviewed-by. - "drm/panel: Add device_link from panel device to drm device" - none 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 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 | 16 ++++++++++++++++ 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, 17 insertions(+), 9 deletions(-)