diff options
author | Thierry Reding <treding@nvidia.com> | 2017-02-28 15:46:40 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2017-02-28 16:15:03 +0100 |
commit | a4a69da06bc11a937a6e417938b1bb698ee1fa46 (patch) | |
tree | f27062e64385f44ddddabc08b8d3f98cc2700446 /drivers/gpu/drm/drm_atomic_helper.c | |
parent | ad09360750afa18a0a0ce0253d6ea6033abc22e7 (diff) | |
download | op-kernel-dev-a4a69da06bc11a937a6e417938b1bb698ee1fa46.zip op-kernel-dev-a4a69da06bc11a937a6e417938b1bb698ee1fa46.tar.gz |
drm: Introduce drm_framebuffer_{get,put}()
For consistency with other reference counting APIs in the kernel, add
drm_framebuffer_get() and drm_framebuffer_put() to reference count DRM
framebuffers.
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-5-thierry.reding@gmail.com
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 6e7d9df..01b2ddd 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -3230,7 +3230,7 @@ void __drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane, memcpy(state, plane->state, sizeof(*state)); if (state->fb) - drm_framebuffer_reference(state->fb); + drm_framebuffer_get(state->fb); state->fence = NULL; } @@ -3270,7 +3270,7 @@ EXPORT_SYMBOL(drm_atomic_helper_plane_duplicate_state); void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state) { if (state->fb) - drm_framebuffer_unreference(state->fb); + drm_framebuffer_put(state->fb); if (state->fence) dma_fence_put(state->fence); |