summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_screen.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c7
1 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 5b944bf030b..397be545d9a 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -680,6 +680,8 @@ vc4_screen_create(int fd, struct renderonly *ro)
vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_THREADED_FS);
screen->has_madvise =
vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_MADVISE);
+ screen->has_perfmon_ioctl =
+ vc4_has_feature(screen, DRM_VC4_PARAM_SUPPORTS_PERFMON);
if (!vc4_get_chip_info(screen))
goto fail;
@@ -706,6 +708,11 @@ vc4_screen_create(int fd, struct renderonly *ro)
pscreen->get_compiler_options = vc4_screen_get_compiler_options;
pscreen->query_dmabuf_modifiers = vc4_screen_query_dmabuf_modifiers;
+ if (screen->has_perfmon_ioctl) {
+ pscreen->get_driver_query_group_info = vc4_get_driver_query_group_info;
+ pscreen->get_driver_query_info = vc4_get_driver_query_info;
+ }
+
return pscreen;
fail: