devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>,
	Dave Airlie <airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Laurent Pinchart
	<laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Fbdev development list
	<linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFR 2/2] drm/panel: Add simple panel support
Date: Fri, 25 Oct 2013 16:10:30 +0200	[thread overview]
Message-ID: <20131025141029.GD1551@ulmo.nvidia.com> (raw)
In-Reply-To: <1394972.QJSGNM8CJk@avalon>

[-- Attachment #1: Type: text/plain, Size: 5732 bytes --]

On Fri, Oct 25, 2013 at 03:47:21PM +0200, Laurent Pinchart wrote:
> Hi Thierry,
> 
> On Friday 25 October 2013 10:13:15 Thierry Reding wrote:
> > On Thu, Oct 24, 2013 at 11:06:18PM +0100, Stephen Warren wrote:
> > > On 10/24/2013 12:20 PM, Laurent Pinchart wrote:
> > > > On Sunday 20 October 2013 23:07:36 Stephen Warren wrote:
> > > >> On 10/17/2013 12:07 PM, Laurent Pinchart wrote:
> > > >> ...
> > > >> 
> > > >>>> As I said, anything that really needs a CDF binding to work
> > > >>>> likely isn't "simple" anymore, therefore a separate driver can
> > > >>>> easily be justified.
> > > >>> 
> > > >>> The system as a whole would be more complex, but the panel could be
> > > >>> the same. We can't have two drivers for the same piece of hardware
> > > >>> in the DT world, as there will be a single compatible string and no
> > > >>> way to choose between the drivers (unlike the board code world that
> > > >>> could set device names to "foo- encoder-v4l2" or "foo-encoder-drm"
> > > >>> and live happily with that ever after).
> > > >> 
> > > >> That's not true. We can certainly define two different compatible
> > > >> values for a piece of HW if we have to. We can easily control whether
> > > >> they are handled by the same or different drivers in the OS.
> > > > 
> > > > From an implementation point of view, sure. But from a conceptual point
> > > > of view, that would make the DT bindings pretty Linux-specific, with a
> > > > description of what the operating system should do instead of a
> > > > description of what the hardware looks like. My understanding is that
> > > > we've tried pretty hard in the past not to open that Pandora's box.
> > > > 
> > > > The case I'm mostly concerned about would be two different compatibility
> > > > strings to select whether the device should be handled by a KMS or V4L
> > > > driver. I don't think that's a good idea.
> > > 
> > > I wouldn't think of the two compatible values as selecting different
> > > specific Linux drivers, but rather they simply describe the HW in
> > > different levels of detail. The fact that if we know a certain level of
> > > detail about the HW means that Linux can and does create a KMS driver
> > > rather than a V4L2 driver seems like a detail that's completely hidden
> > > inside the OS.
> > 
> > I've had a somewhat similar idea the other day but couldn't really put
> > it into words. Interestingly someone else mentioned a similar concept in
> > a different thread which I think describes what I had in mind as well.
> > 
> > I was wondering if we couldn't use two compatible values to denote two
> > interfaces that the device implements. Something along the lines of:
> > 
> > 	compatible = "vendor,block-name", "encoder";
> > 
> > So a driver could primarily match on "vendor,block-name", but at the
> > same time it could use the additional information of being required to
> > implement "encoder" to expose an additonal interface.
> 
> Let's take the hardware architecture described in
> http://www.ideasonboard.org/media/meetings/20131024-elce.pdf#39 (page 39) as 
> an example. The green blocks are part of the capture pipeline and handled by 
> the V4L subsystem. The blue blocks are part of the display pipeline and 
> handled by the KMS subsystem. One ADV7511 HDMI transmitter instance need to be 
> controlled by a KMS driver and the second one by a V4L driver. 
> 
> The two instances are identical, so their DT nodes will show no difference if 
> we stick to a hardware description only. There would then be no way to bind to 
> different drivers.

I don't quite see why some of the green parts couldn't be part of the
display (KMS) pipeline. I thought I remember you say something about
implementing deep pipelining support in one of the more recent talks.
This sounds exactly like a case where this would be useful.

Obviously as long as that work isn't finished that won't help you, but I
think that providing a way to pass a video stream object from V4L2 to
DRM/KMS would be a more proper solution to this problem.

> > I suppose that perhaps something like a device_type property could be
> > used for that as well, and that might even be the more correct thing to
> > do.
> > 
> > We already do something similar to make GPIO controllers expose an
> > interrupt chip by adding an interrupt-controller property. We also use
> > the gpio-controller property to mark a device node as exposing the GPIO
> > interface for that matter.
> >
> > So if a HW block can actually implement two different interfaces, each
> > of them being optional, then there should be ways to represent that in
> > DT as well. We already do that for "simpler" HW blocks, so there's no
> > reason we shouldn't be able to do the same with multimedia components.
> > 
> > If it's really an encoder, though, the problem might be different,
> > though, since the interface (at a hardware or functional level if you
> > will) remains the same. But I think in that case it's something that
> > needs to be figured out internally by the OS. In my opinion, if we are
> > in a situation where we have two different drivers in two subsystems for
> > the same device, then we're doing something wrong and it should be fixed
> > at that level, not by quirking the DT into making a decision for us.
> 
> I tend to agree, and I'd like to be able to share drivers between V4L and KMS. 
> This is way down the road though.

My point is that I don't see a need for sharing the drivers if we can
make both V4L2 and DRM/KMS interoperate well enough to cover such use
cases.

Why share the drivers if we can make it work by sharing the data?

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-10-25 14:10 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 18:25 [RFR 0/2] DRM display panel support Thierry Reding
     [not found] ` <1381947912-11741-1-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-16 18:25   ` [RFR 1/2] drm: Add " Thierry Reding
2013-10-16 18:25   ` [RFR 2/2] drm/panel: Add simple " Thierry Reding
     [not found]     ` <1381947912-11741-3-git-send-email-treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-10-17  0:47       ` Laurent Pinchart
2013-10-17  8:28         ` Dave Airlie
     [not found]           ` <CAPM=9tzU36cwcM0pH0J_Vgc6UOj5MHdVNDvn3wpGNuihbMqdQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-17  8:49             ` Tomi Valkeinen
     [not found]               ` <525FA4B0.8060504-l0cyMroinI0@public.gmane.org>
2013-10-17  9:16                 ` Thierry Reding
     [not found]                   ` <20131017091614.GC2502-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17  9:52                     ` Tomi Valkeinen
     [not found]                       ` <525FB368.6020003-l0cyMroinI0@public.gmane.org>
2013-10-17 10:48                         ` Thierry Reding
     [not found]                           ` <20131017104856.GA10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 11:07                             ` Laurent Pinchart
2013-10-20 22:07                               ` Stephen Warren
     [not found]                                 ` <52645428.9080607-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-24 11:20                                   ` Laurent Pinchart
2013-10-24 22:06                                     ` Stephen Warren
     [not found]                                       ` <526999DA.7080409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-25  8:13                                         ` Thierry Reding
     [not found]                                           ` <20131025081314.GC19622-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-25 13:47                                             ` Laurent Pinchart
2013-10-25 14:10                                               ` Thierry Reding [this message]
     [not found]                                                 ` <20131025141029.GD1551-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-25 14:22                                                   ` Laurent Pinchart
2013-10-25 11:33                                         ` Laurent Pinchart
2013-10-25 12:29                                           ` Thierry Reding
     [not found]                                             ` <20131025122925.GA24720-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-25 13:49                                               ` Laurent Pinchart
2013-10-25 15:29                                           ` Stephen Warren
2013-10-17 11:21                             ` Tomi Valkeinen
2013-10-20 22:01                 ` Stephen Warren
2013-10-17  8:53         ` Thierry Reding
     [not found]           ` <20131017085342.GB2502-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 10:22             ` Tomi Valkeinen
     [not found]               ` <525FBA5D.9000001-l0cyMroinI0@public.gmane.org>
2013-10-17 11:05                 ` Thierry Reding
     [not found]                   ` <20131017110517.GC10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 11:15                     ` Laurent Pinchart
2013-10-17 12:06                       ` Thierry Reding
     [not found]                         ` <20131017120646.GE10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 12:23                           ` Laurent Pinchart
2013-10-17 12:55                             ` Thierry Reding
2013-10-17 11:50                     ` Tomi Valkeinen
     [not found]                       ` <525FCF07.6070006-l0cyMroinI0@public.gmane.org>
2013-10-17 12:12                         ` Thierry Reding
2013-10-17 11:02             ` Laurent Pinchart
2013-10-17 11:35               ` Tomi Valkeinen
     [not found]                 ` <525FCB95.6070401-l0cyMroinI0@public.gmane.org>
2013-10-17 11:51                   ` Laurent Pinchart
2013-10-17 11:59                     ` Tomi Valkeinen
     [not found]                       ` <525FD12D.3000200-l0cyMroinI0@public.gmane.org>
2013-10-17 12:17                         ` Laurent Pinchart
2013-10-17 12:32                           ` Tomi Valkeinen
     [not found]                             ` <525FD8DD.3090509-l0cyMroinI0@public.gmane.org>
2013-10-20 19:29                               ` Sylwester Nawrocki
2013-10-24 10:40                             ` Laurent Pinchart
2013-10-24 10:52                               ` Tomi Valkeinen
2013-10-25 10:54                                 ` Sylwester Nawrocki
2013-10-17 11:41               ` Thierry Reding
     [not found]                 ` <20131017114139.GD10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-17 12:14                   ` Laurent Pinchart
2013-10-17 12:46                     ` Thierry Reding
     [not found]                       ` <20131017124619.GG10993-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-24 11:05                         ` Laurent Pinchart
2013-10-24 11:48                           ` Thierry Reding
     [not found]                             ` <20131024114823.GC11296-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2013-10-25 11:27                               ` Laurent Pinchart

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=20131025141029.GD1551@ulmo.nvidia.com \
    --to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=tomi.valkeinen-l0cyMroinI0@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).