[PATCH] intel: Hide cursor before switching modes

Keith Packard keithp at keithp.com
Sat Mar 22 14:26:28 PDT 2008


On Sat, 2008-03-22 at 22:14 +0200, Maxim Levitsky wrote:

> 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))
>          i830_disable_fb_compression(crtc);
>      crtc->funcs->dpms (crtc, DPMSModeOff);
> +    crtc->funcs->hide_cursor (crtc);
>  }

heh. I had thought up almost exactly the same patch just after mailing
you last time. I think this might be a better order for some intel chips
which really don't like being poked while the clocks aren't running:

diff --git a/src/i830_display.c b/src/i830_display.c
index 5e52aac..6a2d1d7 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -901,9 +901,12 @@ i830_crtc_unlock (xf86CrtcPtr crtc)
 static void
 i830_crtc_prepare (xf86CrtcPtr crtc)
 {
+    I830CrtcPrivatePtr	intel_crtc = crtc->driver_private;
     /* Temporarily turn off FB compression during modeset */
     if (i830_use_fb_compression(crtc))
         i830_disable_fb_compression(crtc);
+    if (intel_crtc->enabled)
+	crtc->funcs->hide_cursor (crtc);
     crtc->funcs->dpms (crtc, DPMSModeOff);
 }

If you can test this, I'll stuff it into the driver.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20080322/8ffcbd27/attachment.pgp>


More information about the xorg mailing list