Message ID | 20241004123817.890016-1-mcanal@igalia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] drm/vc4: Use `vc4_perfmon_find()` | expand |
Reviewed-by: Juan A. Suarez <jasuarez@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@igalia.com> > Signed-off-by: Maíra Canal <mcanal@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; >
> 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: Christian Gmeiner <cgmeiner@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; >
On 10/4/24 09:35, 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@igalia.com> > Signed-off-by: Maíra Canal <mcanal@igalia.com> > --- > drivers/gpu/drm/vc4/vc4_perfmon.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > Applied to misc/kernel.git (drm-misc-next). Best Regards, - Maíra
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;
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> --- drivers/gpu/drm/vc4/vc4_perfmon.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)