提交 23a5e1fb 编写于 作者: V Ville Syrjälä

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: NVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180322152313.6561-8-ville.syrjala@linux.intel.comReviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
上级 bf2d5eb9
...@@ -1084,8 +1084,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, ...@@ -1084,8 +1084,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
plane->old_fb = NULL; plane->old_fb = NULL;
} else { } else {
plane->fb = fb; plane->fb = fb;
/* Unref only the old framebuffer. */ drm_framebuffer_get(fb);
fb = NULL;
} }
out: out:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册