Skip to content

modesetting: Only use GAMMA_LUT if its size is 1024

Aaron Plattner requested to merge aplattner/xserver:gamma-lut-1024 into master

GAMMA_LUT sizes other than 1024 cause a crash during startup if the memcpy() calls in xf86RandR12CrtcSetGamma() read past the end of the legacy X11 / XVidMode gamma ramp.

This is a problem on Intel ICL / GEN11 platforms because they report a GAMMA_LUT size of 262145. Since it's not clear that the modesetting driver will generate a proper gamma ramp at that size even if xf86RandR12CrtcSetGamma() is fixed, just disable use of GAMMA_LUT for sizes other than 1024 for now. This will cause the modesetting driver to disable the CTM property and fall back to the legacy gamma LUT.

Signed-off-by: Aaron Plattner Fixes: #1193 (closed)

Edited by Aaron Plattner

Merge request reports