mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL
Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow configuration of a global performance monitor (perfmon). Use the global perfmon for all jobs to ensure consistent performance tracking across submissions. This feature is needed to implement a Perfetto datasources in user-space. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241202140615.74802-1-christian.gmeiner@gmail.com
This commit is contained in:
committed by
Maíra Canal
parent
f3c03be182
commit
c6eabbab35
@@ -981,6 +981,11 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
|
||||
goto fail;
|
||||
|
||||
if (args->perfmon_id) {
|
||||
if (v3d->global_perfmon) {
|
||||
ret = -EAGAIN;
|
||||
goto fail_perfmon;
|
||||
}
|
||||
|
||||
render->base.perfmon = v3d_perfmon_find(v3d_priv,
|
||||
args->perfmon_id);
|
||||
|
||||
@@ -1196,6 +1201,11 @@ v3d_submit_csd_ioctl(struct drm_device *dev, void *data,
|
||||
goto fail;
|
||||
|
||||
if (args->perfmon_id) {
|
||||
if (v3d->global_perfmon) {
|
||||
ret = -EAGAIN;
|
||||
goto fail_perfmon;
|
||||
}
|
||||
|
||||
job->base.perfmon = v3d_perfmon_find(v3d_priv,
|
||||
args->perfmon_id);
|
||||
if (!job->base.perfmon) {
|
||||
|
||||
Reference in New Issue
Block a user