summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-03-24 17:34:23 +0900
committerAdam Jackson <ajax@redhat.com>2016-03-28 14:03:29 -0400
commit418fe365b45a143680d3b4143dc60f7cdc5a3507 (patch)
tree15c4f53f0a115fd5e213afe6cde5aee0c2cfa62f /hw
parentadefbaee499b9679c6cac21f52ec6545af2b36b5 (diff)
xfree86/modes: Make sure the HW cursor is hidden when it should be
When the HW cursor is hidden (e.g. because xf86CursorResetCursor triggers a switch from HW cursor to SW cursor), the driver isn't notified of this for disabled CRTCs. If the HW cursor was shown when the CRTC was disabled, it may still be displayed when the CRTC is enabled again. Prevent this by explicitly hiding the HW cursor again after setting a mode if it's currently supposed to be hidden. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94560 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/modes/xf86Crtc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 2639a3085..6091b5e5b 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -368,6 +368,12 @@ xf86CrtcSetModeTransform(xf86CrtcPtr crtc, DisplayModePtr mode,
xf86CrtcSetScreenSubpixelOrder(scrn->pScreen);
if (scrn->ModeSet)
scrn->ModeSet(scrn);
+
+ /* Make sure the HW cursor is hidden if it's supposed to be, in case
+ * it was hidden while the CRTC was disabled
+ */
+ if (!xf86_config->cursor_on)
+ xf86_hide_cursors(scrn);
}
else {
crtc->x = saved_x;