Mesa (main): v3d: check if device supports performance monitors
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 3 09:46:48 UTC 2021
Module: Mesa
Branch: main
Commit: 6b9fcb01930c80436bb492f2f0b37ba65405a1ea
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b9fcb01930c80436bb492f2f0b37ba65405a1ea
Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date: Wed Apr 21 12:22:33 2021 +0200
v3d: check if device supports performance monitors
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666>
---
src/broadcom/simulator/v3dx_simulator.c | 3 +++
src/gallium/drivers/v3d/v3d_screen.c | 1 +
src/gallium/drivers/v3d/v3d_screen.h | 1 +
3 files changed, 5 insertions(+)
diff --git a/src/broadcom/simulator/v3dx_simulator.c b/src/broadcom/simulator/v3dx_simulator.c
index f00f1b0ed5a..0fd090d5788 100644
--- a/src/broadcom/simulator/v3dx_simulator.c
+++ b/src/broadcom/simulator/v3dx_simulator.c
@@ -266,6 +266,9 @@ v3dX(simulator_get_param_ioctl)(struct v3d_hw *v3d,
case DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH:
args->value = 1;
return 0;
+ case DRM_V3D_PARAM_SUPPORTS_PERFMON:
+ args->value = 0;
+ return 0;
}
if (args->param < ARRAY_SIZE(reg_map) && reg_map[args->param]) {
diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c
index dee8a983671..4d3ff0c7f56 100644
--- a/src/gallium/drivers/v3d/v3d_screen.c
+++ b/src/gallium/drivers/v3d/v3d_screen.c
@@ -809,6 +809,7 @@ v3d_screen_create(int fd, const struct pipe_screen_config *config,
screen->has_csd = v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_CSD);
screen->has_cache_flush =
v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH);
+ screen->has_perfmon = v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_PERFMON);
v3d_fence_init(screen);
diff --git a/src/gallium/drivers/v3d/v3d_screen.h b/src/gallium/drivers/v3d/v3d_screen.h
index 32848a4a700..3469731a2df 100644
--- a/src/gallium/drivers/v3d/v3d_screen.h
+++ b/src/gallium/drivers/v3d/v3d_screen.h
@@ -79,6 +79,7 @@ struct v3d_screen {
bool has_csd;
bool has_cache_flush;
+ bool has_perfmon;
bool nonmsaa_texture_size_limit;
struct v3d_simulator_file *sim_file;
More information about the mesa-commit
mailing list