All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Ajay Kumar <ajaykumar.rs@samsung.com>,
	dri-devel@lists.freedesktop.org,
	linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org,
	inki.dae@samsung.com, robdclark@gmail.com,
	daniel.vetter@ffwll.ch, seanpaul@google.com, ajaynumb@gmail.com,
	jg1.han@samsung.com, joshi@samsung.com, prashanth.g@samsung.com,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties
Date: Mon, 6 Oct 2014 14:34:00 +0300	[thread overview]
Message-ID: <54327E28.5050400@ti.com> (raw)
In-Reply-To: <20140925062324.GB12423@ulmo>

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

On 25/09/14 09:23, Thierry Reding wrote:

> How are cameras different? The CPU wants to capture video data from the
> camera, so it needs to go look for a video capture device, which in turn
> needs to involve a sensor.

Let's say we have an XXX-to-YYY encoder. We use that encoder to convert
the SoC's XXX output to YYY, which is then shown on a panel. So, in this
case, the encoder's DT node will have a "panel" or "output" phandle,
pointing to the panel.

We then use the exact same encoder in a setup in which we have a camera
which outputs XXX, which the encoder then converts to YYY, which is then
captured by the SoC. Here the "output" phandle would point to the SoC.

>>> If you go the other way around, how do you detect how things connect?
>>> Where do you get the information about the panel so you can trace back
>>> to the origin?
>>
>> When the panel driver probes, it registers itself as a panel and gets
>> its video source. Similarly a bridge in between gets its video source,
>> which often would be the SoC, i.e. the origin.
> 
> That sounds backwards to me. The device tree serves the purpose of
> supplementing missing information that can't be probed if hardware is
> too stupid. I guess that's one of the primary reasons for structuring it
> the way we do, from the CPU point of view, because it allows the CPU to
> probe via the device tree.
> 
> Probing is always done downstream, so you'd start by looking at some
> type of bus interface and query it for what devices are present on the
> bus. Take for example PCI: the CPU only needs to know how to access the
> host bridge and will then probe devices behind each of the ports on that
> bridge. Some of those devices will be bridges, too, so it will continue
> to probe down the hierarchy.
> 
> Without DT you don't have a means to know that there was a panel before
> you've actually gone and probed your whole hierarchy and found a GPU
> with some sort of output that a panel can be connected to. I think it
> makes a lot of sense to describe things in the same way in DT.

Maybe I don't quite follow, but it sounds to be you are mixing control
and data. For control, all you say is true. The CPU probes the devices
on control busses, either with the aid of HW or the aid of DT, going
downstream.

But the data paths are a different matter. The CPU/SoC may not even be
involved in the whole data path. You could have a sensor on the board
directly connected to a panel. Both are controlled by the CPU, but the
data path goes from the sensor to the panel (or vice versa). There's no
way the data paths can be "CPU centric" in that case.

Also, a difference with the data paths compared to control paths is that
they are not strictly needed for operation. An encoder can generate an
output without enabling its input (test pattern or maybe blank screen,
or maybe a screen with company logo). Or an encoder with two inputs
might only get the second input when the user requests a very high res
mode. So it is possible that the data paths are lazily initialized.

You do know that there is a panel right after the device is probed
according to its control bus. It doesn't mean that the data paths are
there yet. In some cases the user space needs to reconfigure the data
paths before a panel has an input and can be used to show an image from
the SoC's display subsystem.

The point here being that the data path bindings don't really relate to
the probing part. You can probe no matter which way the data path
bindings go, and no matter if there actually exists (yet) a probed
device on the other end of a data path phandle.

While I think having video data connections in DT either way, downstream
or upstream, would work, it has felt most natural for me to have the
phandles from video sinks to video sources.

