Re: [PATCH 10/36] drm/gem: add _locked suffix to drm_object_put

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 8 May 2020 at 07:40, Daniel Vetter <daniel@xxxxxxxx> wrote:
>
> On Thu, May 07, 2020 at 04:07:56PM +0100, Emil Velikov wrote:
> > From: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
> >
> > Vast majority of DRM (core and drivers) are struct_mutex free.
> >
> > As such we have only a handful of cases where the locked helper should
> > be used. Make that stand out a little bit better.
> >
> > Done via the following script:
> >
> > __from=drm_gem_object_put
> > __to=drm_gem_object_put_locked
> >
> > for __file in $(git grep --name-only --word-regexp $__from); do
> >   sed -i  "s/\<$__from\>/$__to/g" $__file;
> > done
> >
> > Cc: Rob Clark <robdclark@xxxxxxxxx>
> > Cc: Sean Paul <sean@xxxxxxxxxx>
> > Cc: linux-arm-msm@xxxxxxxxxxxxxxx
> > Signed-off-by: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
>
> Since
>
> commit 48e7f18392c66f9b69ebac11c54f1a2e033ced54
> Author: Kristian H. Kristensen <hoegsberg@xxxxxxxxx>
> Date:   Wed Mar 20 10:09:08 2019 -0700
>
>     drm/msm: Implement .gem_free_object_unlocked
>
> msm doesn't need the struct_mutex in the bo_put anymore, the only reason
> we had to use the _locked version here is historical accidents I think.
>
> I think you could convert these all to the _unlocked variant and then
> entirely drop the _locked version.
>
Did not check the msm driver closely, but it makes sense. Let's keep
that as follow-up series?
We're already at 36 patches, plus mixing mostly mechanical and locking
changes doesn't sound wise.

> Once we have that we could move struct_mutex into each driver (at least
> for msm and i915) since it's purely internal, and then wrap it in an
> #ifdef CONFIG_DRM_LEGACY to gloriously sunset it all :-)
>
Indeed, we're nearly there.

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux