lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Dec 2015 09:15:28 +0100
From:	Jean-Francois Moine <moinejf@...e.fr>
To:	Russell King - ARM Linux <linux@....linux.org.uk>
Cc:	Liviu Dudau <Liviu.Dudau@....com>,
	linux-rockchip <linux-rockchip@...ts.infradead.org>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	LKML <linux-kernel@...r.kernel.org>,
	dri-devel <dri-devel@...ts.freedesktop.org>,
	LAKML <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 0/2] Improve drm_of_component_probe() and move
 rockchip to use it

On Wed, 23 Dec 2015 18:59:48 +0000
Russell King - ARM Linux <linux@....linux.org.uk> wrote:

> > > 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.
> > 
> > Keeping the port instead of the parent asks for more code, but,
> > especially, it also asks for changes in the component drivers because,
> > at bind time, in 'data', they get a port instead of the device.
> 
> Sorry, this doesn't make sense.  You have far too many sub-clauses
> which mean nothing at all.  Please rephrase.

Well, two topics:

- adding a second 'of_compare' function complexifies the code
  and people may wonder why such a function is needed and what
  they have to put inside.

- usually, the component drivers just do a component_add() of the device
  at probe time.
  Now, as the bind() function of the components of the first level
  returns the port in 'data', some work has to be done for retrieving
  the device.
  This can (should?) be done in the bind() function.
  In drm/imx/ipuv3-crtc.c, this is done by a hack, changing the device
  node reference before calling component_add()!

I looked at the imx-drm and the associated DTs, and I think that,
without the v2 patch and keeping the port parent as the component
(previous mail), the code could be simplified adding an intermediate
device node in the DT.

For example, in imx6qdl.dtsi:

	ipu1: ipu@...00000 {
		...
		ports@2 {			/* di<x> device */
			ipu1_di0: port {
				...
				ipu1_di0_hdmi: endpoint@1 {
					remote-endpoint = <&hdmi_mux_0>;
				};
				...
			};
		};
	}

In the code, the ipu driver searches the 'ports' and adds them as components.
After binding, the devices are the 'ports'.

-- 
Ken ar c'hentaƱ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