From: Thierry Reding <thierry.reding@avionic-design.de>
To: Dave Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, dri-devel@lists.freedesktop.org
Subject: [PATCH] drm: Keep a reference to the active plane framebuffer
Date: Tue, 19 Feb 2013 16:18:07 +0100 [thread overview]
Message-ID: <1361287087-32035-1-git-send-email-thierry.reding@avionic-design.de> (raw)
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
next reply other threads:[~2013-02-19 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-19 15:18 Thierry Reding [this message]
2013-02-19 15:32 ` [PATCH] drm: Keep a reference to the active plane framebuffer Ville Syrjälä
2013-02-19 15:36 ` Thierry Reding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1361287087-32035-1-git-send-email-thierry.reding@avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=airlied@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.