aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <[email protected]>2020-09-04 14:53:37 +0300
committerVille Syrjälä <[email protected]>2020-09-17 17:02:08 +0300
commit637f7240f602c078070cd2373845b7a80b59ae3f (patch)
tree9e08f0893f5526f52b865505867f0301ee55acc3
parent9f9f4101fc98db56714e71676d5a1e2d27e01f7e (diff)
drm/dp: Dump downstream facing port caps
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ä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Lyude Paul <[email protected]> Acked-by: Daniel Vetter <[email protected]>
-rw-r--r--drivers/gpu/drm/drm_dp_helper.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index 1e7c638873c8..c21bbfc3d714 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -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);