Removed distro specific stuff.

Fixed FreeType module to build with FreeType versions older than 2.1.7.
Fixed typo.
Added vtSema to protect call of driver DPMS function.
removed unneeded variable
Modified RandR driver hook to reduce the number of function calls to one.
    Function is sufficiently generic to be extended in the future.
This commit is contained in:
Egbert Eich 2004-08-02 19:35:07 +00:00
parent b759da83ae
commit e6b9cc79c2
6 changed files with 52 additions and 17 deletions

View File

@ -749,8 +749,8 @@ configureDDCMonitorSection (int screennum)
ptr->mon_vrefresh[ptr->mon_n_hsync].lo = ptr->mon_vrefresh[ptr->mon_n_hsync].lo =
ConfiguredMonitor->det_mon[i].section.ranges.min_v; ConfiguredMonitor->det_mon[i].section.ranges.min_v;
ptr->mon_vrefresh[ptr->mon_n_hsync].hi = ptr->mon_vrefresh[ptr->mon_n_hsync].hi =
ptr->mon_n_hsync++;
ConfiguredMonitor->det_mon[i].section.ranges.max_v; ConfiguredMonitor->det_mon[i].section.ranges.max_v;
ptr->mon_n_hsync++;
default: default:
break; break;
} }

View File

@ -118,7 +118,13 @@ DPMSClose(int i, ScreenPtr pScreen)
pScreen->CloseScreen = pDPMS->CloseScreen; 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); xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0);
} }

View File

@ -873,7 +873,6 @@ Bool
xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual) xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual)
{ {
MessageType visualFrom = X_DEFAULT; MessageType visualFrom = X_DEFAULT;
Bool bad = FALSE;
if (defaultColorVisualClass >= 0) { if (defaultColorVisualClass >= 0) {
scrp->defaultVisual = defaultColorVisualClass; scrp->defaultVisual = defaultColorVisualClass;

View File

@ -902,8 +902,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
xf86Screens[i]->DPMSSet = NULL; xf86Screens[i]->DPMSSet = NULL;
xf86Screens[i]->LoadPalette = NULL; xf86Screens[i]->LoadPalette = NULL;
xf86Screens[i]->SetOverscan = NULL; xf86Screens[i]->SetOverscan = NULL;
xf86Screens[i]->RRGetInfo = NULL; xf86Screens[i]->RRFunc = NULL;
xf86Screens[i]->RRSetConfig = NULL;
scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv); scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv);
if (scr_index == i) { if (scr_index == i) {
/* /*

View File

@ -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 $ * $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86RandR.c,v 1.7tsi Exp $
* *
@ -102,8 +102,14 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
} }
/* If there is driver support for randr, let it set our supported rotations */ /* If there is driver support for randr, let it set our supported rotations */
if(scrp->RRGetInfo) if(scrp->RRFunc) {
return (*scrp->RRGetInfo)(scrp, rotations); xorgRRRotation RRRotation;
RRRotation.RRRotations = *rotations;
if (!(*scrp->RRFunc)(scrp, RR_GET_INFO, &RRRotation))
return FALSE;
*rotations = RRRotation.RRRotations;
}
return TRUE; return TRUE;
} }
@ -198,9 +204,16 @@ xf86RandRSetConfig (ScreenPtr pScreen,
} }
/* Have the driver do its thing. */ /* Have the driver do its thing. */
if (scrp->RRSetConfig && if (scrp->RRFunc) {
!(*scrp->RRSetConfig)(scrp, rotation, rate, pSize->width, pSize->height)) 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; return FALSE;
}
if (!xf86RandRSetMode (pScreen, mode, useVirtual)) if (!xf86RandRSetMode (pScreen, mode, useVirtual))
return FALSE; return FALSE;

View File

@ -476,7 +476,7 @@ typedef struct _confdrirec {
/* These values should be adjusted when new fields are added to ScrnInfoRec */ /* These values should be adjusted when new fields are added to ScrnInfoRec */
#define NUM_RESERVED_INTS 16 #define NUM_RESERVED_INTS 16
#define NUM_RESERVED_POINTERS 15 #define NUM_RESERVED_POINTERS 15
#define NUM_RESERVED_FUNCS 10 #define NUM_RESERVED_FUNCS 11
typedef pointer (*funcPointer)(void); typedef pointer (*funcPointer)(void);
@ -737,6 +737,24 @@ typedef struct {
PixmapPtr pPix; PixmapPtr pPix;
} DGADeviceRec, *DGADevicePtr; } 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. * 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 xf86DPMSSetProc (ScrnInfoPtr, int, int);
typedef void xf86LoadPaletteProc (ScrnInfoPtr, int, int *, LOCO *, VisualPtr); typedef void xf86LoadPaletteProc (ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
typedef void xf86SetOverscanProc (ScrnInfoPtr, int); typedef void xf86SetOverscanProc (ScrnInfoPtr, int);
typedef Bool xf86RRGetInfoProc (ScrnInfoPtr, unsigned short *); typedef Bool xorgRRFuncProc (ScrnInfoPtr, xorgRRFuncFlags,
typedef Bool xf86RRSetConfigProc (ScrnInfoPtr, int, int, int, int); xorgRRRotationPtr);
/* /*
* ScrnInfoRec * ScrnInfoRec
@ -923,8 +942,7 @@ typedef struct _ScrnInfoRec {
xf86DPMSSetProc *DPMSSet; xf86DPMSSetProc *DPMSSet;
xf86LoadPaletteProc *LoadPalette; xf86LoadPaletteProc *LoadPalette;
xf86SetOverscanProc *SetOverscan; xf86SetOverscanProc *SetOverscan;
xf86RRGetInfoProc *RRGetInfo; xorgRRFuncProc *RRFunc;
xf86RRSetConfigProc *RRSetConfig;
/* /*
* This can be used when the minor ABI version is incremented. * This can be used when the minor ABI version is incremented.