modesetting: Enable GAMMA_LUT for lut's with up to 4096 slots.

A lut size of 4096 slots has been verified to work correctly,
as tested with amdgpu-kms. Intel Tigerlake Gen12 hw has a very
large GAMMA_LUT size of 262145 slots, but also issues with its
current GAMMA_LUT implementation, as of Linux 5.14.

Therefore we keep GAMMA_LUT off for large lut's. This currently
excludes Intel Icelake, Tigerlake and later.

This can be overriden via the "UseGammaLUT" boolean xorg.conf option
to force use of GAMMA_LUT on or off.

See following link for the Tigerlake situation:
drm/intel#3916 (comment 1085315)

Signed-off-by: Mario Kleiner <>
5 jobs for gammalutfix in 4 minutes and 30 seconds (queued for 1 second)
Status Name Job ID Coverage
  Docker Image
passed debian-buster #14500711


  Build And Test
passed autotools #14500713


passed meson #14500715


passed meson-noglamor #14500716


passed mingw-cross-build #14500717