summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <rob@ti.com>2012-08-30 13:45:06 -0500
committerRob Clark <rob@ti.com>2012-08-30 13:46:15 -0500
commit5daa7791874e4b531a3d8a9f349420f4891e6b3f (patch)
tree57a1b5c779bd7859c4a88bc6d749f652e4a7c716
parent041314709f1bdfbe1544dab32fdc68e9bd59186b (diff)
add EnableDisableFBAccess to compat-api
Fixes build break w/ latest xserver: drmmode_display.c: In function 'drmmode_reallocate_scanout': drmmode_display.c:1149:4: error: passing argument 1 of 'pScrn->EnableDisableFBAccess' makes pointer from integer without a cast [-Werror] drmmode_display.c:1149:4: note: expected 'ScrnInfoPtr' but argument is of type 'int' drmmode_display.c:1183:4: error: passing argument 1 of 'pScrn->EnableDisableFBAccess' makes pointer from integer without a cast [-Werror] drmmode_display.c:1183:4: note: expected 'ScrnInfoPtr' but argument is of type 'int' cc1: all warnings being treated as errors Signed-off-by: Rob Clark <rob@ti.com>
-rw-r--r--src/compat-api.h4
-rw-r--r--src/drmmode_display.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/compat-api.h b/src/compat-api.h
index b1591b1..4f7b9ea 100644
--- a/src/compat-api.h
+++ b/src/compat-api.h
@@ -64,6 +64,8 @@
#define VT_FUNC_ARGS_DECL int arg, int flags
#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
+#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn->scrnIndex, b
+
#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
#else
#define SCRN_ARG_TYPE ScrnInfoPtr
@@ -89,6 +91,8 @@
#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
#define VT_FUNC_ARGS(flags) pScrn
+#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn, b
+
#define XF86_ENABLEDISABLEFB_ARG(x) (x)
#endif
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 901782d..584fbb9 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1146,7 +1146,7 @@ drmmode_reallocate_scanout(ScrnInfoPtr pScrn, Bool redraw)
if (changed) {
if (pScreen && pScrn->EnableDisableFBAccess && redraw)
- pScrn->EnableDisableFBAccess(pScrn->scrnIndex, FALSE);
+ pScrn->EnableDisableFBAccess(ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, FALSE));
/* delete old scanout buffer */
omap_bo_del(pOMAP->scanout);
@@ -1180,7 +1180,7 @@ drmmode_reallocate_scanout(ScrnInfoPtr pScrn, Bool redraw)
}
if (pScreen && pScrn->EnableDisableFBAccess && redraw)
- pScrn->EnableDisableFBAccess(pScrn->scrnIndex, TRUE);
+ pScrn->EnableDisableFBAccess(ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, TRUE));
}
return TRUE;