From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 5/8] drm: spiff out FB refcnting traces
Date: Wed, 28 May 2014 19:57:22 -0400 [thread overview]
Message-ID: <1401321445-31906-6-git-send-email-robdclark@gmail.com> (raw)
In-Reply-To: <1401321445-31906-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>
---
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 b975575..4d243fd 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -519,7 +519,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, fb->refcount.refcount.counter);
kref_put(&fb->refcount, drm_framebuffer_free);
}
EXPORT_SYMBOL(drm_framebuffer_unreference);
@@ -532,7 +532,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, fb->refcount.refcount.counter);
kref_get(&fb->refcount);
}
EXPORT_SYMBOL(drm_framebuffer_reference);
@@ -544,7 +544,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, fb->refcount.refcount.counter);
kref_put(&fb->refcount, drm_framebuffer_free_bug);
}
--
1.9.3
next prev parent reply other threads:[~2014-05-28 23:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 23:57 [PATCH 0/8] prepare for preparing for atomic Rob Clark
2014-05-28 23:57 ` [PATCH 1/8] drm: add object property type Rob Clark
2014-05-29 8:01 ` David Herrmann
2014-05-29 11:45 ` Rob Clark
2014-05-30 7:57 ` Thierry Reding
2014-05-30 12:00 ` Rob Clark
2014-05-28 23:57 ` [PATCH 2/8] drm: add signed-range " Rob Clark
2014-05-29 8:29 ` David Herrmann
2014-05-29 11:51 ` Rob Clark
2014-05-28 23:57 ` [PATCH 3/8] drm: helpers to find mode objects Rob Clark
2014-05-28 23:57 ` [PATCH 4/8] drm: Allow drm_mode_object_find() to look up an object of any type Rob Clark
2014-05-29 11:18 ` Daniel Vetter
2014-05-29 12:01 ` Rob Clark
2014-05-29 12:17 ` Daniel Vetter
2014-05-28 23:57 ` Rob Clark [this message]
2014-05-29 8:36 ` [PATCH 5/8] drm: spiff out FB refcnting traces David Herrmann
2014-05-28 23:57 ` [PATCH 6/8] drm: push locking down into restore_fbdev_mode (v2) Rob Clark
2014-05-28 23:57 ` [PATCH 7/8] drm: Split connection_mutex out of mode_config.mutex (v2) Rob Clark
2014-05-28 23:57 ` [PATCH 8/8] drm: convert crtc and connection_mutex to ww_mutex Rob Clark
2014-05-29 11:22 ` Daniel Vetter
2014-05-29 12:07 ` Rob Clark
2014-05-29 12:59 ` [PATCH 1/2] v2 (Daniel): - Readd lost include. - Drop all the additional complexity which we only need later: The basic ww dance only requires the lock list and the contended pointer, nothing more. Some of the stuff also looks very suspicious. - Improve the contended checks a bit to make sure we only get an -EALREADY when we expect it. - Add an interruptible backoff function just to be complete (since otherwise the interruptible locking function makes 0 sense at all). - Inline the slowpath (due to the above). - Move ww_acquire_fini into drm_modeset_acquire_fini. I suspect this has been due to the confusion about the lifetime of the acquire ctx wrt the locking retry loop. - Drop uapi changes, they really shouldn't be in this patch. - s/!ret/ret == 0/ because I got confused - I tend to use !ret only for booleans or pointers, not for errno integer return values Daniel Vetter
2014-05-29 12:59 ` [PATCH 2/2] Revert "v2 (Daniel):" Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2014-05-30 17:12 [PATCH 0/8] prepare for preparing for atomic (v2) Rob Clark
2014-05-30 17:12 ` [PATCH 5/8] drm: spiff out FB refcnting traces Rob Clark
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=1401321445-31906-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