aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_plane.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-03-22 17:22:57 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-03-29 19:14:21 +0300
commit23a5e1fb349d80d8c0eb97644dea16d2d7cfac26 (patch)
tree5e999fb905f6eb0bfaedd0532324980ed78f5e82 /drivers/gpu/drm/drm_plane.c
parentdrm: Adjust whitespace for legibility (diff)
downloadlinux-dev-23a5e1fb349d80d8c0eb97644dea16d2d7cfac26.tar.xz
linux-dev-23a5e1fb349d80d8c0eb97644dea16d2d7cfac26.zip
drm: Make the fb refcount handover less magic
Instead of assigning the plane->fb pointer and clearing the fb pointer to hand over the reference, let's just do it by grabbing another referece for plane->fb and let fb keep its original one. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180322152313.6561-8-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_plane.c')
-rw-r--r--drivers/gpu/drm/drm_plane.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index bedceca7dd06..008f9456a5e8 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -1084,8 +1084,7 @@ retry:
plane->old_fb = NULL;
} else {
plane->fb = fb;
- /* Unref only the old framebuffer. */
- fb = NULL;
+ drm_framebuffer_get(fb);
}
out: