Unable to get the value of EDID with get-edid in TX1

I use the command “get-edid” to get the value of EDID, it’s okay in the tk1, but is not work in the TX1 even the common board.
I get the result like this:

=======================================================================================================
No EDID on bus 0
No EDID on bus 1
No EDID on bus 3
No EDID on bus 4
No EDID on bus 5
No EDID on bus 6
Bus 2 doesn’t really have an EDID…

I still can get the EDID value by xrandr --verbose :

========================================================================================================
ubuntu@tegra-ubuntu:~/Desktop/read-edid-3.0.2/get-edid$ xrandr --verbose
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
HDMI-0 connected primary 1920x1080+0+0 (0x18c) normal (normal left inverted right x axis y axis) 530mm x 300mm
Identifier: 0x18b
Timestamp: 21090
Subpixel: unknown
Gamma: 1.0:1.0:1.0
Brightness: 1.0
Clones:
CRTC: 0
CRTCs: 0
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
TegraOverlayBlendmode: Opaque
supported: Opaque, SourceAlphaBlend, PremultSourceAlphaBlend
TegraOverlayPriority: 255
range: (0, 255)
EDID:
00ffffffffffff005a6331bb01010101
231a010380351e782e6435a5544f9e27
125054bfef80b300a940950090408180
814081c00101023a801871382d40582c
4500132b2100001e000000ff00554732
3136333530303839390a000000fd0018
900fb422000a202020202020000000fc
0058473234303120534552494553018d
020323f14e90050403071f1421221312
013f4023097f078301000067030c0010
000044023a801871382d40582c450013
2b2100001ea483806a70384d400820f8
0c132b2100001c011d007251d01e206e
285500132b2100001e8c0ad08a20e02d
10103e9600132b210000180000000000
000000000000000000000000000000df

===================================================================================================

I change the source code of get-edid command to let it show the result which get from the file /dev/i2c-2, the value is always the same in any monitor ,the value is :

====================================================================================================
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 01 00 0d 00 84 08 e8 03 04 50 00 00 00 00 00 00 ?.?.???P…
10: 00 00 a0 0e 36 39 39 2d 38 32 31 38 30 2d 31 30 …??699-82180-10
20: 30 30 2d 34 30 30 20 50 2e 30 ff ff ff ff ff ff 00-400 P.0…
30: ff ff 95 78 66 4b 04 00 96 78 66 4b 04 00 00 00 …?xfK?.?xfK?..
40: 00 00 00 00 97 78 66 4b 04 00 30 33 32 33 36 31 …?xfK?.032361
50: 36 31 32 33 37 34 34 ff ff ff ff ff ff ff ff ff 6123744…
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff …
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff …
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff …
90: ff ff ff ff ff ff 4e 56 43 42 1c 00 4d 31 00 00 …NVCB?.M1…
a0: 95 78 66 4b 04 00 96 78 66 4b 04 00 97 78 66 4b ?xfK?.?xfK?.?xfK
b0: 04 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ?..
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff …
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff …
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff …
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff d8 …?

What should I do to use the get-edid to get the correct EDID value?

Check if the “/sys” file has EDID. What do you get from this:

sudo -s
cat `find /sys -name 'edid'`
exit

If you have that, then it is a problem specific to “get-edid”. Beware that the TK1 and TX1 are very different in their software…they’re not even the same architecture.

I had tried this and can get the correct EDID like use the command ‘xrandr --verbose’.
The source code of ‘get-edid’ is to control the i2c to read the value.
The code is like:

 	i2cfile = open("/dev/i2c-2", O_RDWR);

    struct i2c_smbus_ioctl_data args;

    ioctl(i2c,I2C_SMBUS,&args);

================================================================================================

It is ok in tk1, but is the control not correct in TX1??

I’ve seen this myself, but am unable to say why get-edid can fail even if EDID data is present. The workaround I know of is to read the EDID file from “/sys”. My thought is that perhaps get-edid sees something non-standard from the EDID data and does not correctly realize this is EDID. Perhaps someone from NVIDIA could comment on how to directly read the HDMI’s i2c.

This one needs to enable ddc power because we disable ddc power after HDMI driver reads edid from i2c.

The full steps for get-edid to work are as below.

sudo -s
echo 1 > /sys/kernel/debug/tegra_hdmi/ddc_power_toggle
get-edid  |parse-edid
echo 0 > /sys/kernel/debug/tegra_hdmi/ddc_power_toggle

This is one of those “I should have known” mysteries, but it adds a new question: Since xrandr can read EDID even with the i2c rail off, how does xrandr achieve an answer? Does it momentarily add power, or does it bypass i2c and use a non-i2c method?

I need to check how xrandr works from source, but I guess this is similar to the debugfs under tegradc which also has a copy of edid. Xorg just reads it.

If I don’t use the hdmi port but change to dp port, is there any setting to let the dp port appear on the i2c ?

I am not sure. We don’t verify dp on TX1. According to the driver code, seems there is no ops for disabling ddc power. I guess you could try it.

BTW, if you have experience enabling DP on TX1, could you share it with other forum users? It would be very helpful.