diff mbox series

drm/i915/guc: Compact init params debug to a single line

Message ID 20190625230806.32192-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series drm/i915/guc: Compact init params debug to a single line | expand

Commit Message

Chris Wilson June 25, 2019, 11:08 p.m. UTC
Use hex_dump_to_buffer() to compress the parameter debug into a single
line for less verbose debug logs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/i915/intel_guc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Chris Wilson June 25, 2019, 11:10 p.m. UTC | #1
Quoting Chris Wilson (2019-06-26 00:08:06)
> Use hex_dump_to_buffer() to compress the parameter debug into a single
> line for less verbose debug logs.

Please excuse the noise, git send-email typo.
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
index c40a6efdd33a..447f1de15289 100644
--- a/drivers/gpu/drm/i915/intel_guc.c
+++ b/drivers/gpu/drm/i915/intel_guc.c
@@ -367,6 +367,7 @@  static u32 guc_ctl_ads_flags(struct intel_guc *guc)
 void intel_guc_init_params(struct intel_guc *guc)
 {
 	struct drm_i915_private *dev_priv = guc_to_i915(guc);
+	char buf[GUC_CTL_MAX_DWORDS * 10];
 	u32 params[GUC_CTL_MAX_DWORDS];
 	int i;
 
@@ -378,8 +379,9 @@  void intel_guc_init_params(struct intel_guc *guc)
 	params[GUC_CTL_DEBUG] = guc_ctl_debug_flags(guc);
 	params[GUC_CTL_ADS] = guc_ctl_ads_flags(guc);
 
-	for (i = 0; i < GUC_CTL_MAX_DWORDS; i++)
-		DRM_DEBUG_DRIVER("param[%2d] = %#x\n", i, params[i]);
+	hex_dump_to_buffer(params, sizeof(params),
+			   32, 4, buf, sizeof(buf), false);
+	DRM_DEBUG_DRIVER("params[%s]\n", buf);
 
 	/*
 	 * All SOFT_SCRATCH registers are in FORCEWAKE_BLITTER domain and