diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-11-29 22:01:21 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-11-30 23:54:05 +0000 |
commit | 9ac7a3370ab265d4cbdbbf3dc588af88c37048e1 (patch) | |
tree | c6dd5ffc2286e552efa7f79638187ec1d222d708 /src/sna/sna_display_fake.c | |
parent | f2901dd34d371113cb9ebe70ef91f700f45f7729 (diff) |
sna: Handle xf86Randr12 gamma changes in xorg-xserver-1.19
commit 17213b74fd7fc4c4e2fe7a3781e7422dd482a0ab
Author: Michel Dänzer <michel.daenzer@amd.com>
Date: Tue Jun 21 16:44:20 2016 +0900
xfree86/modes: Remove xf86RandR12CrtcGetGamma
removed the randr_crtc->palettes allocation and initialisation causing a
later dereference of the gamma table to crash. Looks like that was just
ABI misuse.
References: https://bugs.freedesktop.org/show_bug.cgi?id=98855
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display_fake.c')
-rw-r--r-- | src/sna/sna_display_fake.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/sna/sna_display_fake.c b/src/sna/sna_display_fake.c index f0bdea63..fa26bda1 100644 --- a/src/sna/sna_display_fake.c +++ b/src/sna/sna_display_fake.c @@ -96,12 +96,6 @@ sna_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, } static void -sna_crtc_gamma_set(xf86CrtcPtr crtc, - CARD16 *red, CARD16 *green, CARD16 *blue, int size) -{ -} - -static void sna_crtc_destroy(xf86CrtcPtr crtc) { } @@ -109,7 +103,6 @@ sna_crtc_destroy(xf86CrtcPtr crtc) static const xf86CrtcFuncsRec sna_crtc_funcs = { .dpms = sna_crtc_dpms, .set_mode_major = sna_crtc_set_mode_major, - .gamma_set = sna_crtc_gamma_set, .destroy = sna_crtc_destroy, }; @@ -298,7 +291,8 @@ static bool add_fake_output(struct sna *sna, bool late) RRCrtcSetRotations(crtc->randr_crtc, RR_Rotate_All | RR_Reflect_All); - RRCrtcGammaGet(crtc->randr_crtc); + if (!RRCrtcGammaSetSize(crtc->randr_crtc, 256)) + goto err; } sna->mode.num_fake++; |