Skip to content

Commit

Permalink
drm/vc4: Use vc4_perfmon_find()
Browse files Browse the repository at this point in the history
Similar to commit f2a4bcb ("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
  • Loading branch information
Maíra Canal committed Oct 7, 2024
1 parent 574c558 commit 82fe69e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/gpu/drm/vc4/vc4_perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 82fe69e

Please sign in to comment.