From patchwork Wed Dec 23 09:39:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Francois Moine X-Patchwork-Id: 7909691 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1730C9F349 for ; Wed, 23 Dec 2015 09:39:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4052F203C4 for ; Wed, 23 Dec 2015 09:39:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 58F7C203C2 for ; Wed, 23 Dec 2015 09:39:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aBfte-0008VD-0u; Wed, 23 Dec 2015 09:39:50 +0000 Received: from smtp5-g21.free.fr ([2a01:e0c:1:1599::14]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aBftS-0008Kh-5H; Wed, 23 Dec 2015 09:39:39 +0000 Received: from void-opi2 (unknown [82.245.201.222]) by smtp5-g21.free.fr (Postfix) with SMTP id 47C0DD48165; Wed, 23 Dec 2015 10:38:49 +0100 (CET) Date: Wed, 23 Dec 2015 10:39:06 +0100 From: Jean-Francois Moine To: Liviu Dudau Subject: Re: [PATCH v2 0/2] Improve drm_of_component_probe() and move rockchip to use it Message-Id: <20151223103906.2aae53595345240d57d57b41@free.fr> In-Reply-To: <20151222173800.GU960@e106497-lin.cambridge.arm.com> References: <1448029325-14602-1-git-send-email-Liviu.Dudau@arm.com> <20151222173800.GU960@e106497-lin.cambridge.arm.com> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.29; armv7l-unknown-linux-gnueabihf) Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151223_013938_428167_824119D9 X-CRM114-Status: GOOD ( 17.50 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko =?ISO-8859-1?Q?St=FCbner?= , linux-rockchip , David Airlie , Daniel Vetter , LKML , dri-devel , Eric Anholt , Philipp Zabel , Russell King , LAKML , Mark Yao Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 22 Dec 2015 17:38:00 +0000 Liviu Dudau wrote: > On Fri, Nov 20, 2015 at 02:22:03PM +0000, Liviu Dudau wrote: > > Hello, > > > > This is v2 of the patchset trying to make drm_of_component_probe() cope with finding > > both local crtc ports and remote encoder ones. Heiko Stübner was nice enough to test > > an earlier version that was patched following Russell's suggestions on rk3288, but > > I haven't seen any reports from iMX or Armada users. > > > > Changelog: > > v2: Updated the drm_of_component_probe() comment to explain why the reference count > > is not dropped. Fixed the compare_port() function for rockchip as described by > > Russell. > > v1: Original submission. http://lists.freedesktop.org/archives/dri-devel/2015-November/094546.html > > Gentle ping, this has now been tested by Rockchip people and fixes the earlier version > that had to be reverted in mainline. Can it be included in the -next somewhere? Hi Liviu, Sorry for being a bit late. I wanted to use drm_of_component_probe() for a new DRM driver, but I could not find any way to do it: you add the "ports" nodes as components while, usually, the components are the device nodes themselves. With this simple patch: everything is easy, my DT being like: de_controller { ... ports = <&lcd0_p>; }; lcd_controller { ... lcd0_p: port { lcd0_ep: endpoint { remote-endpoint = <&hdmi_ep>; }; }; }; What was the reason to keep the "ports" node instead of the device? diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 493c05c..dbd2921 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -101,7 +101,7 @@ int drm_of_component_probe(struct device *dev, continue; } - component_match_add(dev, &match, compare_of, port); + component_match_add(dev, &match, compare_of, port->parent); of_node_put(port); }