public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Liviu Dudau <Liviu.Dudau@arm.com>,
	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>,
	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: Thu, 24 Dec 2015 12:36:10 +0000	[thread overview]
Message-ID: <20151224123610.GE8644@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20151224132708.10a35feafb44a5bb8e65ba6d@free.fr>

On Thu, Dec 24, 2015 at 01:27:08PM +0100, Jean-Francois Moine wrote:
> On Thu, 24 Dec 2015 10:52:07 +0000
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > However, when we come to the Linux implementation, things get sticky
> > because we need to select the correct platform device corresponding
> > with the IPU's port.  This can only be done using the 'port' node
> > and not port->parent.
> > 
> > port->parent would be the IPU device node itself.  If we were to
> > introduce the additional ports {} node, that doesn't help, because
> > now port->parent points at the ports {} node instead, not the actual
> > port - and we need the port itself to identify which of the IPU's
> > own created platform devices to select.
> > 
> > So, modifying DT doesn't help in any way, even if you ignore the fact
> > that we need to maintain backwards compatibility.
> 
> The ports {} node is just a container, and so is the (unique) port {}
> node which is inside:
> 
> 	ipu1: ipu@02400000 {
> 		...
> 		ports@2 {			/* di0 device */
> 			ipu1_di0: port {
> 				...
> 				ipu1_di0_hdmi: endpoint@1 {
> 					remote-endpoint = <&hdmi_mux_0>;
> 				};
> 				ipu1_di0_mipi: endpoint@2 {
> 					remote-endpoint = <&mipi_mux_0>;
> 				};
> 				...
> 			};
> 		};
> 		ports@3 {			/* di1 device */
> 			ipu1_di1: port {
> 				...
> 				ipu1_di1_hdmi: endpoint@1 {  
> 					remote-endpoint = <&hdmi_mux_1>;
> 				};
> 				ipu1_di1_mipi: endpoint@2 {
> 					remote-endpoint = <&mipi_mux_1>;
> 				};
> 				...
> 			};
> 		};
> 	};

That's against the binding documentation for graphs:

All 'port' nodes can be grouped under an optional 'ports' node, which
allows to specify #address-cells, #size-cells properties for the 'port'
nodes independently from any other child device nodes a device might
have.

It says "All 'port' nodes" not "Some" or similar.  The DT code requires
this.  To change this would mean changing the DT binding and the code
parsing that binding, adding much more complexity there.

You earlier argued against adding (what would be less) complexity to
the DRM OF helper, now you seem to be wanting more complexity elsewhere
to save what would be trivial complexity elsewhere - all the functions
which iterate over the port nodes would need to be updated to find
all the "ports" nodes, and end up needing an additional level of looping
and complexity to jump from one port node in a ports { } block to the
first port node in the next ports { } block.

Also it makes the API more difficult because we end up with the ports@n
nodes needing a reg= property (as per ePAPR requirements) and it becomes
unclear what that would represent at the hardware level.

It seems that you're trying to work around a limitation in Linux by
modifying the hardware representation...

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2015-12-24 12:36 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
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 [this message]
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=20151224123610.GE8644@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=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 \
    /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