The reason for that is that I think the video sink has to be in control
of its source. It's the sink that tells the source to start or stop or
reconfigure. So I have had need to get the video source from a video
sink, but I have never had the need to get the video sinks from video
sources.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-10-06 11:34 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 14:39 [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties Ajay Kumar
2014-08-27 14:39 ` [PATCH V7 10/12] Documentation: devicetree: Add vendor prefix for parade Ajay Kumar
2014-08-27 14:39 ` [PATCH V7 09/12] Documentation: drm: bridge: move to video/bridge Ajay Kumar
2014-09-17 11:52 ` [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties Tomi Valkeinen
2014-09-17 14:29   ` Ajay kumar
2014-09-17 16:22     ` Tomi Valkeinen
2014-09-18  5:50       ` Ajay kumar
2014-09-19 12:54         ` Tomi Valkeinen
2014-09-19 13:59           ` Ajay kumar
2014-09-19 14:28             ` Tomi Valkeinen
2014-09-20 11:22               ` Ajay kumar
2014-09-20 15:27                 ` Javier Martinez Canillas
2014-09-22  6:00                   ` Ajay kumar
2014-09-22 15:05                   ` Tomi Valkeinen
2014-10-07 10:30                 ` Tomi Valkeinen
2014-10-07 10:36                   ` Ajay kumar
2014-10-07 14:49                     ` Laurent Pinchart
2014-10-08  7:09                       ` Thierry Reding
2014-10-10 13:03                         ` Ajay kumar
2014-10-16  8:23                           ` Ajay kumar
2014-10-16  9:04                           ` Laurent Pinchart
2014-10-28  9:12                             ` Javier Martinez Canillas
2014-10-28 11:12                               ` Ajay kumar
2014-09-22  8:26               ` Thierry Reding
2014-09-22 14:42                 ` Tomi Valkeinen
2014-09-23  5:53                   ` Thierry Reding
2014-09-23  8:41                     ` Tomi Valkeinen
2014-09-23  9:28                       ` Thierry Reding
2014-09-23 11:15                         ` Tomi Valkeinen
2014-09-23 14:29                           ` Thierry Reding
2014-09-23 15:25                             ` Tomi Valkeinen
2014-09-22  8:10         ` Thierry Reding
2014-09-22  8:31           ` Ajay kumar
2014-09-22 10:41             ` Thierry Reding
2014-09-22 11:23               ` Ajay kumar
2014-09-22 11:35                 ` Thierry Reding
2014-09-22 12:12                   ` Ajay kumar
2014-09-23  0:00                   ` Laurent Pinchart
2014-09-23  5:55                     ` Thierry Reding
2014-09-23  6:11                       ` Ajay kumar
2014-09-23  6:28                         ` Thierry Reding
2014-09-23 11:47                       ` DT property to selectively disable device features (was [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties) Laurent Pinchart
2014-09-22  8:06       ` [PATCH V7 11/12] Documentation: bridge: Add documentation for ps8622 DT properties Thierry Reding
2014-09-22 14:23         ` Tomi Valkeinen
2014-09-23  6:04           ` Thierry Reding
2014-09-23  7:24             ` Andrzej Hajda
2014-09-23  8:35               ` Thierry Reding
2014-09-23  9:40                 ` Tomi Valkeinen
2014-09-23 10:01                   ` Thierry Reding
2014-09-23 12:09                     ` Tomi Valkeinen
2014-09-23 14:38                       ` Thierry Reding
2014-09-23 15:33                         ` Tomi Valkeinen
2014-09-23  9:43                 ` Andrzej Hajda
2014-09-23 10:10                   ` Thierry Reding
2014-09-23 10:34                     ` Andrzej Hajda
2014-09-23 14:41                       ` Thierry Reding
2014-09-24  7:11                         ` Andrzej Hajda
2014-09-24  8:27                         ` Tomi Valkeinen
2014-09-23 11:33                     ` Laurent Pinchart
2014-09-23  8:54             ` Tomi Valkeinen
2014-09-23  9:39               ` Thierry Reding
2014-09-23 11:31                 ` Tomi Valkeinen
2014-09-23 14:45                   ` Thierry Reding
2014-09-24  8:42                     ` Tomi Valkeinen
2014-10-06 14:40                       ` Laurent Pinchart
2014-10-07  7:06                         ` Tomi Valkeinen
2014-10-07  7:23                           ` Laurent Pinchart
2014-10-07  8:25                             ` Tomi Valkeinen
2014-10-07 16:14                               ` Laurent Pinchart
2014-09-22  7:54   ` Thierry Reding
2014-09-22 14:04     ` Tomi Valkeinen
2014-09-23  6:21       ` Thierry Reding
2014-09-23  9:30         ` Tomi Valkeinen
2014-09-23  9:53           ` Thierry Reding
2014-09-23 11:12             ` Laurent Pinchart
2014-09-23 14:50               ` Thierry Reding
2014-09-23 12:00             ` Tomi Valkeinen
2014-09-23 14:58               ` Thierry Reding
2014-09-24  9:08                 ` Tomi Valkeinen
2014-09-25  6:23                   ` Thierry Reding
2014-10-06 11:34                     ` Tomi Valkeinen [this message]
2014-10-06 13:55                       ` Laurent Pinchart
2014-09-23 10:02           ` Andrzej Hajda
2014-09-23 10:02           ` Andrzej Hajda
2014-09-23 11:10             ` Laurent Pinchart
2014-09-23 11:18               ` Andrzej Hajda
2014-09-23 11:23                 ` Laurent Pinchart
2014-09-23 11:47                   ` Andrzej Hajda
2014-09-23 11:52                     ` Laurent Pinchart
2014-09-23 12:40                       ` Andrzej Hajda
2014-09-23 12:40                       ` Andrzej Hajda
2014-09-23 14:49                       ` Thierry Reding
2014-10-06 14:38                         ` 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=54327E28.5050400@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=ajaykumar.rs@samsung.com \
    --cc=ajaynumb@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=jg1.han@samsung.com \
    --cc=joshi@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=prashanth.g@samsung.com \
    --cc=robdclark@gmail.com \
    --cc=seanpaul@google.com \
    --cc=thierry.reding@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.