Commit 23a5e1fb authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

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: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180322152313.6561-8-ville.syrjala@linux.intel.com


Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
parent bf2d5eb9
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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: