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

Chris Wilson ickle at kemper.freedesktop.org
Fri Jun 13 03:47:45 PDT 2014


 src/sna/sna_display.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 87fc78ac4f6bbfa8e9427d392356ee26942bf955
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Jun 13 10:52:47 2014 +0100

    sna: Try to reuse the current cursor if we fail to update
    
    As a last resort, continue to display the old cursor if we tried and
    failed to create a new cursor.
    
    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 251d305..5e6de55 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -4226,7 +4226,9 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
 		if (arg.x < crtc->mode.HDisplay && arg.x > -sna->cursor.size &&
 		    arg.y < crtc->mode.VDisplay && arg.y > -sna->cursor.size) {
 			cursor = __sna_get_cursor(sna, crtc);
-			if (cursor == NULL) {
+			if (cursor == NULL)
+				cursor = sna_crtc->cursor;
+			if (cursor == NULL || cursor->size > sna->cursor.size) {
 				__DBG(("%s: failed to grab cursor, disabling\n",
 				       __FUNCTION__));
 				goto disable;
@@ -4241,8 +4243,8 @@ sna_set_cursor_position(ScrnInfoPtr scrn, int x, int y)
 			arg.flags |= DRM_MODE_CURSOR_MOVE;
 			crtc->cursor_in_range = true;
 		} else {
-disable:
 			crtc->cursor_in_range = false;
+disable:
 			if (sna_crtc->cursor) {
 				arg.flags = DRM_MODE_CURSOR_BO;
 				arg.width = arg.height = 0;


More information about the xorg-commit mailing list