From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Thierry Reding <treding@nvidia.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [RFC v2 PATCH] mipi-dsi-bus: add MIPI DSI bus support
Date: Fri, 13 Dec 2013 14:23:20 +0200 [thread overview]
Message-ID: <52AAFC38.709@ti.com> (raw)
In-Reply-To: <20131213120603.GA9820@ulmo.nvidia.com>
[-- Attachment #1.1: Type: text/plain, Size: 2954 bytes --]
On 2013-12-13 14:06, Thierry Reding wrote:
> On Fri, Dec 13, 2013 at 01:29:17PM +0200, Tomi Valkeinen wrote:
>> On 2013-12-13 13:22, Andrzej Hajda wrote:
>>> On 12/12/2013 01:19 PM, Thierry Reding wrote:
>>>> On Tue, Dec 10, 2013 at 11:19:54AM +0200, Tomi Valkeinen wrote:
>>>>> On 2013-12-09 18:10, Thierry Reding wrote:
>>>>>
>>>>> Btw, about single linux device handling multiple VC IDs: I noticed that
>>>>> the DSI spec has an example, in which a DSI peripheral receives
>>>>> interlaced video, and the video packets containing even field have VC ID
>>>>> 0 and packets for odd field have VC ID 1. I'm not sure how relevant
>>>>> interlaced video is, but I think there's an example where having
>>>>> separate linux devices for each VC ID would be somewhat clumsy.
>>>> Ugh... that's pretty bad.
>>> I wonder if this scenario could not be solved just
>>> by allowing range of VCs per device, for example:
>>> dsi {
>>> #address-cells = <1>;
>>> #size-cells = <1>;
>>> panel_with_interleaved_vc@0 {
>>> reg = <0, 2>;
>>> };
>>> };
>>
>> I don't think range is good, as then you can't have, say, VC IDs 0 and
>> 2. But giving the VC IDs individually as I did in my recent reply,
>> should do the same thing as above, without ranges.
>>
>> It's still open to me if that method is good or not.
>
> I think we can actually support both of those variants with the same
> binding. #address-cells = <1> and #size-cells = <0> means that every
> device has a single address, which matches Tomi's example:
>
> dsi {
> peripheral@0 {
> reg = <0, /* first VC ID */
> 2>; /* second VC ID */
> };
> };
>
> The difference to what Andrzej proposed is that we additionally have
> #size-cells = <1>, which implies each entry in reg can have a "size" as
> well:
>
> dsi {
> peripheral@0 {
> reg = <0 2>; /* VC IDs 0 and 1 */
> };
> };
>
> While I could be wrong of course, I do think that the former is unlikely
> since it's much easier to support consecutive addresses than completely
> separate ones. Or perhaps it isn't. Either way I think the binding would
> support both of those cases.
Right, and even if #size-cells = <1>, you can have multiple distinct VC IDs:
/* two ranges, 0-0 and 2-2 */
reg = <0 1 2 1>;
If there's a simple to use of_xxx helper function to get the VC IDs in
any case, I think we can easily support all those cases.
But if we need to parse the reg ourselves, and have different code paths
for #size-cells 0 and 1, I'd rather stick to the simplest model. No
point in having lots of code lines to handle different #size-cells, as
we most likely just one one VC ID.
I do agree that consecutive VC IDs sounds much more probable. However,
array of VC IDs work for all cases, but a (single) range doesn't. And we
can only have 4 VC IDs, so the biggest array would be <0 1 2 3>.
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2013-12-13 12:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 16:25 [RFC v2 PATCH] mipi-dsi-bus: add MIPI DSI bus support Andrzej Hajda
2013-11-22 17:41 ` Thierry Reding
2013-11-25 15:05 ` Andrzej Hajda
2013-11-27 10:54 ` Thierry Reding
2013-11-29 15:28 ` Andrzej Hajda
2013-12-02 10:22 ` Thierry Reding
2013-12-05 14:37 ` Tomi Valkeinen
2013-12-06 12:54 ` Thierry Reding
2013-12-09 11:34 ` Tomi Valkeinen
2013-12-09 13:10 ` Thierry Reding
2013-12-09 15:05 ` Tomi Valkeinen
2013-12-09 16:10 ` Thierry Reding
2013-12-10 9:19 ` Tomi Valkeinen
2013-12-12 12:19 ` Thierry Reding
2013-12-13 11:21 ` Tomi Valkeinen
2013-12-13 11:22 ` Andrzej Hajda
2013-12-13 11:29 ` Tomi Valkeinen
2013-12-13 12:06 ` Thierry Reding
2013-12-13 12:23 ` Tomi Valkeinen [this message]
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=52AAFC38.709@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kyungmin.park@samsung.com \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox