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

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

 



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@xxxxxxxxxxxxxxxxxx>
Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_guc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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
-- 
2.20.1

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux