Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Update
xf86-video-intel.6276
U_sna-Acquire-cursor-before-use-in-sna_cursor_s...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_sna-Acquire-cursor-before-use-in-sna_cursor_set_posi.patch of Package xf86-video-intel.6276
From 0472b1f0fe1510c9709279d30ae033d766f44118 Mon Sep 17 00:00:00 2001 From: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue, 15 Nov 2016 22:01:10 +0000 Subject: [PATCH] sna: Acquire cursor before use in sna_cursor_set_position() sna_cursor_set_position() requires an already computed cursor transformation matrix in order to determine whether the cursor is visible. This is computed in __sna_get_cursor() which is currently only called for visible cursors - i.e. we were using uninitialised state. Reported-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- src/sna/sna_display.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -6041,6 +6041,14 @@ sna_set_cursor_position(ScrnInfoPtr scrn if (sna_crtc->bo == NULL) goto disable; + cursor = __sna_get_cursor(sna, crtc); + if (cursor == NULL) + cursor = sna_crtc->cursor; + if (cursor == NULL) { + __DBG(("%s: failed to grab cursor, disabling\n", __FUNCTION__)); + goto disable; + } + if (crtc->transform_in_use) { int xhot = sna->cursor.ref->bits->xhot; int yhot = sna->cursor.ref->bits->yhot; @@ -6065,15 +6073,6 @@ sna_set_cursor_position(ScrnInfoPtr scrn 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) - cursor = sna_crtc->cursor; - if (cursor == NULL) { - __DBG(("%s: failed to grab cursor, disabling\n", - __FUNCTION__)); - goto disable; - } - if (sna_crtc->cursor != cursor || sna_crtc->last_cursor_size != cursor->size) { arg.flags |= DRM_MODE_CURSOR_BO; arg.handle = cursor->handle;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor