From: Michel Dänzer <[email protected]>

This will switch from HW cursor to SW cursor in the following cases:
* A transform is present on a CRTC
* This screen is a GPU screen acting as an output slave for another
  screen

Signed-off-by: Michel Dänzer <[email protected]>
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 4f0a415..e440b0d 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -334,6 +334,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
                        Rotation rotation, int x, int y)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
+    ScreenPtr pScreen = pScrn->pScreen;
     xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
     drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
     drmmode_ptr drmmode = drmmode_crtc->drmmode;
@@ -451,11 +452,11 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr 
mode,
         }
     }
 
-#if 0
-    if (pScrn->pScreen &&
-        !xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE))
-        xf86_reload_cursors(pScrn->pScreen);
-#endif
+    if (pScreen->isGPU && pScreen->current_master)
+        xf86CursorResetCursor(pScreen->current_master);
+    else
+        xf86CursorResetCursor(pScreen);
+
  done:
     if (!ret) {
         crtc->x = saved_x;
-- 
2.6.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to