From 16e01b117bb7ae90b150dd4f25a887dd895cf473 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 30 Nov 2006 11:55:29 -0800 Subject: Oops. Don't try to use xf86RandR names, use xf86RandR12 instead. Attempts to override functions in core server fail, so use new names instead. --- src/i830_driver.c | 10 +++--- src/i830_modes.c | 2 +- src/i830_randr.c | 100 +++++++++++++++++++++++++++--------------------------- src/i830_randr.h | 14 ++++---- src/i830_rotate.c | 2 +- 5 files changed, 64 insertions(+), 64 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index b4333c48..e4d67724 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1584,7 +1584,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Maximum frambuffer space: %d kByte\n", pScrn->videoRam); - if (!xf86RandRPreInit (pScrn)) + if (!xf86RandR12PreInit (pScrn)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No valid modes.\n"); PreInitCleanup(pScrn); @@ -2613,7 +2613,7 @@ I830CreateScreenResources (ScreenPtr pScreen) if (!(*pScreen->CreateScreenResources)(pScreen)) return FALSE; - if (!xf86RandRCreateScreenResources (pScreen)) + if (!xf86RandR12CreateScreenResources (pScreen)) return FALSE; return TRUE; @@ -3156,11 +3156,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) xf86DisableRandR(); /* Disable built-in RandR extension */ shadowSetup(pScreen); /* support all rotations */ - xf86RandRInit (pScreen); + xf86RandR12Init (pScreen); if (IS_I965G(pI830)) { - xf86RandRSetRotations (pScreen, RR_Rotate_0); /* only 0 degrees for I965G */ + xf86RandR12SetRotations (pScreen, RR_Rotate_0); /* only 0 degrees for I965G */ } else { - xf86RandRSetRotations (pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270); + xf86RandR12SetRotations (pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270); } pI830->PointerMoved = pScrn->PointerMoved; pScrn->PointerMoved = I830PointerMoved; diff --git a/src/i830_modes.c b/src/i830_modes.c index 7b487943..513e2335 100644 --- a/src/i830_modes.c +++ b/src/i830_modes.c @@ -519,7 +519,7 @@ i830_set_xf86_modes_from_outputs(ScrnInfoPtr pScrn) } } - xf86GetOriginalVirtualSize(pScrn, &originalVirtualX, &originalVirtualY); + xf86RandR12GetOriginalVirtualSize(pScrn, &originalVirtualX, &originalVirtualY); /* Disable modes in the XFree86 DDX list that are larger than the current * virtual size. diff --git a/src/i830_randr.c b/src/i830_randr.c index 38ac320f..1ff23607 100644 --- a/src/i830_randr.c +++ b/src/i830_randr.c @@ -44,7 +44,7 @@ #include "i830_display.h" #include "i830.h" -typedef struct _xf86RandRInfo { +typedef struct _xf86RandR12Info { int virtualX; int virtualY; int mmWidth; @@ -56,18 +56,18 @@ typedef struct _xf86RandRInfo { } XF86RandRInfoRec, *XF86RandRInfoPtr; #ifdef RANDR_12_INTERFACE -static Bool xf86RandRInit12 (ScreenPtr pScreen); -static Bool xf86RandRCreateScreenResources12 (ScreenPtr pScreen); +static Bool xf86RandR12Init12 (ScreenPtr pScreen); +static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen); #endif -static int xf86RandRIndex; -static int xf86RandRGeneration; +static int xf86RandR12Index; +static int xf86RandR12Generation; #define XF86RANDRINFO(p) \ - ((XF86RandRInfoPtr)(p)->devPrivates[xf86RandRIndex].ptr) + ((XF86RandRInfoPtr)(p)->devPrivates[xf86RandR12Index].ptr) static int -xf86RandRModeRefresh (DisplayModePtr mode) +xf86RandR12ModeRefresh (DisplayModePtr mode) { if (mode->VRefresh) return (int) (mode->VRefresh + 0.5); @@ -76,7 +76,7 @@ xf86RandRModeRefresh (DisplayModePtr mode) } static Bool -xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations) +xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations) { RRScreenSizePtr pSize; ScrnInfoPtr scrp = XF86SCRNINFO(pScreen); @@ -98,7 +98,7 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations) for (mode = scrp->modes; ; mode = mode->next) { - int refresh = xf86RandRModeRefresh (mode); + int refresh = xf86RandR12ModeRefresh (mode); if (randrp->maxX == 0 || randrp->maxY == 0) { if (maxX < mode->HDisplay) @@ -152,7 +152,7 @@ xf86RandRGetInfo (ScreenPtr pScreen, Rotation *rotations) } static Bool -xf86RandRSetMode (ScreenPtr pScreen, +xf86RandR12SetMode (ScreenPtr pScreen, DisplayModePtr mode, Bool useVirtual, int mmWidth, @@ -241,7 +241,7 @@ xf86RandRSetMode (ScreenPtr pScreen, } Bool -xf86RandRSetConfig (ScreenPtr pScreen, +xf86RandR12SetConfig (ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize) @@ -274,7 +274,7 @@ xf86RandRSetConfig (ScreenPtr pScreen, } if (mode->HDisplay == pSize->width && mode->VDisplay == pSize->height && - (rate == 0 || xf86RandRModeRefresh (mode) == rate)) + (rate == 0 || xf86RandR12ModeRefresh (mode) == rate)) break; if (mode->next == scrp->modes) { @@ -300,7 +300,7 @@ xf86RandRSetConfig (ScreenPtr pScreen, randrp->maxY = maxY; } - if (!xf86RandRSetMode (pScreen, mode, useVirtual, pSize->mmWidth, + if (!xf86RandR12SetMode (pScreen, mode, useVirtual, pSize->mmWidth, pSize->mmHeight)) { randrp->rotation = oldRotation; return FALSE; @@ -323,7 +323,7 @@ xf86RandRSetConfig (ScreenPtr pScreen, } Rotation -xf86RandRGetRotation(ScreenPtr pScreen) +xf86RandR12GetRotation(ScreenPtr pScreen) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); @@ -331,7 +331,7 @@ xf86RandRGetRotation(ScreenPtr pScreen) } Bool -xf86RandRCreateScreenResources (ScreenPtr pScreen) +xf86RandR12CreateScreenResources (ScreenPtr pScreen) { #if 0 ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -343,7 +343,7 @@ xf86RandRCreateScreenResources (ScreenPtr pScreen) return TRUE; #endif #if RANDR_12_INTERFACE - if (xf86RandRCreateScreenResources12 (pScreen)) + if (xf86RandR12CreateScreenResources12 (pScreen)) return TRUE; #endif #if 0 @@ -361,7 +361,7 @@ xf86RandRCreateScreenResources (ScreenPtr pScreen) p.mmHeight = pScreen->mmHeight; pI830->starting = TRUE; /* abuse this for dual head & rotation */ - xf86RandRSetConfig (pScreen, requestedRotation, 0, &p); + xf86RandR12SetConfig (pScreen, requestedRotation, 0, &p); pI830->starting = FALSE; } #endif @@ -370,7 +370,7 @@ xf86RandRCreateScreenResources (ScreenPtr pScreen) Bool -xf86RandRInit (ScreenPtr pScreen) +xf86RandR12Init (ScreenPtr pScreen) { rrScrPrivPtr rp; XF86RandRInfoPtr randrp; @@ -380,10 +380,10 @@ xf86RandRInit (ScreenPtr pScreen) if (!noPanoramiXExtension) return TRUE; #endif - if (xf86RandRGeneration != serverGeneration) + if (xf86RandR12Generation != serverGeneration) { - xf86RandRIndex = AllocateScreenPrivateIndex(); - xf86RandRGeneration = serverGeneration; + xf86RandR12Index = AllocateScreenPrivateIndex(); + xf86RandR12Generation = serverGeneration; } randrp = xalloc (sizeof (XF86RandRInfoRec)); @@ -396,8 +396,8 @@ xf86RandRInit (ScreenPtr pScreen) return FALSE; } rp = rrGetScrPriv(pScreen); - rp->rrGetInfo = xf86RandRGetInfo; - rp->rrSetConfig = xf86RandRSetConfig; + rp->rrGetInfo = xf86RandR12GetInfo; + rp->rrSetConfig = xf86RandR12SetConfig; randrp->virtualX = -1; randrp->virtualY = -1; @@ -410,17 +410,17 @@ xf86RandRInit (ScreenPtr pScreen) randrp->maxX = randrp->maxY = 0; - pScreen->devPrivates[xf86RandRIndex].ptr = randrp; + pScreen->devPrivates[xf86RandR12Index].ptr = randrp; #if RANDR_12_INTERFACE - if (!xf86RandRInit12 (pScreen)) + if (!xf86RandR12Init12 (pScreen)) return FALSE; #endif return TRUE; } void -xf86RandRSetRotations (ScreenPtr pScreen, Rotation rotations) +xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); @@ -428,11 +428,11 @@ xf86RandRSetRotations (ScreenPtr pScreen, Rotation rotations) } void -xf86GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y) +xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y) { ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; - if (xf86RandRGeneration != serverGeneration || + if (xf86RandR12Generation != serverGeneration || XF86RANDRINFO(pScreen)->virtualX == -1) { *x = pScrn->virtualX; @@ -447,7 +447,7 @@ xf86GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y) #if RANDR_12_INTERFACE static Bool -xf86RandRScreenSetSize (ScreenPtr pScreen, +xf86RandR12ScreenSetSize (ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, @@ -483,7 +483,7 @@ xf86RandRScreenSetSize (ScreenPtr pScreen, } static Bool -xf86RandRCrtcNotify (RRCrtcPtr randr_crtc) +xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc) { ScreenPtr pScreen = randr_crtc->pScreen; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -532,7 +532,7 @@ xf86RandRCrtcNotify (RRCrtcPtr randr_crtc) } static Bool -xf86RandRCrtcSet (ScreenPtr pScreen, +xf86RandR12CrtcSet (ScreenPtr pScreen, RRCrtcPtr randr_crtc, RRModePtr randr_mode, int x, @@ -603,11 +603,11 @@ xf86RandRCrtcSet (ScreenPtr pScreen, } i830DisableUnusedFunctions (pScrn); } - return xf86RandRCrtcNotify (randr_crtc); + return xf86RandR12CrtcNotify (randr_crtc); } static Bool -xf86RandRCrtcSetGamma (ScreenPtr pScreen, +xf86RandR12CrtcSetGamma (ScreenPtr pScreen, RRCrtcPtr crtc) { return FALSE; @@ -677,7 +677,7 @@ I830xf86RROutputSetModes (RROutputPtr randr_output, DisplayModePtr modes) * Mirror the current mode configuration to RandR */ static Bool -xf86RandRSetInfo12 (ScrnInfoPtr pScrn) +xf86RandR12SetInfo12 (ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); RROutputPtr clones[MAX_OUTPUTS]; @@ -787,16 +787,16 @@ xf86RandRSetInfo12 (ScrnInfoPtr pScrn) * that to RandR */ static Bool -xf86RandRGetInfo12 (ScreenPtr pScreen, Rotation *rotations) +xf86RandR12GetInfo12 (ScreenPtr pScreen, Rotation *rotations) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; i830_reprobe_output_modes(pScrn); - return xf86RandRSetInfo12 (pScrn); + return xf86RandR12SetInfo12 (pScrn); } static Bool -xf86RandRCreateObjects12 (ScrnInfoPtr pScrn) +xf86RandR12CreateObjects12 (ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); int p; @@ -818,7 +818,7 @@ xf86RandRCreateObjects12 (ScrnInfoPtr pScrn) } static Bool -xf86RandRCreateScreenResources12 (ScreenPtr pScreen) +xf86RandR12CreateScreenResources12 (ScreenPtr pScreen) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -866,7 +866,7 @@ xf86RandRCreateScreenResources12 (ScreenPtr pScreen) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Setting screen physical size to %d x %d\n", mmWidth, mmHeight); - xf86RandRScreenSetSize (pScreen, + xf86RandR12ScreenSetSize (pScreen, width, height, mmWidth, @@ -874,7 +874,7 @@ xf86RandRCreateScreenResources12 (ScreenPtr pScreen) } for (p = 0; p < pI830->xf86_config.num_crtc; p++) - xf86RandRCrtcNotify (pI830->xf86_config.crtc[p]->randr_crtc); + xf86RandR12CrtcNotify (pI830->xf86_config.crtc[p]->randr_crtc); if (randrp->virtualX == -1 || randrp->virtualY == -1) { @@ -888,22 +888,22 @@ xf86RandRCreateScreenResources12 (ScreenPtr pScreen) } static void -xf86RandRPointerMoved (int scrnIndex, int x, int y) +xf86RandR12PointerMoved (int scrnIndex, int x, int y) { } static Bool -xf86RandRInit12 (ScreenPtr pScreen) +xf86RandR12Init12 (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; rrScrPrivPtr rp = rrGetScrPriv(pScreen); - rp->rrGetInfo = xf86RandRGetInfo12; - rp->rrScreenSetSize = xf86RandRScreenSetSize; - rp->rrCrtcSet = xf86RandRCrtcSet; - rp->rrCrtcSetGamma = xf86RandRCrtcSetGamma; + rp->rrGetInfo = xf86RandR12GetInfo12; + rp->rrScreenSetSize = xf86RandR12ScreenSetSize; + rp->rrCrtcSet = xf86RandR12CrtcSet; + rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma; rp->rrSetConfig = NULL; - pScrn->PointerMoved = xf86RandRPointerMoved; + pScrn->PointerMoved = xf86RandR12PointerMoved; return TRUE; } @@ -1169,7 +1169,7 @@ I830RRDefaultScreenLimits (RROutputPtr *outputs, int num_output, #endif Bool -xf86RandRPreInit (ScrnInfoPtr pScrn) +xf86RandR12PreInit (ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); #if RANDR_12_INTERFACE @@ -1188,13 +1188,13 @@ xf86RandRPreInit (ScrnInfoPtr pScrn) i830_reprobe_output_modes(pScrn); #if RANDR_12_INTERFACE - if (!xf86RandRCreateObjects12 (pScrn)) + if (!xf86RandR12CreateObjects12 (pScrn)) return FALSE; /* * Configure output modes */ - if (!xf86RandRSetInfo12 (pScrn)) + if (!xf86RandR12SetInfo12 (pScrn)) return FALSE; /* * With RandR info set up, let RandR choose diff --git a/src/i830_randr.h b/src/i830_randr.h index 8c6af927..8a4668b4 100644 --- a/src/i830_randr.h +++ b/src/i830_randr.h @@ -25,13 +25,13 @@ #include #include -Bool xf86RandRCreateScreenResources (ScreenPtr pScreen); -Bool xf86RandRInit(ScreenPtr pScreen); -void xf86RandRSetRotations (ScreenPtr pScreen, Rotation rotation); -Bool xf86RandRSetConfig(ScreenPtr pScreen, Rotation rotation, int rate, +Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen); +Bool xf86RandR12Init(ScreenPtr pScreen); +void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation); +Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); -Rotation xf86RandRGetRotation(ScreenPtr pScreen); -void xf86GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y); -Bool xf86RandRPreInit (ScrnInfoPtr pScrn); +Rotation xf86RandR12GetRotation(ScreenPtr pScreen); +void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y); +Bool xf86RandR12PreInit (ScrnInfoPtr pScrn); #endif /* _XF86_RANDR_H_ */ diff --git a/src/i830_rotate.c b/src/i830_rotate.c index 1427c244..891a8f77 100644 --- a/src/i830_rotate.c +++ b/src/i830_rotate.c @@ -757,7 +757,7 @@ I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode) pScrn2 = pScrn; } - pI830->rotation = xf86RandRGetRotation(pScrn->pScreen); + pI830->rotation = xf86RandR12GetRotation(pScrn->pScreen); /* Check if we've still got the same orientation, or same mode */ if (pI830->rotation == oldRotation && pI830->currentMode == mode) -- cgit v1.2.3