From 9ac7a3370ab265d4cbdbbf3dc588af88c37048e1 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 29 Nov 2016 22:01:21 +0000 Subject: sna: Handle xf86Randr12 gamma changes in xorg-xserver-1.19 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 17213b74fd7fc4c4e2fe7a3781e7422dd482a0ab Author: Michel Dänzer 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 --- src/sna/sna_display_fake.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/sna/sna_display_fake.c') 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 @@ -95,12 +95,6 @@ sna_crtc_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, return TRUE; } -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++; -- cgit v1.2.3