osresearch / pixel-wrangler

HDMI to whatever adapter
104 stars 2 forks source link

EDID read is flaky #17

Closed osresearch closed 1 year ago

osresearch commented 1 year ago

We have a good EDID rom image thanks to #3, but the i2c emulator is flaky depending on the access mode.

The kernel rejects it at boot time:

[    3.135828] i915 0000:00:02.0: HDMI-A-2: EDID is invalid:
[    3.135830]  [00] BAD  00 ff ff ff ff ff ff 00 00 43 0c 01 00 40 ce 01
[    3.135830]  [00] BAD  00 ff 21 01 04 a2 40 30 78 06 ee 95 a3 54 4c 99
[    3.135831]  [00] BAD  26 0f 50 54 20 00 00 01 01 01 01 01 01 01 01 01
[    3.135831]  [00] BAD  01 01 01 01 01 01 01 d5 09 80 a0 20 e0 2d 10 10
[    3.135831]  [00] BAD  60 a2 00 00 00 00 00 00 18 00 00 00 fc 00 50 69
[    3.135832]  [00] BAD  78 65 6c 57 72 61 6e 67 6c 65 72 00 00 00 00 00
[    3.135832]  [00] BAD  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    3.135832]  [00] BAD  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

there is a duplicate 00 00 at address 0x7 for some reason. get-edid doesn't see it and i2cdump -y 1 0x50 also doesn't, unless it is read with -i for i2c block mode:

sudo i2cdump  -y 1 0x50 i
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 00 ff ff ff ff ff ff 00 43 0c 01 00 40 ce 01    .........C??.@??
10: 00 ff 21 01 04 a2 40 30 78 06 ee 95 a3 54 4c 99    ..!???@0x????TL?
20: 0f 0f 50 54 20 00 00 01 01 01 01 01 01 01 01 01    ??PT ..?????????
30: 01 01 01 01 01 01 01 d5 09 80 a0 20 e0 2d 10 10    ??????????? ?-??
40: a2 a2 00 00 00 00 00 00 18 00 00 00 fc 00 50 69    ??......?...?.Pi
50: 78 65 6c 57 72 61 6e 67 6c 65 72 00 00 00 00 00    xelWrangler.....
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
osresearch commented 1 year ago

Compared to byte-at-a-time reads that return the correct data:

sudo i2cdump  -y 1 0x50
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 00 ff ff ff ff ff ff 00 43 0c 01 00 40 ce 01 00    ........C??.@??.
10: ff 21 01 04 a2 40 30 78 06 ee 95 a3 54 4c 99 26    .!???@0x????TL?&
20: 0f 50 54 20 00 00 01 01 01 01 01 01 01 01 01 01    ?PT ..??????????
30: 01 01 01 01 01 01 d5 09 80 a0 20 e0 2d 10 10 60    ?????????? ?-??`
40: a2 00 00 00 00 00 00 18 00 00 00 fc 00 50 69 78    ?......?...?.Pix
50: 65 6c 57 72 61 6e 67 6c 65 72 00 00 00 00 00 00    elWrangler......
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e5    ...............?
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
osresearch commented 1 year ago

oops. we were sending the first byte twice. now plugging in works and selects the correct mode!