All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: Keep a reference to the active plane framebuffer
@ 2013-02-19 15:18 Thierry Reding
  2013-02-19 15:32 ` Ville Syrjälä
  0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2013-02-19 15:18 UTC (permalink / raw)
  To: Dave Airlie; +Cc: Daniel Vetter, dri-devel

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.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
---
 drivers/gpu/drm/drm_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index d06ec7e..b235fa0 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -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);
 
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: Keep a reference to the active plane framebuffer
  2013-02-19 15:18 [PATCH] drm: Keep a reference to the active plane framebuffer Thierry Reding
@ 2013-02-19 15:32 ` Ville Syrjälä
  2013-02-19 15:36   ` Thierry Reding
  0 siblings, 1 reply; 3+ messages in thread
From: Ville Syrjälä @ 2013-02-19 15:32 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Daniel Vetter, dri-devel

On Tue, Feb 19, 2013 at 04:18:07PM +0100, Thierry Reding wrote:
> 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.
> 
> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>

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

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm: Keep a reference to the active plane framebuffer
  2013-02-19 15:32 ` Ville Syrjälä
@ 2013-02-19 15:36   ` Thierry Reding
  0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2013-02-19 15:36 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Daniel Vetter, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 627 bytes --]

On Tue, Feb 19, 2013 at 05:32:56PM +0200, Ville Syrjälä wrote:
> On Tue, Feb 19, 2013 at 04:18:07PM +0100, Thierry Reding wrote:
> > 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.
> > 
> > Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
> 
> http://lists.freedesktop.org/archives/dri-devel/2013-February/034978.html

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

Thierry

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-19 15:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-19 15:18 [PATCH] drm: Keep a reference to the active plane framebuffer Thierry Reding
2013-02-19 15:32 ` Ville Syrjälä
2013-02-19 15:36   ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.