summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c6
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index 81c8049325f..5476b8cf10c 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -659,7 +659,9 @@ struct pipe_screen *
vc4_screen_create(int fd, struct renderonly *ro)
{
struct vc4_screen *screen = rzalloc(NULL, struct vc4_screen);
+ uint64_t syncobj_cap = 0;
struct pipe_screen *pscreen;
+ int err;
pscreen = &screen->base;
@@ -695,6 +697,10 @@ vc4_screen_create(int fd, struct renderonly *ro)
screen->has_perfmon_ioctl =
vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_PERFMON);
+ err = drmGetCap(fd, DRM_CAP_SYNCOBJ, &syncobj_cap);
+ if (err == 0 && syncobj_cap)
+ screen->has_syncobj = true;
+
if (!vc4_get_chip_info(screen))
goto fail;
diff --git a/src/gallium/drivers/vc4/vc4_screen.h b/src/gallium/drivers/vc4/vc4_screen.h
index 0b884423ba5..438e90a1a2c 100644
--- a/src/gallium/drivers/vc4/vc4_screen.h
+++ b/src/gallium/drivers/vc4/vc4_screen.h
@@ -98,6 +98,7 @@ struct vc4_screen {
bool has_madvise;
bool has_tiling_ioctl;
bool has_perfmon_ioctl;
+ bool has_syncobj;
struct vc4_simulator_file *sim_file;
};