public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Liviu Dudau <Liviu.Dudau@arm.com>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: linux-rockchip <linux-rockchip@lists.infradead.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	LKML <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	LAKML <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 0/2] Improve drm_of_component_probe() and move rockchip to use it
Date: Wed, 23 Dec 2015 10:05:34 +0000	[thread overview]
Message-ID: <20151223100534.GW960@e106497-lin.cambridge.arm.com> (raw)
In-Reply-To: <20151223103906.2aae53595345240d57d57b41@free.fr>

On Wed, Dec 23, 2015 at 10:39:06AM +0100, Jean-Francois Moine wrote:
> On Tue, 22 Dec 2015 17:38:00 +0000
> Liviu Dudau <Liviu.Dudau@arm.com> 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:
> 
> 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);
>  	}
>  
> 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?

The function is an extract of common code sprinkled through a few DRM drivers,
they all used port rather than port->parent.

Have a look at my v2 where I've introduced two compare functions and also
modified the Rockchip compare_port() to use port->parent in the comparison. I
guess that should solve your problem.

Best regards,
Liviu

> 
> -- 
> Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
> Jef		|		http://moinejf.free.fr/
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

  reply	other threads:[~2015-12-23 10:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 14:22 [PATCH v2 0/2] Improve drm_of_component_probe() and move rockchip to use it Liviu Dudau
2015-11-20 14:22 ` [PATCH v2 1/2] drm: Improve drm_of_component_probe() to correctly handle ports and remote ports Liviu Dudau
2016-02-22 11:51   ` Liviu Dudau
2016-02-22 15:51     ` Russell King - ARM Linux
2016-02-22 15:57       ` Liviu Dudau
2015-11-20 14:22 ` [PATCH v2 2/2] drm/rockchip: Convert the probe function to the generic drm_of_component_probe() Liviu Dudau
2015-11-23  9:39   ` Mark yao
2015-11-23 23:20 ` [PATCH v2 0/2] Improve drm_of_component_probe() and move rockchip to use it Heiko Stübner
2015-12-12 13:29 ` Heiko Stübner
2015-12-22 17:38 ` Liviu Dudau
2015-12-23  1:33   ` Dave Airlie
2015-12-23  9:39   ` Jean-Francois Moine
2015-12-23 10:05     ` Liviu Dudau [this message]
2015-12-23 17:20       ` Jean-Francois Moine
2015-12-23 18:59         ` Russell King - ARM Linux
2015-12-24  8:15           ` Jean-Francois Moine
2015-12-24 10:52             ` Russell King - ARM Linux
2015-12-24 12:27               ` Jean-Francois Moine
2015-12-24 12:36                 ` Russell King - ARM Linux
2015-12-25  9:38                   ` Jean-Francois Moine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151223100534.GW960@e106497-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=moinejf@free.fr \
    --cc=rmk+kernel@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox