minigbm: Enable vc4 driver
BUG=None
TEST=graphics_Gbm on target board
Change-Id: Id92466354e644f9237f8c19aebd0534c1b23bbc0
Reviewed-on: https://chromium-review.googlesource.com/989301
Commit-Ready: Jeremy Grosser <jeremy@synack.me>
Tested-by: Jeremy Grosser <jeremy@synack.me>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/Makefile b/Makefile
index 358cd7b..6cfe96b 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,9 @@
ifdef DRV_ROCKCHIP
CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_rockchip)
endif
+ifdef DRV_VC4
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_vc4)
+endif
CPPFLAGS += $(PC_CFLAGS)
LDLIBS += $(PC_LIBS)
diff --git a/vc4.c b/vc4.c
index f9e1c13..71e73ea 100644
--- a/vc4.c
+++ b/vc4.c
@@ -73,7 +73,7 @@
}
vma->length = bo->total_size;
- return mmap(0, bo->total_size, drv_get_prot(map_flags), MAP_SHARED, bo->drv->fd,
+ return mmap(NULL, bo->total_size, drv_get_prot(map_flags), MAP_SHARED, bo->drv->fd,
bo_map.offset);
}