summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans De Goede <hdegoede@redhat.com>2016-08-31 15:37:20 +0200
committerAdam Jackson <ajax@redhat.com>2016-09-02 13:09:40 -0400
commitbc3eed379ee5b4176db848708799fb2d5db16531 (patch)
tree56de362851704a901c2499fc8bfdca237a778095
parent6c984ac9a737304ab5e26de90c76a79d970b6e33 (diff)
modesetting: Hide cursor when initializing crtc
When Xorg gets started directly from a wayland-gdm the crtc still has the wayland hw cursor set. Combine this with Xorg immediately falling back to a sw cursor because a slave-output has a monitor attached at startup; and we end up with the wayland hardware cursor overlay fixed in its last position + the Xorg sw cursor resulting in 2 cursors. This commit fixes this by hiding any left-over cursors when initializing the crtc. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
-rw-r--r--hw/xfree86/drivers/modesetting/drmmode_display.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index dd8cc712d..6b933e49b 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1145,6 +1145,9 @@ drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res
drmmode_crtc->vblank_pipe = drmmode_crtc_vblank_pipe(num);
crtc->driver_private = drmmode_crtc;
+ /* Hide any cursors which may be active from previous users */
+ drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0);
+
/* Mark num'th crtc as in use on this device. */
ms_ent->assigned_crtcs |= (1 << num);
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, MS_LOGLEVEL_DEBUG,