[PATCH v7 xserver 4/7] xf86Cursor: Fix xf86CurrentCursor to work on slave GPU Screens

Hans de Goede hdegoede at redhat.com
Thu Sep 8 10:08:18 UTC 2016


The CurrentCursor is always attached to the master GPU.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
---
 hw/xfree86/ramdac/xf86Cursor.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c
index 0c5d6c9..623a65b 100644
--- a/hw/xfree86/ramdac/xf86Cursor.c
+++ b/hw/xfree86/ramdac/xf86Cursor.c
@@ -458,9 +458,12 @@ xf86ForceHWCursor(ScreenPtr pScreen, Bool on)
 CursorPtr
 xf86CurrentCursor(ScreenPtr pScreen)
 {
-    xf86CursorScreenPtr ScreenPriv =
-        (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
-                                               xf86CursorScreenKey);
+    xf86CursorScreenPtr ScreenPriv;
+
+    if (pScreen->is_output_slave)
+        pScreen = pScreen->current_master;
+
+    ScreenPriv = dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey);
     return ScreenPriv->CurrentCursor;
 }
 
-- 
2.9.3



More information about the xorg-devel mailing list