diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-07 15:52:16 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-06-07 15:52:16 +0100 |
commit | 713e9501b87465cf2a62c27605b6fc4a454dad95 (patch) | |
tree | 0be6ee6ba5f01ad4f16c4c798a69992b36047186 /src/g80_driver.c | |
parent | b3d61828837661c9b383378a7d6006752659108b (diff) |
nv: port to new compat API.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/g80_driver.c')
-rw-r--r-- | src/g80_driver.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/g80_driver.c b/src/g80_driver.c index 35e5d7e..c666977 100644 --- a/src/g80_driver.c +++ b/src/g80_driver.c @@ -495,9 +495,9 @@ ReleaseDisplay(ScrnInfoPtr pScrn) } static Bool -G80CloseScreen(int scrnIndex, ScreenPtr pScreen) +G80CloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); G80Ptr pNv = G80PTR(pScrn); if(pScrn->vtSema) @@ -530,14 +530,14 @@ G80CloseScreen(int scrnIndex, ScreenPtr pScreen) pScrn->vtSema = FALSE; pScreen->CloseScreen = pNv->CloseScreen; pScreen->BlockHandler = pNv->BlockHandler; - return (*pScreen->CloseScreen)(scrnIndex, pScreen); + return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } static void -G80BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask) +G80BlockHandler(BLOCKHANDLER_ARGS_DECL) { - ScreenPtr pScreen = screenInfo.screens[i]; - ScrnInfoPtr pScrnInfo = xf86Screens[i]; + SCREEN_PTR(arg); + ScrnInfoPtr pScrnInfo = xf86ScreenToScrn(pScreen); G80Ptr pNv = G80PTR(pScrnInfo); if(pNv->DMAKickoffCallback) @@ -546,7 +546,7 @@ G80BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask) G80OutputResetCachedStatus(pScrnInfo); pScreen->BlockHandler = pNv->BlockHandler; - (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask); + (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); pScreen->BlockHandler = G80BlockHandler; } @@ -738,7 +738,7 @@ G80InitHW(ScrnInfoPtr pScrn) } static Bool -G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) +G80ScreenInit(SCREEN_INIT_ARGS_DECL) { ScrnInfoPtr pScrn; G80Ptr pNv; @@ -747,7 +747,7 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) BoxRec AvailFBArea; /* First get the ScrnInfoRec */ - pScrn = xf86Screens[pScreen->myNum]; + pScrn = xf86ScreenToScrn(pScreen); pNv = G80PTR(pScrn); pScrn->vtSema = TRUE; @@ -885,27 +885,28 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } static void -G80FreeScreen(int scrnIndex, int flags) +G80FreeScreen(FREE_SCREEN_ARGS_DECL) { - G80FreeRec(xf86Screens[scrnIndex]); + SCRN_INFO_PTR(arg); + G80FreeRec(pScrn); } static Bool -G80SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) +G80SwitchMode(SWITCH_MODE_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); return xf86SetSingleMode(pScrn, mode, RR_Rotate_0); } static void -G80AdjustFrame(int scrnIndex, int x, int y, int flags) +G80AdjustFrame(ADJUST_FRAME_ARGS_DECL) { } static Bool -G80EnterVT(int scrnIndex, int flags) +G80EnterVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); G80Ptr pNv = G80PTR(pScrn); /* Reinit the hardware */ @@ -919,9 +920,9 @@ G80EnterVT(int scrnIndex, int flags) } static void -G80LeaveVT(int scrnIndex, int flags) +G80LeaveVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); ReleaseDisplay(pScrn); } |