1351N/A INREG(DDCReg) & ~(RADEON_GPIO_EN_0));
1351N/A- MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, radeon_output->pI2CBus);
1351N/A+ MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
1351N/A OUTREG(DDCReg, INREG(DDCReg) | RADEON_GPIO_EN_1);
1351N/A OUTREG(DDCReg, INREG(DDCReg) | RADEON_GPIO_EN_0);
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 xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "
DDC2/I2C is not properly initialized\n");
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-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 extern const OptionInfoRec *RADEONOptionsWeak(void);
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-static void RADEONBlockHandler(int i, pointer blockData,
1351N/A- pointer pTimeout, pointer pReadmask)
1351N/A+static void RADEONBlockHandler(BLOCKHANDLER_ARGS_DECL)
1351N/A- ScrnInfoPtr pScrn = xf86Screens[i];
1351N/A+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
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 if (info->VideoTimerCallback)
1351N/A /* Called at the start of each server generation. */
1351N/A-Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
1351N/A+Bool RADEONScreenInit(SCREEN_INIT_ARGS_DECL)
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 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- 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- xf86DrvMsg(scrnIndex, X_INFO, "Acceleration disabled\n");
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n");
1351N/A if (xf86QueryLargestOffscreenArea(pScreen, &width, &height,
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- 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- xf86DrvMsg(scrnIndex, X_INFO, "Using software cursor\n");
1351N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n");
1351N/A /* Wrap pointer motion to flip touch screen around */
1351N/A info->PointerMoved = pScrn->PointerMoved;
1351N/A pScrn->PointerMoved = RADEONPointerMoved;
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
1351N/A-Bool RADEONSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
1351N/A+Bool RADEONSwitchMode(SWITCH_MODE_ARGS_DECL)
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A Bool tilingOld = info->tilingEnabled;
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 /* 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- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
1351N/A-void RADEONAdjustFrame(int scrnIndex, int x, int y, int flags)
1351N/A+void RADEONAdjustFrame(ADJUST_FRAME_ARGS_DECL)
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
1351N/A xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
1351N/A /* Called when VT switching back to the X server. Reinitialize the
1351N/A-Bool RADEONEnterVT(int scrnIndex, int flags)
1351N/A+Bool RADEONEnterVT(VT_FUNC_ARGS_DECL)
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
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 /* Called when VT switching away from the X server. Restore the
1351N/A-void RADEONLeaveVT(int scrnIndex, int flags)
1351N/A+void RADEONLeaveVT(VT_FUNC_ARGS_DECL)
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
1351N/A * text mode, unmap video memory, and unwrap and call the saved
1351N/A-static Bool RADEONCloseScreen(int scrnIndex, ScreenPtr pScreen)
1351N/A+static Bool RADEONCloseScreen(CLOSE_SCREEN_ARGS_DECL)
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
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-void RADEONFreeScreen(int scrnIndex, int flags)
1351N/A+void RADEONFreeScreen(FREE_SCREEN_ARGS_DECL)
1351N/A- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
1351N/A-static Bool RADEONDRIDoCloseScreen(int scrnIndex, ScreenPtr pScreen)
1351N/A+static Bool RADEONDRIDoCloseScreen(CLOSE_SCREEN_ARGS_DECL)
1351N/A- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
1351N/A+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A RADEONDRICloseScreen(pScreen);
1351N/A pScreen->CloseScreen = info->DRICloseScreen;
1351N/A- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
1351N/A+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
1351N/A /* Finish initializing the device-dependent DRI state, and call
1351N/A- RADEONSwitchMode(indx, pScrn->currentMode, 0);
1351N/A+ RADEONSwitchMode(indx, pScrn->currentMode);
1351N/A if (info->directRenderingEnabled) {
1351N/A RADEONCP_STOP(pScrn, info);
1351N/A RADEONCP_START(pScrn, info);
1351N/A- RADEONAdjustFrame(indx, 0, 0, 0);
1351N/A+ RADEONAdjustFrame(indx, 0, 0);
1351N/A if (!info->DGAactive) { /* save the old parameters */
1351N/A /* RADEONModeInit() will set the mode field */
1351N/A- RADEONSwitchMode(indx, pMode->mode, 0);
1351N/A+ RADEONSwitchMode(indx, pMode->mode);
1351N/A if (info->directRenderingEnabled) {
1351N/A RADEONInfoPtr info = RADEONPTR(pScrn);
1351N/A- RADEONAdjustFrame(pScrn->pScreen->myNum, x, y, flags);
1351N/A+ RADEONAdjustFrame(pScrn->pScreen->myNum, x, y);
1351N/A info->DGAViewportStatus = 0; /* FIXME */