[PATCH v2 4/6] modesetting: Add a drmmode_bo_has_bo helper function
Jason Ekstrand
jason at jlekstrand.net
Wed Jan 7 15:59:09 PST 2015
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 74a9e3b..5040d38 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -83,6 +83,17 @@ drmmode_bo_get_pitch(drmmode_bo *bo)
return bo->dumb->pitch;
}
+static Bool
+drmmode_bo_has_bo(drmmode_bo *bo)
+{
+#ifdef GLAMOR_HAS_GBM
+ if (bo->gbm)
+ return TRUE;
+#endif
+
+ return bo->dumb != NULL;
+}
+
uint32_t
drmmode_bo_get_handle(drmmode_bo *bo)
{
--
2.2.0
More information about the xorg-devel
mailing list