From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E019C38C00 for ; Mon, 24 Feb 2020 21:41:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3CE5022464 for ; Mon, 24 Feb 2020 21:41:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JbCMNkoi"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="eBr+n6mT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3CE5022464 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4wNljX8xnku4Aqv48EAG5uaSPwp9GvesoEzgsTciFjw=; b=JbCMNkoioc+sbq bO2JwnhIStoNEnMDrHfexi2WG6KNoonAmOjzdw7bgFRo0sOFEKJ6q6taia5WhhZAAbI50zRfnWDpV axRA1CKhrGOfdHVPP04aOINSTKKvWSoeHBY395rZO87DICHyEYD09kPi/KkjNGXVEDbgKegLJ94DD CrtZj8Ovt5nvbrx+I+iLzmtP2Al/kqkjr9e+ZGB910eSeoxi+I/SLQwYhnvrW8h7Bw10u2cPSlZjm 9v99E637jkYII6r0rkhQ36L2fJ6ZSrRdCpKxLSfT/kfyhtnbOxePxQth2FdfSMe4peIPwIFyI6JEl UepU79U6KCUR4GEyewkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6LTT-0007HE-QO; Mon, 24 Feb 2020 21:41:11 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6LTQ-0007FX-Tm for linux-arm-kernel@lists.infradead.org; Mon, 24 Feb 2020 21:41:10 +0000 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A658E89; Mon, 24 Feb 2020 22:41:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1582580461; bh=6UaiBtvarQObo5GVB4HcCJiDttMhyMzcSXEvJoXq8XM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eBr+n6mTr9e7xtb+hpHkJCa6be4Q+cES9DbDZuI3Qcswwh317v5Em1cKrc7NAthom shY1X2A1yl586f/Kn2MWmxyM92wnuE5BK1wADoDeJgQmQDhPZWSoKyFDxR3aPzpI1N o3OkzkHDkThtkCJqn3fIk2QCPl3qF8sXzJPlPc20= Date: Mon, 24 Feb 2020 23:40:08 +0200 From: Laurent Pinchart To: Tony Lindgren Subject: Re: [PATCH 1/3] drm/omap: Prepare DSS for probing without legacy platform data Message-ID: <20200224214008.GD16163@pendragon.ideasonboard.com> References: <20200224191230.30972-1-tony@atomide.com> <20200224191230.30972-2-tony@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200224191230.30972-2-tony@atomide.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200224_134109_173506_F99A2F3A X-CRM114-Status: GOOD ( 21.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Tero Kristo , Suman Anna , Dave Gerlach , Keerthy , Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Andrew F . Davis" , Peter Ujfalusi , Faiz Abbas , Jyri Sarha , Greg Kroah-Hartman , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Roger Quadros Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Tony, Thank you for the patch. On Mon, Feb 24, 2020 at 11:12:28AM -0800, Tony Lindgren wrote: > In order to probe display subsystem (DSS) components with ti-sysc > interconnect target module without legacy platform data and using > devicetree, we need to update dss probing a bit. > > In the device tree, we will be defining the data also for the interconnect > target modules as DSS really is a private interconnect. There is some > information about that in 4460 TRM in "Figure 10-3. DSS Integration" for > example where it mentions "32-bit interconnect (SLX)". > > The changes we need to make are: > > 1. Parse also device tree subnodes for the compatible property fixup > > 2. Update the component code to consider device tree subnodes > > Cc: dri-devel@lists.freedesktop.org > Cc: Jyri Sarha > Cc: Laurent Pinchart > Cc: Tomi Valkeinen > Signed-off-by: Tony Lindgren Reviewed-by: Laurent Pinchart > --- > > This is needed for dropping DSS platform data that I'll be posting > seprately. If this looks OK, can you guys please test and ack? > > --- > drivers/gpu/drm/omapdrm/dss/dss.c | 25 ++++++++++++++++--- > .../gpu/drm/omapdrm/dss/omapdss-boot-init.c | 25 +++++++++++++------ > 2 files changed, 39 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c > --- a/drivers/gpu/drm/omapdrm/dss/dss.c > +++ b/drivers/gpu/drm/omapdrm/dss/dss.c > @@ -1339,9 +1339,15 @@ static int dss_component_compare(struct device *dev, void *data) > return dev == child; > } > > +struct dss_component_match_data { > + struct device *dev; > + struct component_match **match; > +}; > + > static int dss_add_child_component(struct device *dev, void *data) > { > - struct component_match **match = data; > + struct dss_component_match_data *cmatch = data; > + struct component_match **match = cmatch->match; > > /* > * HACK > @@ -1352,7 +1358,17 @@ static int dss_add_child_component(struct device *dev, void *data) > if (strstr(dev_name(dev), "rfbi")) > return 0; > > - component_match_add(dev->parent, match, dss_component_compare, dev); > + /* > + * Handle possible interconnect target modules defined within the DSS. > + * The DSS components can be children of an interconnect target module > + * after the device tree has been updated for the module data. > + * See also omapdss_boot_init() for compatible fixup. > + */ > + if (strstr(dev_name(dev), "target-module")) > + return device_for_each_child(dev, cmatch, > + dss_add_child_component); > + > + component_match_add(cmatch->dev, match, dss_component_compare, dev); > > return 0; > } > @@ -1395,6 +1411,7 @@ static int dss_probe_hardware(struct dss_device *dss) > static int dss_probe(struct platform_device *pdev) > { > const struct soc_device_attribute *soc; > + struct dss_component_match_data cmatch; > struct component_match *match = NULL; > struct resource *dss_mem; > struct dss_device *dss; > @@ -1472,7 +1489,9 @@ static int dss_probe(struct platform_device *pdev) > > omapdss_gather_components(&pdev->dev); > > - device_for_each_child(&pdev->dev, &match, dss_add_child_component); > + cmatch.dev = &pdev->dev; > + cmatch.match = &match; > + device_for_each_child(&pdev->dev, &cmatch, dss_add_child_component); > > r = component_master_add_with_match(&pdev->dev, &dss_component_ops, match); > if (r) > diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > --- a/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > +++ b/drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c > @@ -183,9 +183,24 @@ static const struct of_device_id omapdss_of_fixups_whitelist[] __initconst = { > {}, > }; > > +static void __init omapdss_find_children(struct device_node *np) > +{ > + struct device_node *child; > + > + for_each_available_child_of_node(np, child) { > + if (!of_find_property(child, "compatible", NULL)) > + continue; > + > + omapdss_walk_device(child, true); > + > + if (of_device_is_compatible(child, "ti,sysc")) > + omapdss_find_children(child); > + } > +} > + > static int __init omapdss_boot_init(void) > { > - struct device_node *dss, *child; > + struct device_node *dss; > > INIT_LIST_HEAD(&dss_conv_list); > > @@ -195,13 +210,7 @@ static int __init omapdss_boot_init(void) > return 0; > > omapdss_walk_device(dss, true); > - > - for_each_available_child_of_node(dss, child) { > - if (!of_find_property(child, "compatible", NULL)) > - continue; > - > - omapdss_walk_device(child, true); > - } > + omapdss_find_children(dss); > > while (!list_empty(&dss_conv_list)) { > struct dss_conv_node *n; -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel