Hi Hans,

On 01/10/2019 09:39, Hans Verkuil wrote:
> On 10/1/19 10:10 AM, Breno Leitao wrote:
>> There are some weird monitors that returns invalid data, as zeroed
>> Horizontal/Vertical Active/Blanking.
> 
> Do you have an EDID that does this? I'd like to add it to the collection
> of EDIDs in edid-decode.

Yes, This is an example. Is this what you want?

# cat /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1/edid | 
hexdump
0000000 ff00 ffff ffff 00ff 8f15 4600 72f0 0000
0000010 171e 0301 6680 7839 602a a19d 4954 269b
0000020 470f 234a 0008 c081 4081 8081 0095 00b3
0000030 c0d1 c08b 0101 3a02 1880 3871 402d 2c58
0000040 0045 3dfa 0032 1e00 2166 aa56 0051 301e
0000050 8f46 0033 3dfa 0032 1e00 0000 fd00 3000
0000060 1f3e 0f50 0a00 2020 2020 2020 0000 fe00
0000070 3100 3242 3343 3050 3430 3035 200a a101
0000080 0302 401b 1647 0431 0119 1803 0923 0707
0000090 0183 0000 0366 000c 0020 0180 001d 2e7c
00000a0 a090 1a60 401e 2030 0036 0ba2 0032 1a00
00000b0 0000 f700 0a00 ca00 60e0 0000 0000 0000
00000c0 0000 0000 fc00 4500 4f4c 4520 3454 3036
00000d0 4c30 2020 0000 0000 0000 0000 0000 0000
00000e0 0000 0000 0000 0000 0000 0000 0000 0000
00000f0 0000 0000 0000 0000 0000 0000 0000 c100
0000100

> 
> Some more nitpicks below:
> 
>>
>> This causes edid-decode to crash with a division by zero exception. This 
>> simple
>> patch avoids so, checking for the divisor before proceeding.
>>
>> Signed-off-by: Breno Leitao <lei...@debian.org>
>> ---
>>  edid-decode.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/edid-decode.c b/edid-decode.c
>> index 7442f8a..b932179 100644
>> --- a/edid-decode.c
>> +++ b/edid-decode.c
>> @@ -1022,6 +1022,16 @@ static int detailed_block(const unsigned char *x, int 
>> in_extension)
>>              break;
>>      }
>>  
>> +    if (!ha || !hbl || !va || !vbl) {
>> +            printf("Invalid Detailing Timings:\n"
> 
> Detailing -> Detailed
> 
>> +                   "Horizontal Active %4d\n"
>> +                   "Horizontal Blanking %4d\n"
> 
> This can be a bit more concise:
> 
>                       "Horizontal Active/Blanking: %d/%d\n"
> 
>> +                   "Vertical Active %4d\n"
>> +                   "Vertical Blanking %4d\n",
> 
> Ditto.

Ok, let me change it and send a v3.

Reply via email to