xserver/hw/xfree86/modes
Mario Kleiner 7326e131df xfree86: Let xf86RandR12CrtcComputeGamma() deal with non-power-of-2 sizes.
The assumption in the upsampling code was that the crtc->gamma_size
size of the crtc's gamma table is a power of two. This is true for
almost all current driver + gpu combos at least on Linux, with typical
sizes of 256, 512, 1024 or 4096 slots.

However, Intel Gen-11 Icelake and later are outliers, as their gamma
table has 2^18 + 1 slots, very big and not a power of two!

Try to make upsampling behave at least reasonable: Replicate the
last gamma value to fill up remaining crtc->gamma_red/green/blue
slots, which would normally stay uninitialized. This is important,
because while the intel display driver does not actually use all
2^18+1 values passed as part of a GAMMA_LUT, it does need the
very last slot, which would not get initialized by the old code.

This should hopefully create reasonable behaviour with Icelake+
but is untested on the actual Intel hw due to lack of suitable
hw.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2021-09-27 09:44:48 +00:00
..
Makefile.am xfree86: Move xf86CVTMode() function 2021-08-06 11:29:29 +00:00
meson.build xfree86: Move xf86CVTMode() function 2021-08-06 11:29:29 +00:00
xf86Crtc.c hw/xfree86: Propagate physical dimensions from DRM connector 2021-06-15 13:21:11 +00:00
xf86Crtc.h Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
xf86Cursors.c Add RandR leases with modesetting driver support [v6] 2018-02-27 12:39:50 -05:00
xf86DiDGA.c xserver: Unifdef HAVE_CONFIG_H 2017-03-23 13:19:51 -04:00
xf86EdidModes.c Fix spelling/wording issues 2020-07-05 13:07:33 -07:00
xf86Modes.c xfree86: Move xf86CVTMode() function 2021-08-06 11:29:29 +00:00
xf86Modes.h Eliminate the use of xf86Rename.h 2013-04-24 10:22:20 -07:00
xf86RandR12.c xfree86: Let xf86RandR12CrtcComputeGamma() deal with non-power-of-2 sizes. 2021-09-27 09:44:48 +00:00
xf86RandR12.h xfree86: Hook up colormaps and RandR 1.2 gamma code v6 2016-07-28 10:12:05 +09:00
xf86Rotate.c xserver/output: rename some badly named variables/APIs. 2020-07-10 06:17:44 +10:00
xf86gtf.c xserver: Unifdef HAVE_CONFIG_H 2017-03-23 13:19:51 -04:00