[PATCH 29/35] drm/i915: dump refcount into framebuffer debugfs file

Rob Clark robdclark at gmail.com
Fri Jan 11 14:20:18 PST 2013


On Thu, Jan 10, 2013 at 2:48 PM, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> Useful for checking whether the new refcounting works as advertised.

looks useful.. I should probably add this to omapdrm and the cma
debugfs helper patch that I sent recently..

BR,
-R

> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c |   10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 1269a46..7576e78 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1440,11 +1440,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
>         ifbdev = dev_priv->fbdev;
>         fb = to_intel_framebuffer(ifbdev->helper.fb);
>
> -       seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, obj ",
> +       seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, refcount %d, obj ",
>                    fb->base.width,
>                    fb->base.height,
>                    fb->base.depth,
> -                  fb->base.bits_per_pixel);
> +                  fb->base.bits_per_pixel,
> +                  atomic_read(&fb->base.refcount.refcount));
>         describe_obj(m, fb->obj);
>         seq_printf(m, "\n");
>         mutex_unlock(&dev->mode_config.mutex);
> @@ -1454,11 +1455,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
>                 if (&fb->base == ifbdev->helper.fb)
>                         continue;
>
> -               seq_printf(m, "user size: %d x %d, depth %d, %d bpp, obj ",
> +               seq_printf(m, "user size: %d x %d, depth %d, %d bpp, refcount %d, obj ",
>                            fb->base.width,
>                            fb->base.height,
>                            fb->base.depth,
> -                          fb->base.bits_per_pixel);
> +                          fb->base.bits_per_pixel,
> +                          atomic_read(&fb->base.refcount.refcount));
>                 describe_obj(m, fb->obj);
>                 seq_printf(m, "\n");
>         }
> --
> 1.7.10.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list