drm/vc4: Use vc4_perfmon_find()

Similar to commit f2a4bcb253 ("drm/v3d: Use v3d_perfmon_find()"),
replace the open-coded `vc4_perfmon_find()` with the real thing.

Cc: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241004123817.890016-1-mcanal@igalia.com
This commit is contained in:
Maíra Canal 2024-10-04 09:35:59 -03:00
parent 574c558ddb
commit 82fe69e63d
No known key found for this signature in database
GPG Key ID: 3FF30E8A7688FAAA

View File

@ -236,11 +236,7 @@ int vc4_perfmon_get_values_ioctl(struct drm_device *dev, void *data,
return -ENODEV;
}
mutex_lock(&vc4file->perfmon.lock);
perfmon = idr_find(&vc4file->perfmon.idr, req->id);
vc4_perfmon_get(perfmon);
mutex_unlock(&vc4file->perfmon.lock);
perfmon = vc4_perfmon_find(vc4file, req->id);
if (!perfmon)
return -EINVAL;