sna: Reuse the old cursor on the current CRTC

We only want to prevent sharing of physical handles across CRTC (on old
kernels). If we already have one assigned to a CRTC we know that it is
unshared and can keep using it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2015-02-18 09:59:58 +00:00
parent 127aae5a72
commit e293991f40
1 changed files with 1 additions and 2 deletions

View File

@ -4674,11 +4674,10 @@ static struct sna_cursor *__sna_get_cursor(struct sna *sna, xf86CrtcPtr crtc)
return cursor;
}
}
cursor = to_sna_crtc(crtc)->cursor;
}
size = sna->cursor.size;
cursor = to_sna_crtc(crtc)->cursor;
if (cursor && cursor->alloc < 4*size*size)
cursor = NULL;