summaryrefslogtreecommitdiff
path: root/hw/xfree86
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2005-03-16 12:16:06 +0000
committerEgbert Eich <eich@suse.de>2005-03-16 12:16:06 +0000
commit04ccba4d40bef6cee902b118598272f26eebb1df (patch)
tree20293091081896e569e5b1577157d42d74e933f5 /hw/xfree86
parent1011762254b41db5ce67cb652a2d4965efd7ec20 (diff)
Don't fail calling function when DriverFunc() for RandR fails as
DriverFunc() also returns FALSE when the specific sub function isn't supported. In the case of xf86RandRGetInfo() we simply rely on what has been set before and return TRUE. In the case of xf86RandRSetConfig() we only bail with FALSE if we have to do a rotation and the call fails. We presently cannot do rotation on the fly without the help of a driver function (Bugzilla #2745).
Diffstat (limited to 'hw/xfree86')
-rw-r--r--hw/xfree86/common/xf86RandR.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index ba7127d75..f69faec96 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.6 2004/12/04 00:42:52 kuhn Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.7 2005/01/28 16:12:59 eich Exp $ */
/*
* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.7tsi Exp $
*
@@ -109,7 +109,7 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
RRRotation.RRRotations = *rotations;
if (!(*scrp->DriverFunc)(scrp, RR_GET_INFO, &RRRotation))
- return FALSE;
+ return TRUE;
*rotations = RRRotation.RRRotations;
}
@@ -193,8 +193,6 @@ xf86RandRSetConfig (ScreenPtr pScreen,
int px, py;
Bool useVirtual = FALSE;
- randrp->rotation = rotation;
-
miPointerPosition (&px, &py);
for (mode = scrp->modes; ; mode = mode->next)
{
@@ -215,18 +213,27 @@ xf86RandRSetConfig (ScreenPtr pScreen,
}
}
+ if (randrp->rotation != rotation) {
+
/* Have the driver do its thing. */
- if (scrp->DriverFunc) {
- xorgRRRotation RRRotation;
- RRRotation.RRConfig.rotation = rotation;
- RRRotation.RRConfig.rate = rate;
- RRRotation.RRConfig.width = pSize->width;
- RRRotation.RRConfig.height = pSize->height;
+ if (scrp->DriverFunc) {
+ xorgRRRotation RRRotation;
+ RRRotation.RRConfig.rotation = rotation;
+ RRRotation.RRConfig.rate = rate;
+ RRRotation.RRConfig.width = pSize->width;
+ RRRotation.RRConfig.height = pSize->height;
+
+ /*
+ * Currently we need to rely on HW support for rotation.
+ */
+ if (!(*scrp->DriverFunc)(scrp, RR_SET_CONFIG, &RRRotation))
+ return FALSE;
+ } else
+ return FALSE;
- if (!(*scrp->DriverFunc)(scrp, RR_SET_CONFIG, &RRRotation))
- return FALSE;
+ randrp->rotation = rotation;
}
-
+
if (!xf86RandRSetMode (pScreen, mode, useVirtual, pSize->mmWidth, pSize->mmHeight))
return FALSE;
/*