xserver: Branch 'master'
Keith Packard
keithp at kemper.freedesktop.org
Thu Jun 21 18:14:45 PDT 2007
hw/xfree86/modes/xf86RandR12.c | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
New commits:
diff-tree d2177c80915f2fe2e8a5c948d4ba2fa51dbfbea2 (from e523859a952d49b20f3d10152cc0ef695d2c12a1)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Fri Jun 22 02:08:21 2007 +0100
Skip driver mode detection/configuration when !vtSema.
When the server is not active, make sure the driver functions related to
mode setting are not called.
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index db91274..9fa0f36 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -96,9 +96,12 @@ xf86RandR12GetInfo (ScreenPtr pScreen, R
}
/* Re-probe the outputs for new monitors or modes */
- xf86ProbeOutputModes (scrp, 0, 0);
- xf86SetScrnInfoModes (scrp);
- xf86DiDGAReInit (pScreen);
+ if (scrp->vtSema)
+ {
+ xf86ProbeOutputModes (scrp, 0, 0);
+ xf86SetScrnInfoModes (scrp);
+ xf86DiDGAReInit (pScreen);
+ }
for (mode = scrp->modes; ; mode = mode->next)
{
@@ -794,6 +797,9 @@ xf86RandR12CrtcSetGamma (ScreenPtr pS
if (crtc->funcs->gamma_set == NULL)
return FALSE;
+ if (!crtc->scrn->vtSema)
+ return TRUE;
+
crtc->funcs->gamma_set(crtc, randr_crtc->gammaRed, randr_crtc->gammaGreen,
randr_crtc->gammaBlue, randr_crtc->gammaSize);
@@ -814,6 +820,11 @@ xf86RandR12OutputSetProperty (ScreenPtr
if (output->funcs->set_property == NULL)
return TRUE;
+ /*
+ * This function gets called even when vtSema is FALSE, as
+ * drivers will need to remember the correct value to apply
+ * when the VT switch occurs
+ */
return output->funcs->set_property(output, property, value);
}
@@ -827,6 +838,11 @@ xf86RandR12OutputValidateMode (ScreenPtr
DisplayModeRec mode;
xf86RandRModeConvert (pScrn, randr_mode, &mode);
+ /*
+ * This function may be called when vtSema is FALSE, so
+ * the underlying function must either avoid touching the hardware
+ * or return FALSE when vtSema is FALSE
+ */
if (output->funcs->mode_valid (output, &mode) != MODE_OK)
return FALSE;
return TRUE;
@@ -988,6 +1004,8 @@ xf86RandR12GetInfo12 (ScreenPtr pScreen,
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ if (!pScrn->vtSema)
+ return TRUE;
xf86ProbeOutputModes (pScrn, 0, 0);
xf86SetScrnInfoModes (pScrn);
xf86DiDGAReInit (pScreen);
More information about the xorg-commit
mailing list