xf86-video-intel: 3 commits - src/sna/sna_display.c src/sna/sna_display_fake.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Mar 14 08:35:51 UTC 2016


 src/sna/sna_display.c      |    1 +
 src/sna/sna_display_fake.c |    4 ++++
 2 files changed, 5 insertions(+)

New commits:
commit 3cc011ae11be6437241c3411bce1935ec0b187f5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Mar 14 08:32:15 2016 +0000

    sna: Avoid double-skipping when deleting arrays of CRTCs
    
    When we call xf86CrtcDestroy/xf86OutputDestroy the arrays are shrunk and
    the next pointer is then at the current location, so we need to take a
    step back when iterating over the entire array.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display_fake.c b/src/sna/sna_display_fake.c
index 7468326..f0bdea6 100644
--- a/src/sna/sna_display_fake.c
+++ b/src/sna/sna_display_fake.c
@@ -314,13 +314,16 @@ err:
 			continue;
 
 		xf86OutputDestroy(output);
+		i--;
 	}
 
 	for (i = 0; i < xf86_config->num_crtc; i++) {
 		crtc = xf86_config->crtc[i];
 		if (crtc->driver_private)
 			continue;
+
 		xf86CrtcDestroy(crtc);
+		i--;
 	}
 	sna->mode.num_fake = -1;
 	return false;
commit ba85e22c14ed243826d3edf35dd3813d23708d89
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Mar 14 08:26:54 2016 +0000

    sna: When creating CRTC after initialisation, manually create the RR gamma
    
    RRCrtcCreate does not automatically inherit the gamma ramp, but we must
    call RRCrtcGammaGet ourselves instead. Otherwise the ramp is left as 0
    and this will then overwrite our gamma on VT switch (as for whatever
    reason it is reapplied).
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94465
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display_fake.c b/src/sna/sna_display_fake.c
index a07fe0f..7468326 100644
--- a/src/sna/sna_display_fake.c
+++ b/src/sna/sna_display_fake.c
@@ -298,6 +298,7 @@ static bool add_fake_output(struct sna *sna, bool late)
 
 		RRCrtcSetRotations(crtc->randr_crtc,
 				   RR_Rotate_All | RR_Reflect_All);
+		RRCrtcGammaGet(crtc->randr_crtc);
 	}
 
 	sna->mode.num_fake++;
commit 02f67386a3d4046e816ede8c6de4061451696ccf
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Mar 14 08:23:38 2016 +0000

    sna: Set initial gamma_size to 256 when loading from hardware
    
    If the preallocated gamma ramp is not 256 elements in size we replace it
    with a fresh array that is. When doing so, we need to specify the new
    size.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 9821c59..9256300 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6661,6 +6661,7 @@ static void crtc_init_gamma(xf86CrtcPtr crtc)
 			crtc->gamma_red = gamma;
 			crtc->gamma_green = gamma + 256;
 			crtc->gamma_blue = gamma + 2*256;
+			crtc->gamma_size = 256;
 		}
 	}
 }


More information about the xorg-commit mailing list