[PATCH 00/36] drm: Fareless gem_free_object

Emil Velikov emil.l.velikov at gmail.com
Fri May 8 10:35:12 UTC 2020


On Thu, 7 May 2020 at 19:17, Sam Ravnborg <sam at ravnborg.org> wrote:
>
> Hi Emil.
> On Thu, May 07, 2020 at 04:07:46PM +0100, Emil Velikov wrote:
> > Hi all,
> >
> > Recently I had a look at the new dmabuf AMDGPU implementation.
> >
> > Seemingly it was using the wrong drm_gem_object_put API. Namely the
> > locked one, even though the driver is struct_mutex free.
> >
> > Upon checking with the documentation, I've noticed it's a bit misleading
> > so I've went ahead and:
> >
> >  - tweaked the drm_gem_object_put/struct_mutex references in the docs
> >  - fixed up the AMDGPU caller
> >  - removed the gem_free_object driver hook - \o/
> >  - fold drm_gem_object_put_unlocked and __drm_gem_object_put
> >  - drm_gem_object_put - add _locked suffix
> >  - drm_gem_object_put_unlocked - remove _unlocked suffix
> >
> > Although the rename patches are a handful, it does make sense to have a
> > consistent and obviously named API.
> >
> > Input and reviews are highly appreciated.
> All patches I did not comment are:
> Acked-by: Sam Ravnborg <sam at ravnborg.org>
>
Thanks Sam.

> I see why you introduced _unlocked, and remove it again.
> So you could ask the compiler to help you.
>
> But I see this as something that should not be committed and only
> part of your own tree.
> But thats not something I feel too strong about - let's just say it
> confused me a lttle.
>
I believe the confusion should be addressed now.

-Emil


More information about the dri-devel mailing list