diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-03-22 18:22:57 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2018-03-29 19:14:21 +0300 |
commit | 23a5e1fb349d80d8c0eb97644dea16d2d7cfac26 (patch) | |
tree | 5e999fb905f6eb0bfaedd0532324980ed78f5e82 /drivers | |
parent | bf2d5eb902e29d6e7c25540b85242744591b703e (diff) | |
download | linux-23a5e1fb349d80d8c0eb97644dea16d2d7cfac26.tar.xz |
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')
-rw-r--r-- | drivers/gpu/drm/drm_plane.c | 3 |
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: |