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>
This commit is contained in:
Chris Wilson 2014-08-13 07:58:57 +01:00
parent ec10cef592
commit d974dabc8a
1 changed files with 3 additions and 4 deletions

View File

@ -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) {