提交 35f8badc 编写于 作者: D Daniel Vetter 提交者: Dave Airlie

drm: Don't set the plane->fb to NULL on successfull set_plane

We need to clear the local variable to get the refcounting right
(since the reference drm_mode_setplane holds is transferred to the
plane->fb pointer). But should be done _after_ we update the pointer.

Breakage introduced in

commit 6c2a7532
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 11 00:59:24 2012 +0100

    drm: refcounting for sprite framebuffers
Reported-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Cc: Rob Clark <rob@ti.com>
Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: NThierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 196e077d
...@@ -1996,9 +1996,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data, ...@@ -1996,9 +1996,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
plane_req->src_w, plane_req->src_h); plane_req->src_w, plane_req->src_h);
if (!ret) { if (!ret) {
old_fb = plane->fb; old_fb = plane->fb;
fb = NULL;
plane->crtc = crtc; plane->crtc = crtc;
plane->fb = fb; plane->fb = fb;
fb = NULL;
} }
drm_modeset_unlock_all(dev); drm_modeset_unlock_all(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册