xf86-video-intel: src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Aug 8 02:28:43 PDT 2014


 src/sna/sna_display.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 59f0374188e6d2eb2fd18e3dfb517087e09ae13f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Aug 8 10:26:13 2014 +0100

    sna: Restore the clear before pwriting the cursor
    
    Along the legacy phys cursor path, we use a common scratch buffer. As
    this is global, we need to be careful not to trust the cursor local
    dirty tracking and be sure to clear the image before uploading.
    
    Reported-by: Dirk Griesbach
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82337
    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 87defbe..277e238 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -4232,6 +4232,7 @@ static struct sna_cursor *__sna_create_cursor(struct sna *sna, int size)
 	c->serial = 0;
 	c->rotation = 0;
 	c->last_width = c->last_height = 0; /* all clear */
+	c->size = size;
 
 	sna->cursor.num_stash--;
 	sna->cursor.stash = c->next;
@@ -4317,8 +4318,10 @@ static struct sna_cursor *__sna_get_cursor(struct sna *sna, xf86CrtcPtr crtc)
 	pitch = BitmapBytePad(width);
 
 	image = cursor->image;
-	if (image == NULL)
+	if (image == NULL) {
 		image = sna->cursor.scratch;
+		cursor->last_width = cursor->last_height = size;
+	}
 	if (size > cursor->size ||
 	    width < cursor->last_width ||
 	    height < cursor->last_height ||


More information about the xorg-commit mailing list