drm: Introduce drm_gem_object_{get,put}()
authorThierry Reding <treding@nvidia.com>
Tue, 28 Feb 2017 14:46:41 +0000 (15:46 +0100)
committerThierry Reding <treding@nvidia.com>
Tue, 28 Feb 2017 15:16:43 +0000 (16:16 +0100)
commite6b62714e87c8811d5564b6a0738dcde63a51774
tree295fdcf6c17e379b393de020cd0c0848ba0a872b
parenta4a69da06bc11a937a6e417938b1bb698ee1fa46
drm: Introduce drm_gem_object_{get,put}()

For consistency with other reference counting APIs in the kernel, add
drm_gem_object_get() and drm_gem_object_put(), as well as an unlocked
variant of the latter, to reference count GEM buffer objects.

Compatibility aliases are added to keep existing code working. To help
speed up the transition, all the instances of the old functions in the
DRM core are already replaced in this commit.

The existing semantic patch for the DRM subsystem-wide conversion is
extended to account for these new helpers.

Reviewed-by: Sean Paul <seanpaul@chromium.org>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-6-thierry.reding@gmail.com
Documentation/gpu/drm-mm.rst
drivers/gpu/drm/drm_fb_cma_helper.c
drivers/gpu/drm/drm_gem.c
drivers/gpu/drm/drm_gem_cma_helper.c
drivers/gpu/drm/drm_prime.c
include/drm/drm_gem.h
scripts/coccinelle/api/drm-get-put.cocci