[PATCH 1/2] drm/vc4: Use `vc4_perfmon_find()`

Juan A. Suárez jasuarez at igalia.com
Fri Oct 4 16:24:36 UTC 2024


Reviewed-by: Juan A. Suarez <jasuarez at igalia.com>

On Fri, 2024-10-04 at 09:35 -0300, Maíra Canal wrote:
> 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 at igalia.com>
> Signed-off-by: Maíra Canal <mcanal at igalia.com>
> ---
>  drivers/gpu/drm/vc4/vc4_perfmon.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_perfmon.c
> b/drivers/gpu/drm/vc4/vc4_perfmon.c
> index 4cd3643c3ba7..f2e56d0f6298 100644
> --- a/drivers/gpu/drm/vc4/vc4_perfmon.c
> +++ b/drivers/gpu/drm/vc4/vc4_perfmon.c
> @@ -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;
>  



More information about the dri-devel mailing list