drm/i915: fix ppgtt dump code for DEBUG_FS=n
Subsystems (2)
PATCH 1/1 drm/i915: fix ppgtt dump code for DEBUG_FS=n
A regression in the topic/ppgtt branch introduce in
commit 87d60b63e0371529faaed0667d457e5022964010
Author: Ben Widawsky <[email protected]> Date: Fri Dec 6 14:11:29 2013 -0800
drm/i915: Add PPGTT dumper
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++++ 2 files changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -678,7 +678,9 @@ struct i915_hw_ppgtt {int (*switch_mm)(struct i915_hw_ppgtt *ppgtt,struct intel_ring_buffer *ring,bool synchronous); +#if defined(CONFIG_DEBUG_FS )void (*debug_dump)(struct i915_hw_ppgtt *ppgtt,struct seq_file *m); +#endif };struct i915_ctx_hang_stats {
drivers/gpu/drm/i915/i915_gem_gtt.c +4 -0
@@ -460,6 +460,7 @@ err_out:return ret; } +#if defined(CONFIG_DEBUG_FS )static void gen6_dump_ppgtt (struct i915_hw_ppgtt *ppgtt,struct seq_file *m) {struct drm_i915_private *dev_priv = ppgtt->base.dev->dev_private;
@@ -515,6 +516,7 @@ static void gen6_dump_ppgtt(struct i915_hw_ppgtt *ppgtt, struct seq_file *m) kunmap_atomic(pt_vaddr); } } +#endif static void gen6_write_pdes (struct i915_hw_ppgtt *ppgtt) {
@@ -929,7 +931,9 @@ alloc: ppgtt->base.clear_range (&ppgtt->base,0 , ppgtt->num_pd_entries *I915_PPGTT_PT_ENTRIES , true); +#if defined(CONFIG_DEBUG_FS ) ppgtt->debug_dump = gen6_dump_ppgtt; +#endif DRM_DEBUG_DRIVER("Allocated pde space (%ldM) at GTT entry: %lx\n", ppgtt->node.size >> 20,
Signature · 1 line
1.8.4.3
Quoted 7 lines · Daniel Vetter
A regression in the topic/ppgtt branch introduce in
commit
87d60b63e0371529faaed0667d457e5022964010Author: Ben Widawsky <[email protected]> Date: Fri Dec 6 14:11:29 2013 -0800drm/i915: Add PPGTT dumper
I'm missing some context, what's the actual regression? Without debugfs the code will not be called and it just wastes a small amount of kernel memory, and seq_file should still be valid.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Daniel Vetter
A regression in the topic/ppgtt branch introduce in
commit
87d60b63e0371529faaed0667d457e5022964010Author: Ben Widawsky <[email protected]> Date: Fri Dec 6 14:11:29 2013 -0800
Quoted 5 lines
Quoted 1 line
drm/i915: Add PPGTT dumper
I'm missing some context, what's the actual regression? Without debugfs the code will not be called and it just wastes a small amount of kernel memory, and
seq_fileshould still be valid.
We don't include the respective headers for seq_printf, so compilation fails. Very sloppy commit message from my side, I'll amend when merging. Not sure whether the #ifdef'ery is really worth it though ... -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 10 lines · Daniel Vetter
Quoted 9 lines · Chris Wilson
Quoted 7 lines · Daniel Vetter
A regression in the topic/ppgtt branch introduce in
commit
87d60b63e0371529faaed0667d457e5022964010Author: Ben Widawsky <[email protected]> Date: Fri Dec 6 14:11:29 2013 -0800drm/i915: Add PPGTT dumper
Quoted 7 lines
Quoted 3 lines
I'm missing some context, what's the actual regression? Without debugfs the code will not be called and it just wastes a small amount of kernel memory, and
seq_fileshould still be valid.We don't include the respective headers for
seq_printf, so compilation fails. Very sloppy commit message from my side, I'll amend when merging. Not sure whether the #ifdef'ery is really worth it though ...
I'd take an extra header include than ifdefs in the code any day. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
PATCH 1/1 drm/i915: fix ppgtt dump code for DEBUG_FS=n
A regression in the topic/ppgtt branch introduce in
commit 87d60b63e0371529faaed0667d457e5022964010
Author: Ben Widawsky <[email protected]> Date: Fri Dec 6 14:11:29 2013 -0800
drm/i915: Add PPGTT dumper
The issue is that we're missing the definitions for the seq_file functions and hence compilation fails.
v2: Just include the right header instead of splattering #ifdefs all over the place (Chris).
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/i915/i915_gem_gtt.c +1 -0
@@ -22,6 +22,7 @@* */ +#include <linux/seq_file.h> #include <drm/drmP.h> #include <drm/i915_drm.h> #include "i915_drv.h"
Signature · 1 line
1.8.4.3
Quoted 11 lines · Daniel Vetter
A regression in the topic/ppgtt branch introduce in
commit
87d60b63e0371529faaed0667d457e5022964010Author: Ben Widawsky <[email protected]> Date: Fri Dec 6 14:11:29 2013 -0800drm/i915: Add PPGTT dumper
The issue is that we're missing the definitions for the
seq_filefunctions and hence compilation fails.
Quoted 8 lines
v2: Just include the right header instead of splattering #ifdefs all over the place (Chris).
Cc Chris Wilson <[email protected]>Reported-by kbuild test robot <[email protected]>Reported-by Antti Koskipaa <[email protected]>Cc Ben Widawsky <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Quoted 19 lines
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/i915/i915_gem_gtt.c +1
-0@@ -22,6 +22,7 @@* */ +#include <linux/seq_file.h> #include <drm/drmP.h> #include <drm/i915_drm.h> #include "i915_drv.h" Signature · 1 line
1.8.4.3
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center