aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-03-06 08:37:36 +0100
committermarha <marha@users.sourceforge.net>2013-04-11 11:13:32 +0200
commitfb84fb26466262dcab4bd31bdf51c982f14f891a (patch)
tree8b53ac928f676a2a6f2273c770d65625794c1ab5 /xorg-server/hw/xfree86
parentd95b2ad7bc95e4ba2f1af9737935878f1ff7d79a (diff)
downloadvcxsrv-fb84fb26466262dcab4bd31bdf51c982f14f891a.tar.gz
vcxsrv-fb84fb26466262dcab4bd31bdf51c982f14f891a.tar.bz2
vcxsrv-fb84fb26466262dcab4bd31bdf51c982f14f891a.zip
fontconfig libfontenc mesa xserver git update 6 Mar 2013
xserver commit 103b77c59e3638a45179bf6d7908f5c738d2d872 libfontenc commit 624508365ec3279bc74ce523d024533e062629e1 fontconfig commit e96d7760886a3781a46b3271c76af99e15cb0146 mesa commit 88b20d58344ed336b146799c0bf1149a932dc2d7
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r--xorg-server/hw/xfree86/common/xf86DPMS.c45
1 files changed, 31 insertions, 14 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c
index ef4a2c19b..3f1e142c7 100644
--- a/xorg-server/hw/xfree86/common/xf86DPMS.c
+++ b/xorg-server/hw/xfree86/common/xf86DPMS.c
@@ -130,6 +130,19 @@ DPMSClose(ScreenPtr pScreen)
return pScreen->CloseScreen(pScreen);
}
+static void
+DPMSSetScreen(ScrnInfoPtr pScrn, int level)
+{
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
+ DPMSPtr pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
+
+ if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
+ xf86VGAarbiterLock(pScrn);
+ pScrn->DPMSSet(pScrn, level, 0);
+ xf86VGAarbiterUnlock(pScrn);
+ }
+}
+
/*
* DPMSSet --
* Device dependent DPMS mode setting hook. This is called whenever
@@ -139,8 +152,6 @@ int
DPMSSet(ClientPtr client, int level)
{
int rc, i;
- DPMSPtr pDPMS;
- ScrnInfoPtr pScrn;
DPMSPowerLevel = level;
@@ -155,17 +166,23 @@ DPMSSet(ClientPtr client, int level)
/* For each screen, set the DPMS level */
for (i = 0; i < xf86NumScreens; i++) {
- pScrn = xf86Screens[i];
- pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
- if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) {
- xf86VGAarbiterLock(pScrn);
- pScrn->DPMSSet(pScrn, level, 0);
- xf86VGAarbiterUnlock(pScrn);
- }
+ DPMSSetScreen(xf86Screens[i], level);
+ }
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ DPMSSetScreen(xf86GPUScreens[i], level);
}
return Success;
}
+static Bool
+DPMSSupportedOnScreen(ScrnInfoPtr pScrn)
+{
+ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
+ DPMSPtr pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey);
+
+ return pDPMS && pScrn->DPMSSet;
+}
+
/*
* DPMSSupported --
* Return TRUE if any screen supports DPMS.
@@ -174,8 +191,6 @@ Bool
DPMSSupported(void)
{
int i;
- DPMSPtr pDPMS;
- ScrnInfoPtr pScrn;
if (DPMSKey == NULL) {
return FALSE;
@@ -183,9 +198,11 @@ DPMSSupported(void)
/* For each screen, check if DPMS is supported */
for (i = 0; i < xf86NumScreens; i++) {
- pScrn = xf86Screens[i];
- pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey);
- if (pDPMS && pScrn->DPMSSet)
+ if (DPMSSupportedOnScreen(xf86Screens[i]))
+ return TRUE;
+ }
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ if (DPMSSupportedOnScreen(xf86GPUScreens[i]))
return TRUE;
}
return FALSE;