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: Maíra Canal <mcanal@igalia.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240512222655.2792754-4-mcanal@igalia.com
This commit is contained in:
@@ -94,6 +94,9 @@ static int v3d_get_param_ioctl(struct drm_device *dev, void *data,
|
||||
case DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE:
|
||||
args->value = 1;
|
||||
return 0;
|
||||
case DRM_V3D_PARAM_MAX_PERF_COUNTERS:
|
||||
args->value = v3d->max_counters;
|
||||
return 0;
|
||||
default:
|
||||
DRM_DEBUG("Unknown parameter %d\n", args->param);
|
||||
return -EINVAL;
|
||||
|
||||
@@ -286,6 +286,7 @@ enum drm_v3d_param {
|
||||
DRM_V3D_PARAM_SUPPORTS_PERFMON,
|
||||
DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT,
|
||||
DRM_V3D_PARAM_SUPPORTS_CPU_QUEUE,
|
||||
DRM_V3D_PARAM_MAX_PERF_COUNTERS,
|
||||
};
|
||||
|
||||
struct drm_v3d_get_param {
|
||||
|
||||
Reference in New Issue
Block a user