Re: [PATCH] xserver: don't call prepare functions if set_mode_major is present

2009-04-27 Thread Jesse Barnes
On Thu, 16 Apr 2009 11:13:46 -0700
Jesse Barnes jbar...@virtuousgeek.org wrote:

 KMS drivers use the set_mode_major function and shouldn't need any
 prepare functions called, so check for that in xf86SetDesiredModes to
 avoid any ugly flicker at EnterVT time.
 
 Any thoughts on this?

Anyone have comments?  Seems like this should be safe given what
drivers need to do in set_mode_major but I may be overlooking some
randr interaction...

-- 
Jesse Barnes, Intel Open Source Technology Center
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg


[PATCH] xserver: don't call prepare functions if set_mode_major is present

2009-04-16 Thread Jesse Barnes
KMS drivers use the set_mode_major function and shouldn't need any
prepare functions called, so check for that in xf86SetDesiredModes to
avoid any ugly flicker at EnterVT time.

Any thoughts on this?

-- 
Jesse Barnes, Intel Open Source Technology Center


diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index c6eed33..1b241cd 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2549,18 +2549,23 @@ Bool
 xf86SetDesiredModes (ScrnInfoPtr scrn)
 {
 xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(scrn);
+xf86CrtcPtr crtc = config-crtc[0];
 intc;
 
-xf86PrepareOutputs(scrn);
-xf86PrepareCrtcs(scrn);
+/* A driver with this hook will take care of this */
+if (!crtc-funcs-set_mode_major) {
+   xf86PrepareOutputs(scrn);
+   xf86PrepareCrtcs(scrn);
+}
 
 for (c = 0; c  config-num_crtc; c++)
 {
-   xf86CrtcPtr crtc = config-crtc[c];
xf86OutputPtr   output = NULL;
int o;
RRTransformPtr  transform;
 
+   crtc = config-crtc[c];
+
/* Skip disabled CRTCs */
if (!crtc-enabled)
continue;
___
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg