From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 5/8] drm: spiff out FB refcnting traces
Date: Fri, 30 May 2014 13:12:07 -0400 [thread overview]
Message-ID: <1401469930-32750-6-git-send-email-robdclark@gmail.com> (raw)
In-Reply-To: <1401469930-32750-1-git-send-email-robdclark@gmail.com>
I find myself making this change locally whenever debugging FB reference
counting. Which seems a bit silly.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
---
drivers/gpu/drm/drm_crtc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index ae3d302..eaf21a0 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -532,7 +532,7 @@ EXPORT_SYMBOL(drm_framebuffer_lookup);
*/
void drm_framebuffer_unreference(struct drm_framebuffer *fb)
{
- DRM_DEBUG("FB ID: %d\n", fb->base.id);
+ DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, atomic_read(&fb->refcount.refcount));
kref_put(&fb->refcount, drm_framebuffer_free);
}
EXPORT_SYMBOL(drm_framebuffer_unreference);
@@ -545,7 +545,7 @@ EXPORT_SYMBOL(drm_framebuffer_unreference);
*/
void drm_framebuffer_reference(struct drm_framebuffer *fb)
{
- DRM_DEBUG("FB ID: %d\n", fb->base.id);
+ DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, atomic_read(&fb->refcount.refcount));
kref_get(&fb->refcount);
}
EXPORT_SYMBOL(drm_framebuffer_reference);
@@ -557,7 +557,7 @@ static void drm_framebuffer_free_bug(struct kref *kref)
static void __drm_framebuffer_unreference(struct drm_framebuffer *fb)
{
- DRM_DEBUG("FB ID: %d\n", fb->base.id);
+ DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, atomic_read(&fb->refcount.refcount));
kref_put(&fb->refcount, drm_framebuffer_free_bug);
}
--
1.9.3
next prev parent reply other threads:[~2014-05-30 17:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 17:12 [PATCH 0/8] prepare for preparing for atomic (v2) Rob Clark
2014-05-30 17:12 ` [PATCH 1/8] drm: helpers to find mode objects Rob Clark
2014-06-03 13:22 ` Daniel Vetter
2014-05-30 17:12 ` [PATCH 2/8] drm: add extended property types Rob Clark
2014-06-03 13:25 ` Daniel Vetter
2014-05-30 17:12 ` [PATCH 3/8] drm: add object property type Rob Clark
2014-06-03 13:24 ` Daniel Vetter
2014-05-30 17:12 ` [PATCH 4/8] drm: add signed-range " Rob Clark
2014-05-30 17:12 ` Rob Clark [this message]
2014-05-30 17:12 ` [PATCH 6/8] drm: Split connection_mutex out of mode_config.mutex (v3) Rob Clark
2014-05-30 17:12 ` [PATCH 7/8] drm: convert crtc and connection_mutex to ww_mutex (v3) Rob Clark
2014-06-03 13:29 ` Daniel Vetter
2014-06-04 3:38 ` Dave Airlie
2014-06-04 9:21 ` Daniel Vetter
2014-05-30 17:12 ` [PATCH 8/8] drm: add drm_fb_helper_restore_fbdev_mode_unlocked() Rob Clark
2014-06-03 13:33 ` Daniel Vetter
2014-06-03 14:44 ` Rob Clark
2014-06-02 8:11 ` [PATCH 0/8] prepare for preparing for atomic (v2) Daniel Vetter
2014-06-02 15:33 ` Rob Clark
-- strict thread matches above, loose matches on Subject: below --
2014-05-28 23:57 [PATCH 0/8] prepare for preparing for atomic Rob Clark
2014-05-28 23:57 ` [PATCH 5/8] drm: spiff out FB refcnting traces Rob Clark
2014-05-29 8:36 ` David Herrmann
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=1401469930-32750-6-git-send-email-robdclark@gmail.com \
--to=robdclark@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox