diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-13 07:58:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-08-13 07:58:57 +0100 |
commit | d974dabc8ac06e76bffe5824caf86fd072c35ed3 (patch) | |
tree | aada55968d369f3b5a4d98182f2556057c2a71cc | |
parent | ec10cef592b7a3d1dc3c4949778e72e8cd156245 (diff) |
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@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 04e9a414..7ed31305 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) { |