1351N/A--- src/radeon_output.c Tue Jan 29 12:13:13 2013
1351N/A+++ src/radeon_output.c Tue Jan 29 15:30:36 2013
1351N/A@@ -300,7 +300,7 @@
1351N/A INREG(DDCReg) & ~(RADEON_GPIO_EN_0));
1351N/A usleep(15000);
1351N/A
1351N/A- MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, radeon_output->pI2CBus);
1351N/A+ MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
1351N/A
1351N/A OUTREG(DDCReg, INREG(DDCReg) | RADEON_GPIO_EN_1);
1351N/A OUTREG(DDCReg, INREG(DDCReg) | RADEON_GPIO_EN_0);
1351N/A@@ -323,7 +323,7 @@
1351N/A if (MonInfo) break;
1351N/A }
1351N/A } else if (radeon_output->pI2CBus && info->ddc2 && ((DDCReg == RADEON_LCD_GPIO_MASK) || (DDCReg == RADEON_MDGPIO_EN_REG))) {
1351N/A- MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, radeon_output->pI2CBus);
1351N/A+ MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
1351N/A } else {
1351N/A xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "DDC2/I2C is not properly initialized\n");
1351N/A MonType = MT_NONE;
1351N/A
1351N/A--- src/radeon_probe.h Fri Dec 21 14:11:54 2012
1351N/A+++ src/radeon_probe.h Mon Jan 28 12:09:29 2013
1351N/A@@ -45,7 +45,7 @@
1351N/A #include <X11/extensions/xf86misc.h>
1351N/A
1351N/A #include "xf86Crtc.h"
1351N/A-
1351N/A+#include "compat-api.h"
1351N/A #ifdef USE_EXA
1351N/A #include "exa.h"
1351N/A #endif
1351N/A@@ -577,17 +577,17 @@
1351N/A
1351N/A /* radeon_driver.c */
1351N/A extern Bool RADEONPreInit(ScrnInfoPtr, int);
1351N/A-extern Bool RADEONScreenInit(int, ScreenPtr, int, char **);
1351N/A-extern Bool RADEONSwitchMode(int, DisplayModePtr, int);
1351N/A+extern Bool RADEONScreenInit(SCREEN_INIT_ARGS_DECL);
1351N/A+extern Bool RADEONSwitchMode(SWITCH_MODE_ARGS_DECL);
1351N/A #ifdef X_XF86MiscPassMessage
1351N/A extern Bool RADEONHandleMessage(int, const char*, const char*,
1351N/A char**);
1351N/A #endif
1351N/A-extern void RADEONAdjustFrame(int, int, int, int);
1351N/A-extern Bool RADEONEnterVT(int, int);
1351N/A-extern void RADEONLeaveVT(int, int);
1351N/A-extern void RADEONFreeScreen(int, int);
1351N/A-extern ModeStatus RADEONValidMode(int, DisplayModePtr, Bool, int);
1351N/A+extern void RADEONAdjustFrame(ADJUST_FRAME_ARGS_DECL);
1351N/A+extern Bool RADEONEnterVT(VT_FUNC_ARGS_DECL);
1351N/A+extern void RADEONLeaveVT(VT_FUNC_ARGS_DECL);
1351N/A+extern void RADEONFreeScreen(FREE_SCREEN_ARGS_DECL);
1351N/A+extern ModeStatus RADEONValidMode(SCRN_ARG_TYPE, DisplayModePtr, Bool, int);
1351N/A
1351N/A extern const OptionInfoRec *RADEONOptionsWeak(void);
1351N/A
1351N/A--- src/radeon_driver.c Fri Dec 21 14:11:56 2012
1351N/A+++ src/radeon_driver.c Mon Jan 28 12:08:28 2013
1351N/A@@ -120,7 +120,7 @@
1351N/A #endif /* __sparc__ */
1351N/A
1351N/A /* Forward definitions for driver functions */
1351N/A-static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen);
1351N/A+static Bool RADEONCloseScreen(CLOSE_SCREEN_ARGS_DECL);
1351N/A static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode);
1351N/A static void RADEONSave(ScrnInfoPtr pScrn);
1351N/A
1351N/A@@ -3037,15 +3037,14 @@
1351N/A #endif
1351N/A }
1351N/A
1351N/A-static void RADEONBlockHandler(int i, pointer blockData,
1351N/A- pointer pTimeout, pointer pReadmask)
1351N/A+static void RADEONBlockHandler(BLOCKHANDLER_ARGS_DECL)
1351N/A {
1351N/A- ScreenPtr pScreen = screenInfo.screens[i];
1351N/A- ScrnInfoPtr pScrn = xf86Screens[i];
1351N/A+ SCREEN_PTR(arg);
1351N/A+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A
1351N/A pScreen->BlockHandler = info->BlockHandler;
1351N/A- (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
1351N/A+ (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
1351N/A pScreen->BlockHandler = RADEONBlockHandler;
1351N/A
1351N/A if (info->VideoTimerCallback)
1351N/A@@ -3136,10 +3135,9 @@
1351N/A
1351N/A
1351N/A /* Called at the start of each server generation. */
1351N/A-Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
1351N/A- int argc, char **argv)
1351N/A+Bool RADEONScreenInit(SCREEN_INIT_ARGS_DECL)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
1351N/A+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
1351N/A int hasDRI = 0;
1351N/A@@ -3539,16 +3537,16 @@
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
1351N/A "Initializing Acceleration\n");
1351N/A if (RADEONAccelInit(pScreen)) {
1351N/A- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration enabled\n");
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration enabled\n");
1351N/A info->accelOn = TRUE;
1351N/A } else {
1351N/A- xf86DrvMsg(scrnIndex, X_ERROR,
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
1351N/A "Acceleration initialization failed\n");
1351N/A- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n");
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n");
1351N/A info->accelOn = FALSE;
1351N/A }
1351N/A } else {
1351N/A- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n");
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n");
1351N/A info->accelOn = FALSE;
1351N/A }
1351N/A
1351N/A@@ -3575,7 +3573,7 @@
1351N/A
1351N/A if (xf86QueryLargestOffscreenArea(pScreen, &width, &height,
1351N/A 0, 0, 0)) {
1351N/A- xf86DrvMsg(scrnIndex, X_INFO,
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
1351N/A "Largest offscreen area available: %d x %d\n",
1351N/A width, height);
1351N/A }
1351N/A@@ -3582,12 +3580,12 @@
1351N/A }
1351N/A #endif /* USE_XAA */
1351N/A } else {
1351N/A- xf86DrvMsg(scrnIndex, X_ERROR,
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
1351N/A "Hardware cursor initialization failed\n");
1351N/A- xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n");
1351N/A }
1351N/A } else {
1351N/A- xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n");
1351N/A }
1351N/A
1351N/A /* DGA setup */
1351N/A@@ -3629,8 +3627,10 @@
1351N/A #endif /* __sparc__ */
1351N/A
1351N/A /* Wrap pointer motion to flip touch screen around */
1351N/A+#if 0
1351N/A info->PointerMoved = pScrn->PointerMoved;
1351N/A pScrn->PointerMoved = RADEONPointerMoved;
1351N/A+#endif
1351N/A
1351N/A /* Colormap setup */
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
1351N/A@@ -4743,9 +4743,9 @@
1351N/A return TRUE;
1351N/A }
1351N/A
1351N/A-Bool RADEONSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
1351N/A+Bool RADEONSwitchMode(SWITCH_MODE_ARGS_DECL)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A+ SCRN_INFO_PTR(arg);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A Bool tilingOld = info->tilingEnabled;
1351N/A Bool ret;
1351N/A@@ -4782,9 +4782,9 @@
1351N/A
1351N/A if (info->tilingEnabled != tilingOld) {
1351N/A /* need to redraw front buffer, I guess this can be considered a hack ? */
1351N/A- xf86EnableDisableFBAccess(scrnIndex, FALSE);
1351N/A+ xf86EnableDisableFBAccess(arg, FALSE);
1351N/A RADEONChangeSurfaces(pScrn);
1351N/A- xf86EnableDisableFBAccess(scrnIndex, TRUE);
1351N/A+ xf86EnableDisableFBAccess(arg, TRUE);
1351N/A /* xf86SetRootClip would do, but can't access that here */
1351N/A }
1351N/A
1351N/A@@ -4838,10 +4838,10 @@
1351N/A #endif
1351N/A
1351N/A /* Used to disallow modes that are not supported by the hardware */
1351N/A-ModeStatus RADEONValidMode(int scrnIndex, DisplayModePtr mode,
1351N/A+ModeStatus RADEONValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
1351N/A Bool verbose, int flag)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A+ SCRN_INFO_PTR(arg);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
1351N/A
1351N/A@@ -4987,9 +4987,9 @@
1351N/A OUTREG(reg, Base);
1351N/A }
1351N/A
1351N/A-void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags)
1351N/A+void RADEONAdjustFrame(ADJUST_FRAME_ARGS_DECL)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A+ SCRN_INFO_PTR(arg);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
1351N/A xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
1351N/A@@ -5021,9 +5021,9 @@
1351N/A /* Called when VT switching back to the X server. Reinitialize the
1351N/A * video mode.
1351N/A */
1351N/A-Bool RADEONEnterVT(int scrnIndex, int flags)
1351N/A+Bool RADEONEnterVT(VT_FUNC_ARGS_DECL)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A+ SCRN_INFO_PTR(arg);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A unsigned char *RADEONMMIO = info->MMIO;
1351N/A xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
1351N/A@@ -5104,9 +5104,9 @@
1351N/A /* Called when VT switching away from the X server. Restore the
1351N/A * original text mode.
1351N/A */
1351N/A-void RADEONLeaveVT(int scrnIndex, int flags)
1351N/A+void RADEONLeaveVT(VT_FUNC_ARGS_DECL)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A+ SCRN_INFO_PTR(arg);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
1351N/A@@ -5149,9 +5149,9 @@
1351N/A * text mode, unmap video memory, and unwrap and call the saved
1351N/A * CloseScreen function.
1351N/A */
1351N/A-static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
1351N/A+static Bool RADEONCloseScreen(CLOSE_SCREEN_ARGS_DECL)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
1351N/A@@ -5240,12 +5240,12 @@
1351N/A
1351N/A pScreen->BlockHandler = info->BlockHandler;
1351N/A pScreen->CloseScreen = info->CloseScreen;
1351N/A- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
1351N/A+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
1351N/A }
1351N/A
1351N/A-void RADEONFreeScreen(int scrnIndex, int flags)
1351N/A+void RADEONFreeScreen(FREE_SCREEN_ARGS_DECL)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A+ SCRN_INFO_PTR(arg);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
1351N/A--- src/radeon_dri.c Fri Dec 21 14:11:55 2012
1351N/A+++ src/radeon_dri.c Mon Jan 28 12:11:57 2013
1351N/A@@ -1585,15 +1585,15 @@
1351N/A return TRUE;
1351N/A }
1351N/A
1351N/A-static Bool RADEONDRIDoCloseScreen(int scrnIndex, ScreenPtr pScreen)
1351N/A+static Bool RADEONDRIDoCloseScreen(CLOSE_SCREEN_ARGS_DECL)
1351N/A {
1351N/A- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
1351N/A+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A
1351N/A RADEONDRICloseScreen(pScreen);
1351N/A
1351N/A pScreen->CloseScreen = info->DRICloseScreen;
1351N/A- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
1351N/A+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
1351N/A }
1351N/A
1351N/A /* Finish initializing the device-dependent DRI state, and call
1351N/A--- src/radeon_dga.c Mon Jan 28 14:11:08 2013
1351N/A+++ src/radeon_dga.c Mon Jan 28 14:12:17 2013
1351N/A@@ -295,7 +295,7 @@
1351N/A
1351N/A pScrn->currentMode = info->CurrentLayout.mode;
1351N/A
1351N/A- RADEONSwitchMode(indx, pScrn->currentMode, 0);
1351N/A+ RADEONSwitchMode(indx, pScrn->currentMode);
1351N/A #ifdef XF86DRI
1351N/A if (info->directRenderingEnabled) {
1351N/A RADEONCP_STOP(pScrn, info);
1351N/A@@ -308,7 +308,7 @@
1351N/A RADEONCP_START(pScrn, info);
1351N/A }
1351N/A #endif
1351N/A- RADEONAdjustFrame(indx, 0, 0, 0);
1351N/A+ RADEONAdjustFrame(indx, 0, 0);
1351N/A info->DGAactive = FALSE;
1351N/A } else {
1351N/A if (!info->DGAactive) { /* save the old parameters */
1351N/A@@ -327,7 +327,7 @@
1351N/A : pMode->depth);
1351N/A /* RADEONModeInit() will set the mode field */
1351N/A
1351N/A- RADEONSwitchMode(indx, pMode->mode, 0);
1351N/A+ RADEONSwitchMode(indx, pMode->mode);
1351N/A
1351N/A #ifdef XF86DRI
1351N/A if (info->directRenderingEnabled) {
1351N/A@@ -357,7 +357,7 @@
1351N/A {
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A
1351N/A- RADEONAdjustFrame(pScrn->pScreen->myNum, x, y, flags);
1351N/A+ RADEONAdjustFrame(pScrn->pScreen->myNum, x, y);
1351N/A info->DGAViewportStatus = 0; /* FIXME */
1351N/A }