提交 8291272a 编写于 作者: R Rob Clark 提交者: 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: NRob Clark <robdclark@gmail.com>
Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册