RGB full range HDMI Output

Hi,

we are using the X11 windows system right now. I read the vmode variable with

cat /sys/kernel/debug/tegradc.0/mode

Setting the color range in xorg.conf also changes the FB_VMODE_LIMITED_RANGE bit accordingly (I assume FB_VMODE_LIMITED_RANGE bit is 1 when limited range is active). After setting the color range to limited range the error is minimized to 1 (strange, because we are capturing in full range) but is still present in many gray levels.
profile_1_red
After adjusting the default_srgb_regamma_lut[] in nvdisp.c we were able to eliminiate some errors at the higher gray levels, but also added errors at the lower levels.
profile_gammaLUT_1_red
This was achieved by empirically changing the values of the default_srgb_regamma_lut[] in nvdisp.c. Could someone provide information on how exactly this LUT works and what the values of this LUT represent?

Thanks in advance!

Best regards
Bruno