Re: [PATCH 5/8] drm: spiff out FB refcnting traces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Thu, May 29, 2014 at 1:57 AM, Rob Clark <robdclark@xxxxxxxxx> wrote:
> I find myself making this change locally whenever debugging FB reference
> counting.  Which seems a bit silly.
>
> Signed-off-by: Rob Clark <robdclark@xxxxxxxxx>
> ---
>  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);

atomic_read()!!!

With that fixed, this is:

Reviewed-by: David Herrmann <dh.herrmann@xxxxxxxxx>

Thanks
David

>         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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux