Commit 36b75080 authored by Maíra Canal's avatar Maíra Canal

drm/v3d: Create a new V3D parameter for the maximum number of perfcnt

The maximum number of performance counters can change from version to
version and it's important for userspace to know this value, as it needs
to use the counters for performance queries. Therefore, expose the
maximum number of performance counters to userspace as a parameter.
Signed-off-by: default avatarMaíra Canal <mcanal@igalia.com>
Reviewed-by: default avatarIago Toral Quiroga <itoral@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-4-mcanal@igalia.com
parent c606043d
...@@ -94,6 +94,9 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data, ...@@ -94,6 +94,9 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
case DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE: case DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE:
args->value = 1; args->value = 1;
return 0; return 0;
case DRM_V3D_PARAM_MAX_PERF_COUNTERS:
args->value = v3d->max_counters;
return 0;
default: default:
DRM_DEBUG("Unknown parameter %d\n", args->param); DRM_DEBUG("Unknown parameter %d\n", args->param);
return -EINVAL; return -EINVAL;
......
...@@ -286,6 +286,7 @@ enum drm_v3d_param { ...@@ -286,6 +286,7 @@ enum drm_v3d_param {
DRM_V3D_PARAM_SUPPORTS_PERFMON, DRM_V3D_PARAM_SUPPORTS_PERFMON,
DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT, DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT,
DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE, DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE,
DRM_V3D_PARAM_MAX_PERF_COUNTERS,
}; };
struct drm_v3d_get_param { struct drm_v3d_get_param {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment