[PATCH 12/36] drm/amd: remove _unlocked suffix in drm_object_put_unlocked

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

Hi Christian,

On Fri, 8 May 2020 at 10:23, Christian König <christian.koenig at amd.com> wrote:
> Am 07.05.20 um 17:07 schrieb Emil Velikov:
> > From: Emil Velikov <emil.velikov at collabora.com>
> >
> > Spelling out _unlocked for each and every driver is a annoying.
> > Especially if we consider how many drivers, do not know (or need to)
> > about the horror stories involving struct_mutex.
> >
> > Just drop the suffix. It makes the API cleaner.
> In general sounds like a good idea to me, but I don't see the full
> patchset in my mailbox.
The series is quite long, you can see it here

> With the current code this change would probably trigger the
> "WARN_ON(!mutex_is_locked(&obj->dev->struct_mutex));" in
> drm_gem_object_put().
Earlier patch renames drm_gem_object_put, adding explicit "_locked"
suffix to it.

If the series is applied atomically, then that issue will not happen.
Doing so might cause trivial merge conflicts, for individual drivers.
Nothing a simple build check won't highlight/catch.

Although if the AMD team has pending work which will seriously clash
with this, could delay the "remove _unlocked suffix" part of the


More information about the dri-devel mailing list