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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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 {