]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/vc4: Use `vc4_perfmon_find()`
authorMaíra Canal <mcanal@igalia.com>
Fri, 4 Oct 2024 12:35:59 +0000 (09:35 -0300)
committerMaíra Canal <mcanal@igalia.com>
Mon, 7 Oct 2024 13:04:46 +0000 (10:04 -0300)
Similar to commit f2a4bcb25328 ("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
drivers/gpu/drm/vc4/vc4_perfmon.c

index 4cd3643c3ba753da93d570dab90f38731b7bc7d8..f2e56d0f62988f28c522727066fc456ce3bc2cd8 100644 (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;