forked from pool/xorg-x11-server
Stefan Dirsch
9a694ffffc
- U_xfree86-Take-the-input-lock-for-xf86ScreenCheckHWCursor.patch * Add the missing input_lock() around the call into the driver's UseHWCursor() callback (bnc #1023845). - U_xfree86-Take-the-input-lock-for-xf86TransparentCursor.patch * The new input lock is missing for the xf86TransparentCursor() entry point (bnc #1023845). OBS-URL: https://build.opensuse.org/request/show/459511 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=656
66 lines
2.0 KiB
Diff
66 lines
2.0 KiB
Diff
From chris at chris-wilson.co.uk Thu Feb 2 10:51:46 2017
|
|
From: chris at chris-wilson.co.uk (Chris Wilson)
|
|
Date: Thu, 2 Feb 2017 10:51:46 +0000
|
|
Subject: [PATCH xserver 3/3] xfree86: Take input_lock() for
|
|
|
|
Add the missing input_lock() around the call into the driver's
|
|
UseHWCursor() callback.
|
|
|
|
References: https://bugs.freedesktop.org/show_bug.cgi?id=99358
|
|
---
|
|
hw/xfree86/ramdac/xf86HWCurs.c | 27 ++++++++++++++++++++-------
|
|
1 file changed, 20 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/hw/xfree86/ramdac/xf86HWCurs.c b/hw/xfree86/ramdac/xf86HWCurs.c
|
|
index 26dc7e5af..09d59b15d 100644
|
|
--- a/hw/xfree86/ramdac/xf86HWCurs.c
|
|
+++ b/hw/xfree86/ramdac/xf86HWCurs.c
|
|
@@ -139,9 +139,14 @@ Bool
|
|
xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr)
|
|
{
|
|
ScreenPtr pSlave;
|
|
+ Bool use_hw_cursor = TRUE;
|
|
|
|
- if (!xf86ScreenCheckHWCursor(pScreen, cursor, infoPtr))
|
|
- return FALSE;
|
|
+ input_lock();
|
|
+
|
|
+ if (!xf86ScreenCheckHWCursor(pScreen, cursor, infoPtr)) {
|
|
+ use_hw_cursor = FALSE;
|
|
+ goto unlock;
|
|
+ }
|
|
|
|
/* ask each driver consuming a pixmap if it can support HW cursor */
|
|
xorg_list_for_each_entry(pSlave, &pScreen->slave_list, slave_head) {
|
|
@@ -151,14 +156,22 @@ xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr
|
|
continue;
|
|
|
|
sPriv = dixLookupPrivate(&pSlave->devPrivates, xf86CursorScreenKey);
|
|
- if (!sPriv) /* NULL if Option "SWCursor", possibly other conditions */
|
|
- return FALSE;
|
|
+ if (!sPriv) { /* NULL if Option "SWCursor", possibly other conditions */
|
|
+ use_hw_cursor = FALSE;
|
|
+ break;
|
|
+ }
|
|
|
|
/* FALSE if HWCursor not supported by slave */
|
|
- if (!xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr))
|
|
- return FALSE;
|
|
+ if (!xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr)) {
|
|
+ use_hw_cursor = FALSE;
|
|
+ break;
|
|
+ }
|
|
}
|
|
- return TRUE;
|
|
+
|
|
+unlock:
|
|
+ input_unlock();
|
|
+
|
|
+ return use_hw_cursor;
|
|
}
|
|
|
|
static Bool
|
|
--
|
|
2.11.0
|
|
|