[PATCH xserver 1/5] modesetting: Don't call xf86HandleColorMaps() at screen depth 30.

Mario Kleiner mario.kleiner.de at gmail.com
Fri Feb 9 05:22:52 UTC 2018

On 02/08/2018 10:09 PM, Adam Jackson wrote:
> On Thu, 2018-02-08 at 12:14 +0100, Mario Kleiner wrote:
>> That in turn is a problem, because the size of the hw lut
>> crtc->gamma_size is fixed to 256 slots on all kms-drivers
>> when using the legacy gamma_set ioctl,
> What exactly is the non-legacy ioctl?
> - ajax

I don't know if legacy is the right term, but the new color management 
stuff (drivers/gpu/drm/drm_color_mgmt.c in the kernel), that is afaik 
part of atomic modesetting, is supposed to provide new options and more 

The old gamma_set ioctl() is probably limited to 256 slot lut's forever, 
because although the kernel exposes supported/expected gamma lut size as 
part of the getCrtc ioctl(), afaik none of the existing ddx drivers ever 
made use of that information. They all rely on the hard-coded X-Server 
startup default of 256 slots for crtc->gamma_size. If a kms driver would 
ever change expected lut size for the old gamma_set ioctl to anything 
other than 256, it would break all of existing userspace. Or we'd need 
to add some guess-o-matic to the kernel that accepts both the actual hw 
lut size and the 256 size for compatibility.


More information about the xorg-devel mailing list