]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/radeon: Use only one line for whole DPCD debug output
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Sun, 29 Jun 2014 19:03:53 +0000 (21:03 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 1 Jul 2014 15:31:39 +0000 (11:31 -0400)
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/atombios_dp.c

index c5b1f2da39544e6766ae1d70a3be0d296ebe6b97..35f4182c63b66e68c1d0b9e371fbcdeb5716c70f 100644 (file)
@@ -403,16 +403,18 @@ bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector)
 {
        struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv;
        u8 msg[DP_DPCD_SIZE];
-       int ret, i;
+       int ret;
+
+       char dpcd_hex_dump[DP_DPCD_SIZE * 3];
 
        ret = drm_dp_dpcd_read(&radeon_connector->ddc_bus->aux, DP_DPCD_REV, msg,
                               DP_DPCD_SIZE);
        if (ret > 0) {
                memcpy(dig_connector->dpcd, msg, DP_DPCD_SIZE);
-               DRM_DEBUG_KMS("DPCD: ");
-               for (i = 0; i < DP_DPCD_SIZE; i++)
-                       DRM_DEBUG_KMS("%02x ", msg[i]);
-               DRM_DEBUG_KMS("\n");
+
+               hex_dump_to_buffer(dig_connector->dpcd, sizeof(dig_connector->dpcd),
+                                  32, 1, dpcd_hex_dump, sizeof(dpcd_hex_dump), false);
+               DRM_DEBUG_KMS("DPCD: %s\n", dpcd_hex_dump);
 
                radeon_dp_probe_oui(radeon_connector);