[PATCH] intel: Hide cursor before switching modes

Maxim Levitsky maximlevitsky at gmail.com
Sat Mar 22 13:14:33 PDT 2008

On Saturday, 22 March 2008 20:24:55 Keith Packard wrote:
> On Sat, 2008-03-22 at 20:10 +0200, Maxim Levitsky wrote:
> > I was thinking about this, but why?
> Just to make sure that the cursor is programmed after the video mode is
> set; it's more consistent that way.
> I don't think we need any driver interface changes, so splitting things
> isn't any harder, and makes sure we interact with hardware the same way
> we do now, except for turning the cursors off before setting a mode.

I took another look at xf86_reload_cursors, and I think that it still
should turn cursor off before moving it, it maybe needed for other drivers.

Maybe just do this in all affected drivers (I tested and this patch works well on intel)

From: Maxim Levitsky <maximlevitsky at gmail.com>
Date: Sat, 22 Mar 2008 21:38:12 +0200
Subject: [PATCH] intel: Hide cursor before switching modes

Otherwise there is a risk that cursor is placed off-screen,
and this isn't allowed on intel hardware
 src/i830_display.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/i830_display.c b/src/i830_display.c
index 5e52aac..0c22a0a 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -905,6 +905,7 @@ i830_crtc_prepare (xf86CrtcPtr crtc)
     if (i830_use_fb_compression(crtc))
     crtc->funcs->dpms (crtc, DPMSModeOff);
+    crtc->funcs->hide_cursor (crtc);
 static void

More information about the xorg mailing list