aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-09-01 07:12:01 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-03 05:05:29 -0400
commita8e98153627dfbb10ff4dd65729676115a932b2e (patch)
tree7510a01abcf39ec743ca18c29df2a66e1e99ec34 /drivers/gpu/drm/i915
parent6c65a587b123ab17389b0563cdc42668847ad652 (diff)
drm: i915: reduce memory footprint when debugging
There is no need to use hex_dump_to_buffer() since we have a kernel helper to dump up to 64 bytes just via printk(). In our case the actual size is 15 bytes. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> [danvet: Add cast since %*ph expects and int for the size parameter.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 93bc0267c4b0..9d655a6b1c61 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3368,15 +3368,11 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
3368 struct drm_device *dev = dig_port->base.base.dev; 3368 struct drm_device *dev = dig_port->base.base.dev;
3369 struct drm_i915_private *dev_priv = dev->dev_private; 3369 struct drm_i915_private *dev_priv = dev->dev_private;
3370 3370
3371 char dpcd_hex_dump[sizeof(intel_dp->dpcd) * 3];
3372
3373 if (intel_dp_dpcd_read_wake(&intel_dp->aux, 0x000, intel_dp->dpcd, 3371 if (intel_dp_dpcd_read_wake(&intel_dp->aux, 0x000, intel_dp->dpcd,
3374 sizeof(intel_dp->dpcd)) < 0) 3372 sizeof(intel_dp->dpcd)) < 0)
3375 return false; /* aux transfer failed */ 3373 return false; /* aux transfer failed */
3376 3374
3377 hex_dump_to_buffer(intel_dp->dpcd, sizeof(intel_dp->dpcd), 3375 DRM_DEBUG_KMS("DPCD: %*ph\n", (int) sizeof(intel_dp->dpcd), intel_dp->dpcd);
3378 32, 1, dpcd_hex_dump, sizeof(dpcd_hex_dump), false);
3379 DRM_DEBUG_KMS("DPCD: %s\n", dpcd_hex_dump);
3380 3376
3381 if (intel_dp->dpcd[DP_DPCD_REV] == 0) 3377 if (intel_dp->dpcd[DP_DPCD_REV] == 0)
3382 return false; /* DPCD not present */ 3378 return false; /* DPCD not present */