diff mbox

[04/13] drm/i915: Show frame buffer modifier in debug info

Message ID 1423588576-11339-5-git-send-email-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tvrtko Ursulin Feb. 10, 2015, 5:16 p.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Daniel Vetter Feb. 11, 2015, 7:34 a.m. UTC | #1
On Tue, Feb 10, 2015 at 05:16:07PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 2e1f723..164fa82 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1778,11 +1778,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, refcount %d, obj ",
> +	seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, modifier 0x%llx, refcount %d, obj ",
>  		   fb->base.width,
>  		   fb->base.height,
>  		   fb->base.depth,
>  		   fb->base.bits_per_pixel,
> +		   fb->base.modifier[0],
>  		   atomic_read(&fb->base.refcount.refcount));
>  	describe_obj(m, fb->obj);
>  	seq_putc(m, '\n');
> @@ -1793,11 +1794,12 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
>  		if (ifbdev && &fb->base == ifbdev->helper.fb)
>  			continue;
>  
> -		seq_printf(m, "user size: %d x %d, depth %d, %d bpp, refcount %d, obj ",
> +		seq_printf(m, "user size: %d x %d, depth %d, %d bpp, modifier 0x%llx, refcount %d, obj ",
>  			   fb->base.width,
>  			   fb->base.height,
>  			   fb->base.depth,
>  			   fb->base.bits_per_pixel,
> +			   fb->base.modifier[0],

Just an aside, in case you get around to decoding modifiers: We should
probably switch to printing the fourcc code and decode that while at it.
And perhaps print the stride too, since with the new tiling there will be
no underlying fence any more to guess the stride.

Perhaps we need a describe_fb helper to keep this manageble, too.
-Daniel

>  			   atomic_read(&fb->base.refcount.refcount));
>  		describe_obj(m, fb->obj);
>  		seq_putc(m, '\n');
> -- 
> 2.2.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 2e1f723..164fa82 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1778,11 +1778,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, refcount %d, obj ",
+	seq_printf(m, "fbcon size: %d x %d, depth %d, %d bpp, modifier 0x%llx, refcount %d, obj ",
 		   fb->base.width,
 		   fb->base.height,
 		   fb->base.depth,
 		   fb->base.bits_per_pixel,
+		   fb->base.modifier[0],
 		   atomic_read(&fb->base.refcount.refcount));
 	describe_obj(m, fb->obj);
 	seq_putc(m, '\n');
@@ -1793,11 +1794,12 @@  static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
 		if (ifbdev && &fb->base == ifbdev->helper.fb)
 			continue;
 
-		seq_printf(m, "user size: %d x %d, depth %d, %d bpp, refcount %d, obj ",
+		seq_printf(m, "user size: %d x %d, depth %d, %d bpp, modifier 0x%llx, refcount %d, obj ",
 			   fb->base.width,
 			   fb->base.height,
 			   fb->base.depth,
 			   fb->base.bits_per_pixel,
+			   fb->base.modifier[0],
 			   atomic_read(&fb->base.refcount.refcount));
 		describe_obj(m, fb->obj);
 		seq_putc(m, '\n');