diff options
author | Dave Airlie <airlied@redhat.com> | 2012-06-01 12:22:06 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-06-01 12:25:48 +0100 |
commit | c1b9b2c9d71a87a0b98ccdb542da8a30c8c4d99a (patch) | |
tree | af02b82f1843671b511e5a6884994892cfdac603 | |
parent | 68c51d148b22ee8cbe98b5d5441e3494804ee808 (diff) |
radeon: fix compat api for newest planned API.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | src/compat-api.h | 18 | ||||
-rw-r--r-- | src/radeon_driver.c | 10 | ||||
-rw-r--r-- | src/radeon_kms.c | 10 | ||||
-rw-r--r-- | src/radeon_probe.h | 20 |
4 files changed, 36 insertions, 22 deletions
diff --git a/src/compat-api.h b/src/compat-api.h index aa6b9561..b299f83c 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -54,7 +54,15 @@ #define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen #define CLOSE_SCREEN_ARGS scrnIndex, pScreen -#define VTFUNC_ARGS(flags) pScrn->scrnIndex, (flags) +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags + +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags + +#define FREE_SCREEN_ARGS_DECL int arg, int flags + +#define VT_FUNC_ARGS_DECL int arg, int flags +#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) + #define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) #else #define SCRN_ARG_TYPE ScrnInfoPtr @@ -71,7 +79,13 @@ #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen #define CLOSE_SCREEN_ARGS pScreen -#define VTFUNC_ARGS(flags) pScrn, (flags) +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode + +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg + +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg +#define VT_FUNC_ARGS(flags) pScrn #define XF86_ENABLEDISABLEFB_ARG(x) (x) diff --git a/src/radeon_driver.c b/src/radeon_driver.c index cee25d89..56354ad5 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -5952,7 +5952,7 @@ static Bool RADEONSaveScreen(ScreenPtr pScreen, int mode) return TRUE; } -Bool RADEONSwitchMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, int flags) +Bool RADEONSwitchMode(SWITCH_MODE_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -6186,7 +6186,7 @@ void RADEONDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y, Bool crtc2) OUTREG(reg, Base); } -void RADEONAdjustFrame(SCRN_ARG_TYPE arg, int x, int y, int flags) +void RADEONAdjustFrame(ADJUST_FRAME_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -6224,7 +6224,7 @@ void RADEONAdjustFrame(SCRN_ARG_TYPE arg, int x, int y, int flags) /* Called when VT switching back to the X server. Reinitialize the * video mode. */ -Bool RADEONEnterVT(SCRN_ARG_TYPE arg, int flags) +Bool RADEONEnterVT(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -6324,7 +6324,7 @@ Bool RADEONEnterVT(SCRN_ARG_TYPE arg, int flags) /* Called when VT switching away from the X server. Restore the * original text mode. */ -void RADEONLeaveVT(SCRN_ARG_TYPE arg, int flags) +void RADEONLeaveVT(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -6499,7 +6499,7 @@ static Bool RADEONCloseScreen(CLOSE_SCREEN_ARGS_DECL) return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } -void RADEONFreeScreen(SCRN_ARG_TYPE arg, int flags) +void RADEONFreeScreen(FREE_SCREEN_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 9e086271..b6c035d2 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -901,7 +901,7 @@ static Bool RADEONCloseScreen_KMS(CLOSE_SCREEN_ARGS_DECL) } -void RADEONFreeScreen_KMS(SCRN_ARG_TYPE arg, int flags) +void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -1148,7 +1148,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) return TRUE; } -Bool RADEONEnterVT_KMS(SCRN_ARG_TYPE arg, int flags) +Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -1176,7 +1176,7 @@ Bool RADEONEnterVT_KMS(SCRN_ARG_TYPE arg, int flags) } -void RADEONLeaveVT_KMS(SCRN_ARG_TYPE arg, int flags) +void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); @@ -1199,7 +1199,7 @@ void RADEONLeaveVT_KMS(SCRN_ARG_TYPE arg, int flags) } -Bool RADEONSwitchMode_KMS(SCRN_ARG_TYPE arg, DisplayModePtr mode, int flags) +Bool RADEONSwitchMode_KMS(SWITCH_MODE_ARGS_DECL) { SCRN_INFO_PTR(arg); Bool ret; @@ -1208,7 +1208,7 @@ Bool RADEONSwitchMode_KMS(SCRN_ARG_TYPE arg, DisplayModePtr mode, int flags) } -void RADEONAdjustFrame_KMS(SCRN_ARG_TYPE arg, int x, int y, int flags) +void RADEONAdjustFrame_KMS(ADJUST_FRAME_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); diff --git a/src/radeon_probe.h b/src/radeon_probe.h index a952820e..337829ff 100644 --- a/src/radeon_probe.h +++ b/src/radeon_probe.h @@ -762,15 +762,15 @@ extern PciChipsets RADEONPciChipsets[]; /* radeon_driver.c */ extern Bool RADEONPreInit(ScrnInfoPtr, int); extern Bool RADEONScreenInit(SCREEN_INIT_ARGS_DECL); -extern Bool RADEONSwitchMode(SCRN_ARG_TYPE, DisplayModePtr, int); +extern Bool RADEONSwitchMode(SWITCH_MODE_ARGS_DECL); #ifdef X_XF86MiscPassMessage extern Bool RADEONHandleMessage(int, const char*, const char*, char**); #endif -extern void RADEONAdjustFrame(SCRN_ARG_TYPE, int, int, int); -extern Bool RADEONEnterVT(SCRN_ARG_TYPE, int); -extern void RADEONLeaveVT(SCRN_ARG_TYPE, int); -extern void RADEONFreeScreen(SCRN_ARG_TYPE, int); +extern void RADEONAdjustFrame(ADJUST_FRAME_ARGS_DECL); +extern Bool RADEONEnterVT(VT_FUNC_ARGS_DECL); +extern void RADEONLeaveVT(VT_FUNC_ARGS_DECL); +extern void RADEONFreeScreen(FREE_SCREEN_ARGS_DECL); extern ModeStatus RADEONValidMode(SCRN_ARG_TYPE, DisplayModePtr, Bool, int); extern const OptionInfoRec *RADEONOptionsWeak(void); @@ -778,11 +778,11 @@ extern const OptionInfoRec *RADEONOptionsWeak(void); #ifdef XF86DRM_MODE extern Bool RADEONPreInit_KMS(ScrnInfoPtr, int); extern Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL); -extern Bool RADEONSwitchMode_KMS(SCRN_ARG_TYPE, DisplayModePtr, int); -extern void RADEONAdjustFrame_KMS(SCRN_ARG_TYPE, int, int, int); -extern Bool RADEONEnterVT_KMS(SCRN_ARG_TYPE, int); -extern void RADEONLeaveVT_KMS(SCRN_ARG_TYPE, int); -extern void RADEONFreeScreen_KMS(SCRN_ARG_TYPE, int flags); +extern Bool RADEONSwitchMode_KMS(SWITCH_MODE_ARGS_DECL); +extern void RADEONAdjustFrame_KMS(ADJUST_FRAME_ARGS_DECL); +extern Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL); +extern void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL); +extern void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL); #endif #endif /* _RADEON_PROBE_H_ */ |