v3d: check if device supports performance monitors

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666>
This commit is contained in:
Juan A. Suarez Romero 2021-04-21 12:22:33 +02:00 committed by Marge Bot
parent ca13868098
commit 6b9fcb0193
3 changed files with 5 additions and 0 deletions

View file

@ -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]) {

View file

@ -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);

View file

@ -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;