drm/dp: Dump downstream facing port caps
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 4 Sep 2020 11:53:37 +0000 (14:53 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 17 Sep 2020 14:02:08 +0000 (17:02 +0300)
It helps when the logs have a dump of the DFP capabilities.

v2: Move the dumping to the new helper

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200904115354.25336-2-ville.syrjala@linux.intel.com
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_dp_helper.c

index 1e7c638873c826716020308957c4b9c13a7d86c5..c21bbfc3d71474a9d644afe66594aec96df30b36 100644 (file)
@@ -545,8 +545,13 @@ int drm_dp_read_downstream_info(struct drm_dp_aux *aux,
        ret = drm_dp_dpcd_read(aux, DP_DOWNSTREAM_PORT_0, downstream_ports, len);
        if (ret < 0)
                return ret;
+       if (ret != len)
+               return -EIO;
+
+       DRM_DEBUG_KMS("%s: DPCD DFP: %*ph\n",
+                     aux->name, len, downstream_ports);
 
-       return ret == len ? 0 : -EIO;
+       return 0;
 }
 EXPORT_SYMBOL(drm_dp_read_downstream_info);