Disabling Dithering/Color Correction on external display output for Jetson TX2

Hello All,

I’ve been having a frustrating issue with the external video output of the TX2 module. Our application needs direct RGB output with no color correction or manipulation of the video bits as it goes out to a Display Port device. Under default operation, there is definite color correction being applied to the video output. The artifacts in our application that stem from this color correction can be replicated on a consumer Linux laptop with an NVIDIA graphics card: setting Dithering to Enabled within nvidia-settings creates the same color correction artifacts and the artifacts are removed by subsequently disabling dithering. As such, I think the nvidia driver/SoC graphics are applying dithering to our video output. To the end of disabling dithering/color correction, so far I’ve tried:

  • using nvidia-settings on the TX2 device; the program appears to work as normal, but none of the display outputs have a Dithering Controls section. I also tried interfacing with the NvCtrl xserver extension directly by extending one of the samples in the nvidia-settings repository. My binary is able to set/unset the dithering setting just fine on my linux laptop with an nvidia graphics card, but does not work on the TX2 where the NV_CTRL_DITHERING attribute appears to not exist.
  • creating a
disp-default-out {
    nvidia,dither = <TEGRA_DC_DISABLE_DITHER>;

section in the device tree for all the display port related device tree nodes. After rebuilding the kernel with OF_DC_DEBUG enabled (and fixing a couple broken OF_DC_LOG lines) I can see that the device tree changes are at least being read, as I get a OF_DC_LOG: dither option 1 line in dmesg for the display port head connection.

  • modifying the parts of the kernel that appear to set the color control options. Each spot that had a switch that examined the desired dither mode, I overrode to always use DITHER_CONTROL_DISABLE

None of these approaches appeared to change the Display Port output at all as far as the color correction artifacts. Any advice on how to configure or entirely disable the color correction on the video output of the TX2 would be appreciated.

Please apply this and give it a try:
Different RGB values from expected at output from Jetson Xavier NX Developer Kit - #9 by smaximz

Performing the commands in the thread you sent definitely changes the output of the display controller, but it still isn’t quite functioning as expected. I’ll perform some tests to see if its now on my end or still the video output being modified.

After some investigation, the solution was as indicated in the linked post

echo 0 | sudo tee /sys/class/graphics/fb1/device/cmu_enable
echo 1 | sudo tee /sys/kernel/debug/tegradc.common/tegra_win.5/degamma/force_user_degamma

but n.b. the window index was tegra_win.5 in my case. Also a bit confusingly, the cmu_enable write takes effect immediately, whereas the force_user_degamma command required restarting my program/reinstantiating the NvDrmRenderer which lead to some confusion as to if it was working.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.