Commit 8291272a authored by Rob Clark's avatar Rob Clark Committed by Dave Airlie

drm: spiff out FB refcnting traces

I find myself making this change locally whenever debugging FB reference
counting.  Which seems a bit silly.
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
parent ebc44cf3
...@@ -513,7 +513,7 @@ EXPORT_SYMBOL(drm_framebuffer_lookup); ...@@ -513,7 +513,7 @@ EXPORT_SYMBOL(drm_framebuffer_lookup);
*/ */
void drm_framebuffer_unreference(struct drm_framebuffer *fb) 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); kref_put(&fb->refcount, drm_framebuffer_free);
} }
EXPORT_SYMBOL(drm_framebuffer_unreference); EXPORT_SYMBOL(drm_framebuffer_unreference);
...@@ -526,7 +526,7 @@ EXPORT_SYMBOL(drm_framebuffer_unreference); ...@@ -526,7 +526,7 @@ EXPORT_SYMBOL(drm_framebuffer_unreference);
*/ */
void drm_framebuffer_reference(struct drm_framebuffer *fb) 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); kref_get(&fb->refcount);
} }
EXPORT_SYMBOL(drm_framebuffer_reference); EXPORT_SYMBOL(drm_framebuffer_reference);
...@@ -538,7 +538,7 @@ static void drm_framebuffer_free_bug(struct kref *kref) ...@@ -538,7 +538,7 @@ static void drm_framebuffer_free_bug(struct kref *kref)
static void __drm_framebuffer_unreference(struct drm_framebuffer *fb) 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); kref_put(&fb->refcount, drm_framebuffer_free_bug);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment