Linux-Media Archive mirror
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: Sebastian Wick <sebastian.wick@redhat.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] edid-decode: Cannot support NonMixed MS without MS
Date: Wed, 5 Jun 2024 08:00:46 +0200	[thread overview]
Message-ID: <1e8f0155-1b8b-4bb4-8358-5854e991910d@xs4all.nl> (raw)
In-Reply-To: <CA+hFU4yNeQmJRNZT2eSKtdX6pSv-oixNRRj-O5--8R-gK5oo6w@mail.gmail.com>

On 04/06/2024 18:57, Sebastian Wick wrote:
> On Wed, May 29, 2024 at 4:16 PM Hans Verkuil <hverkuil-cisco@xs4all.nl> wrote:
>>
>> Hi Sebastian,
>>
>> On 29/05/2024 12:02, Sebastian Wick wrote:
>>> When `Max Stream Count` is zero, the sink does not support multistream
>>> and thus cannot support NonMixed MS.
>>>
>>> An EDID with Max Stream Count = 0 and Non Mixed MS = 1 can be found in
>>> linuxhw/EDID ./Digital/TCL/TCL5655/1723FF2DC6D1 at commit cff7fe4d44.
>>>
>>> Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
>>> ---
>>>  parse-cta-block.cpp | 7 ++++---
>>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>>
>>> diff --git ./parse-cta-block.cpp ../parse-cta-block.cpp
>>> index 4d2afc6..7cd7a3a 100644
>>> --- ./parse-cta-block.cpp
>>> +++ ../parse-cta-block.cpp
>>> @@ -2498,10 +2498,11 @@ static void cta_hdmi_audio_block(const unsigned char *x, unsigned length)
>>>               fail("Empty Data Block with length %u.\n", length);
>>>               return;
>>>       }
>>> -     if (x[0] & 3)
>>> +     if (x[0] & 3) {
>>>               printf("    Max Stream Count: %u\n", (x[0] & 3) + 1);
>>> -     if (x[0] & 4)
>>> -             printf("    Supports MS NonMixed\n");
>>> +         if (x[0] & 4)
>>> +                 printf("    Supports MS NonMixed\n");
>>> +     }
>>
>> I would actually leave this as-is, but instead add a fail() message
>> if MS NonMixed is set, but Max Stream Count == 0.
>>
>> It's really an EDID conformity failure, and it should be reported as such.
> 
> I'm all for adding a fail() message but I'm afraid our implementation
> which tries to be compatible with the output here won't have access to
> the MS NonMixed bit when Max Stream Count == 0.
> 
> Would this work for you?
> 
>     if (x[0] & 3) {
>         printf("    Max Stream Count: %u\n", (x[0] & 3) + 1);
>         if (x[0] & 4)
>             printf("    Supports MS NonMixed\n");
>         else
>                 fail("NonMixed MS support indicated but MS is unsupported\n");
>     }

Correcting the logic that would be this:

	if (x[0] & 3) {
        	printf("    Max Stream Count: %u\n", (x[0] & 3) + 1);
		if (x[0] & 4)
			printf("    Supports MS NonMixed\n");
	} else if (x[0] & 4) {
		fail("MS NonMixed support indicated but Max Stream Count == 0.\n");
	}

And that works for me.

Regards,

	Hans

> 
>>
>> Regards,
>>
>>         Hans
>>
>>>
>>>       num_descs = x[1] & 7;
>>>       if (num_descs == 0)
>>
> 


      reply	other threads:[~2024-06-05  6:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-29 10:02 [PATCH] edid-decode: Cannot support NonMixed MS without MS Sebastian Wick
2024-05-29 14:07 ` Hans Verkuil
2024-06-04 16:57   ` Sebastian Wick
2024-06-05  6:00     ` Hans Verkuil [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=1e8f0155-1b8b-4bb4-8358-5854e991910d@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=sebastian.wick@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).