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

Chris Wilson ickle at kemper.freedesktop.org
Wed Aug 13 00:00:07 PDT 2014


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

New commits:
commit d974dabc8ac06e76bffe5824caf86fd072c35ed3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Aug 13 07:58:57 2014 +0100

    sna: Relax the square cursor assumption
    
    Internally only use a square cursor, but 845g/865g actually supports
    rectangular cursors (as they have a relaxed cursor height restriction).
    
    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 04e9a41..7ed3130 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -4836,11 +4836,10 @@ sna_cursor_pre_init(struct sna *sna)
 	if (drmIoctl(sna->kgem.fd, LOCAL_IOCTL_GET_CAP, &cap) == 0)
 		sna->cursor.max_size = cap.value;
 
-#if HAS_DEBUG_FULL
 	cap.name = DRM_CAP_CURSOR_HEIGHT;
-	if (drmIoctl(sna->kgem.fd, LOCAL_IOCTL_GET_CAP, &cap) == 0)
-		assert(sna->cursor.max_size == cap.value);
-#endif
+	if (drmIoctl(sna->kgem.fd, LOCAL_IOCTL_GET_CAP, &cap) == 0 &&
+	    cap.value < sna->cursor.max_size)
+		sna->cursor.max_size = cap.value;
 
 	v = -1; /* No param uses the sign bit, reserve it for errors */
 	if (sna->kgem.gen >= 033) {


More information about the xorg-commit mailing list