[PATCH] drm/i915: fix ppgtt dump code for DEBUG_FS=n

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

 



A regression in the topic/ppgtt branch introduce in

commit 87d60b63e0371529faaed0667d457e5022964010
Author: Ben Widawsky <ben@xxxxxxxxxxxx>
Date:   Fri Dec 6 14:11:29 2013 -0800

    drm/i915: Add PPGTT dumper

Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx>
Reported-by: Antti Koskipaa <antti.koskipaa@xxxxxxxxxxxxxxx>
Cc: Ben Widawsky <ben@xxxxxxxxxxxx>
Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
---
 drivers/gpu/drm/i915/i915_drv.h     | 2 ++
 drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index aab400c04be0..730ff1e0ce63 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -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 {
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 998f9a0b322a..0e55f9821bcc 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -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,
-- 
1.8.4.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux