Problems when set Limited/Full Color Range for TX2

We are using TX2. The release version is Tegra186_Linux_R28.2.1.
For some purpose, it is needed to set the quantization range of HDMI.
Refer to:
https://devtalk.nvidia.com/default/topic/1032776/jetson-tx2/limited-full-color-range-by-default/post/5255179/#5255179
https://devtalk.nvidia.com/default/topic/1028918/rgb-full-range-0-255-on-hdmi/

We use Option “ColorRange” “Full”&Option “ColorRange” “Limited” in xorg.conf to change quantizaiton range.

A HDMI capture card of Magewell (http://www.magewell.com/products/eco-capture-hdmi-4k-m2) is used. The capture card analyzed HDMI stream from TX2, so we can read the HDMI quantization flag. what is more, we can capture pics to compare with the original pic.

Two EDID files were loaded to the capure card, named EDID-1 EDID-2.

when testing with different EDID-file and xorg-option, VMODE word is recorded with “sudo cat /sys/kernel/debug/tegradc.0/mode | grep vmode”.

Then, these is the test result:
Loading EDID-1 to HDMI capture card:

  1. With Option “ColorRange” “Full”,“Full” was monitored by card, VMODE=0xC00000, the capture pic was the same as the origin.
  2. With Option “ColorRange” “Limited”,“Full” was monitored by card, VMODE=0x10C00000, the capture pic had been change from the origin.

Loading EDID-2 to HDMI capture card:

  1. With Option “ColorRange” “Full”,“Limited” was monitored by card, VMODE=0x400000, the capture pic was the same as the origin.
  2. With Option “ColorRange” “Limited”,“Limited” was monitored by card, VMODE=0x10400000, the capture pic had been change from the origin.

It seems xorg.conf only changed the VMODE setting, but never set quantization flag in the HDMI protocal. Quantization flag in the HDMI protocal is decided by EDID bytes.

EDID-1:
00 ff ff ff ff ff ff 00 34 f7 00 d1 4e 61 bc 00
01 14 01 03 80 30 1b 78 0f ee 95 a3 54 4c 99 26
0f 50 54 ff ff 80 81 00 81 40 81 80 95 00 a9 40
b3 00 d1 00 d1 40 e2 68 00 a0 a0 40 2e 60 30 20
36 00 c4 8e 21 00 00 1a 28 3c 80 a0 70 b0 23 40
30 20 36 00 c4 8e 21 00 00 1a 00 00 00 fc 00 58
49 31 30 30 44 45 20 34 4b 0a 20 20 00 00 00 fd
00 19 78 0c ff 1e 00 00 00 00 00 00 00 00 01 4b
02 03 32 71 4f 06 15 02 11 13 04 14 05 20 21 22
1f 10 40 3f 26 0f 7f 07 09 7f 07 83 2f 00 00 72
03 0c 00 20 00 88 3c 20 c0 84 01 02 03 04 01 41
ff ff 04 74 00 30 f2 70 5a 80 b0 58 8a 00 c4 8e
21 00 00 1e 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84

EDID-2:
00 ff ff ff ff ff ff 00 34 f7 00 e1 4e 61 bc 00
01 19 01 03 80 30 1b 78 07 ee 95 a3 54 4c 99 26
0f 50 54 ff ff 80 81 c0 81 00 81 40 95 00 a9 40
b3 00 d1 c0 d1 00 f3 39 80 18 71 38 2d 40 58 2c
45 00 c4 8e 21 00 00 1a 28 3c 80 a0 70 b0 23 40
30 20 36 00 c4 8e 21 00 00 1e 00 00 00 fc 00 50
72 6f 20 43 61 70 74 75 72 65 0a 20 00 00 00 fd
00 19 78 0c 78 11 00 0a 20 20 20 20 20 20 01 d4
02 03 2f 71 50 01 02 03 04 05 90 11 12 13 14 1f
20 21 22 06 15 26 0f 7f 07 09 7f 07 83 2f 00 00
6e 03 0c 00 20 00 f8 2d 20 c0 04 01 41 ff ff f3
39 80 18 71 38 2d 40 58 2c 45 00 c4 8e 21 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8d

Hi PeterHou,

My suggestion here:

  1. Move the test to rel-28.3 and see if anything changes. If this is indeed a bug, our engineers would start debug at rel-28.3 but not rel-28.2.1.

  2. Could you elaborate these cases?

1. With Option "ColorRange" "Full","Full" was monitored by card, VMODE=0xC00000, the capture pic was the same as the origin.
2. With Option "ColorRange" "Limited","Full" was monitored by card, VMODE=0x10C00000, the capture pic had been change from the origin.
Loading EDID-2 to HDMI capture card:
1. With Option "ColorRange" "Full","Limited" was monitored by card, VMODE=0x400000, the capture pic was the same as the origin.
2. With Option "ColorRange" "Limited","Limited" was monitored by card, VMODE=0x10400000, the capture pic had been change from the origin.

How do you know the “full” was monitored by the card? You already saw difference between original pic and the new one. It means jetson indeed output difference format.
Also, same question to edid-2 case. How do you know it is limited range?

Could you firstly remove the setting in xorg.conf and see what is the default vmode?
AFAIK, if the EDID supports full range, then our xorg server would tell kernel driver to dump full range frame. Otherwise, it would dump limited.

  1. You could add some debug log in hdmi2.0.c -> tegra_hdmi_avi_infoframe_update() and see what is return by “tegra_hdmi_get_rgb_quant”

Thanks for the reply. I will continue to test with the suggestion 1&3.

How do you know the "full" was monitored by the card? You already saw difference between original pic and the new one. It means jetson indeed output difference format.
Also, same question to edid-2 case. How do you know it is limited range?

The card offers a script, which can monitor the HDMI stream information. It is like below.

Input common
  Video input ............................ HDMI
  Audio input ............................ HDMI
  Auto scan .............................. Yes
  AV Link ................................ Yes

Input video
  Signal state ........................... Locked
  Resolution ............................. 1920x1080p 60.01 Hz
  Aspect ................................. 16:9
  Total size ............................. 2200x1125
  X offset ............................... 192
  Y offset ............................... 41
  Color space ............................ RGB
  Quantization ........................... Limited
  Saturation ............................. Limited
Could you firstly remove the setting in xorg.conf and see what is the default vmode?

Loading EDID-1 to HDMI capture card:

  1. With Non Option,“Full” was monitored by card, VMODE=0xC00000, the capture pic was the same as the origin.

Loading EDID-2 to HDMI capture card:

  1. With Non Option,“Limited” was monitored by card, VMODE=0x400000, the capture pic had been change from the origin.

The problem here is that we are not sure which result is the correct one.
According to the vmode, edid-1 should support full range but edid-2 does not. However, your card show difference.

Thus, I would suggest to add debug log inside kernel driver as I mentioned in (3). That would tell you what is exactly sent out from our hardware.

I know some edid file does not support full range. But for the EDID-2, it does not change VMODE at the same time as setting the LIMITED flag of HDMI protocol. then the monitor get the wrong display.
I will continue to work with the latest release and the kernel driver.
Thanks!

Hi PeterHou,

Please update if you have any result. Thanks.