Skip to contentSkip to conversation

drm: Keep a reference to the active plane framebuffer

PATCH In review Thierry Reding 2 participants 3 messages Feb 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: Keep a reference to the active plane framebuffer

When updating a plane, the DRM core always sets the plane's framebuffer to NULL. This in turn will cause the reference count on the plane's active framebuffer to become unbalanced because on the next update, the old framebuffer will be NULL.

---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_crtc.c +1 -1
index d06ec7e..b235fa0 100644
@@ -1984,9 +1984,9 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
 					 plane_req->src_w, plane_req->src_h);
 	if (!ret) {
 		old_fb = plane->fb;
+		plane->fb = fb;
 		fb = NULL;
 		plane->crtc = crtc;
-		plane->fb = fb;
 	}
 	drm_modeset_unlock_all(dev);
 
Signature · 1 line
1.8.1.2
#2 lore raw
Quoted 9 lines · Ville Syrjälä
Quoted 6 lines · Thierry Reding

When updating a plane, the DRM core always sets the plane's framebuffer to NULL. This in turn will cause the reference count on the plane's active framebuffer to become unbalanced because on the next update, the old framebuffer will be NULL.

http://lists.freedesktop.org/archives/dri-devel/2013-February/034978.html

Darn, I had searched for it but must have missed it. Thanks.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel