summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2016-01-01 18:10:08 -0800
committerAdam Jackson <ajax@redhat.com>2016-01-05 13:23:56 -0500
commitfe8562f5316d8c74ca074ad145295c65ddff5fc2 (patch)
tree4b9b74466c4d155acd9f0cab2d8bda8fc785775e
parent792176417f7e62a99c4f07801f74f804d6080de2 (diff)
modesetting should not reference gbm when it's not defined
Fixes build errors of: present.c: In function 'ms_do_pageflip': present.c:410:17: error: 'drmmode_bo' has no member named 'gbm' new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front); ^ present.c:412:22: error: 'drmmode_bo' has no member named 'gbm' if (!new_front_bo.gbm) { ^ present.c: In function 'ms_present_check_flip': present.c:536:36: error: 'drmmode_bo' has no member named 'gbm' if (drmmode_crtc->rotate_bo.gbm) ^ Introduced by commit 13c7d53d Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--hw/xfree86/drivers/modesetting/present.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c
index bb2976b13..d65c8c845 100644
--- a/hw/xfree86/drivers/modesetting/present.c
+++ b/hw/xfree86/drivers/modesetting/present.c
@@ -398,6 +398,9 @@ ms_do_pageflip(ScreenPtr screen,
int ref_crtc_vblank_pipe,
Bool async)
{
+#ifndef GLAMOR_HAS_GBM
+ return FALSE;
+#else
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
modesettingPtr ms = modesettingPTR(scrn);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
@@ -505,6 +508,7 @@ error_out:
flipdata->flip_count--;
return FALSE;
+#endif /* GLAMOR_HAS_GBM */
}
/*
@@ -533,8 +537,10 @@ ms_present_check_flip(RRCrtcPtr crtc,
drmmode_crtc_private_ptr drmmode_crtc = config->crtc[i]->driver_private;
/* Don't do pageflipping if CRTCs are rotated. */
+#ifdef GLAMOR_HAS_GBM
if (drmmode_crtc->rotate_bo.gbm)
return FALSE;
+#endif
if (ms_crtc_on(config->crtc[i]))
num_crtcs_on++;