summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/common/xf86Configure.c2
-rw-r--r--hw/xfree86/common/xf86DPMS.c8
-rw-r--r--hw/xfree86/common/xf86Helper.c1
-rw-r--r--hw/xfree86/common/xf86Init.c3
-rw-r--r--hw/xfree86/common/xf86RandR.c27
-rw-r--r--hw/xfree86/common/xf86str.h28
6 files changed, 52 insertions, 17 deletions
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index f021d6a4b..9ba2f0c92 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -749,8 +749,8 @@ configureDDCMonitorSection (int screennum)
ptr->mon_vrefresh[ptr->mon_n_hsync].lo =
ConfiguredMonitor->det_mon[i].section.ranges.min_v;
ptr->mon_vrefresh[ptr->mon_n_hsync].hi =
+ ConfiguredMonitor->det_mon[i].section.ranges.max_v;
ptr->mon_n_hsync++;
- ConfiguredMonitor->det_mon[i].section.ranges.max_v;
default:
break;
}
diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
index 77b7c0db1..82004b953 100644
--- a/hw/xfree86/common/xf86DPMS.c
+++ b/hw/xfree86/common/xf86DPMS.c
@@ -118,7 +118,13 @@ DPMSClose(int i, ScreenPtr pScreen)
pScreen->CloseScreen = pDPMS->CloseScreen;
- if (xf86Screens[i]->DPMSSet) {
+ /*
+ * Turn on DPMS when shutting down. If this function can be used
+ * depends on the order the driver wraps things. If this is called
+ * after the driver has shut down everything the driver will have
+ * to deal with this internally.
+ */
+ if (xf86Screens[i]->vtSema && xf86Screens[i]->DPMSSet) {
xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
}
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 41fe82b70..822cdfd8b 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -873,7 +873,6 @@ Bool
xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual)
{
MessageType visualFrom = X_DEFAULT;
- Bool bad = FALSE;
if (defaultColorVisualClass >= 0) {
scrp->defaultVisual = defaultColorVisualClass;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 9bfacea26..af6df111c 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -902,8 +902,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
xf86Screens[i]->DPMSSet = NULL;
xf86Screens[i]->LoadPalette = NULL;
xf86Screens[i]->SetOverscan = NULL;
- xf86Screens[i]->RRGetInfo = NULL;
- xf86Screens[i]->RRSetConfig = NULL;
+ xf86Screens[i]->RRFunc = NULL;
scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv);
if (scr_index == i) {
/*
diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index 16246d342..88e9d371b 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.2 2004/04/23 19:20:32 eich Exp $ */
+/* $XdotOrg: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.3 2004/07/30 21:53:09 eich Exp $ */
/*
* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.7tsi Exp $
*
@@ -102,9 +102,15 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
}
/* If there is driver support for randr, let it set our supported rotations */
- if(scrp->RRGetInfo)
- return (*scrp->RRGetInfo)(scrp, rotations);
-
+ if(scrp->RRFunc) {
+ xorgRRRotation RRRotation;
+
+ RRRotation.RRRotations = *rotations;
+ if (!(*scrp->RRFunc)(scrp, RR_GET_INFO, &RRRotation))
+ return FALSE;
+ *rotations = RRRotation.RRRotations;
+ }
+
return TRUE;
}
@@ -198,9 +204,16 @@ xf86RandRSetConfig (ScreenPtr pScreen,
}
/* Have the driver do its thing. */
- if (scrp->RRSetConfig &&
- !(*scrp->RRSetConfig)(scrp, rotation, rate, pSize->width, pSize->height))
- return FALSE;
+ if (scrp->RRFunc) {
+ xorgRRRotation RRRotation;
+ RRRotation.RRConfig.rotation = rotation;
+ RRRotation.RRConfig.rate = rate;
+ RRRotation.RRConfig.width = pSize->width;
+ RRRotation.RRConfig.height = pSize->height;
+
+ if (!(*scrp->RRFunc)(scrp, RR_SET_CONFIG, &RRRotation))
+ return FALSE;
+ }
if (!xf86RandRSetMode (pScreen, mode, useVirtual))
return FALSE;
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index f2394aa10..770233033 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -476,7 +476,7 @@ typedef struct _confdrirec {
/* These values should be adjusted when new fields are added to ScrnInfoRec */
#define NUM_RESERVED_INTS 16
#define NUM_RESERVED_POINTERS 15
-#define NUM_RESERVED_FUNCS 10
+#define NUM_RESERVED_FUNCS 11
typedef pointer (*funcPointer)(void);
@@ -737,6 +737,24 @@ typedef struct {
PixmapPtr pPix;
} DGADeviceRec, *DGADevicePtr;
+typedef enum {
+ RR_GET_INFO,
+ RR_SET_CONFIG
+} xorgRRFuncFlags;
+
+typedef struct {
+ int rotation;
+ int rate;
+ int width;
+ int height;
+} xorgRRConfig;
+
+typedef union {
+ short RRRotations;
+ xorgRRConfig RRConfig;
+} xorgRRRotation, *xorgRRRotationPtr;
+
+
/*
* Flags for driver Probe() functions.
*/
@@ -767,8 +785,9 @@ typedef int xf86HandleMessageProc (int, const char*, const char*, char**);
typedef void xf86DPMSSetProc (ScrnInfoPtr, int, int);
typedef void xf86LoadPaletteProc (ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
typedef void xf86SetOverscanProc (ScrnInfoPtr, int);
-typedef Bool xf86RRGetInfoProc (ScrnInfoPtr, unsigned short *);
-typedef Bool xf86RRSetConfigProc (ScrnInfoPtr, int, int, int, int);
+typedef Bool xorgRRFuncProc (ScrnInfoPtr, xorgRRFuncFlags,
+ xorgRRRotationPtr);
+
/*
* ScrnInfoRec
@@ -923,8 +942,7 @@ typedef struct _ScrnInfoRec {
xf86DPMSSetProc *DPMSSet;
xf86LoadPaletteProc *LoadPalette;
xf86SetOverscanProc *SetOverscan;
- xf86RRGetInfoProc *RRGetInfo;
- xf86RRSetConfigProc *RRSetConfig;
+ xorgRRFuncProc *RRFunc;
/*
* This can be used when the minor ABI version is incremented.