[PATCH v2 01/18] drm/dp: Dump downstream facing port caps

Ville Syrjala ville.syrjala at linux.intel.com
Fri Sep 4 11:53:37 UTC 2020


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

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 at linux.intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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;
 
-	return ret == len ? 0 : -EIO;
+	DRM_DEBUG_KMS("%s: DPCD DFP: %*ph\n",
+		      aux->name, len, downstream_ports);
+
+	return 0;
 }
 EXPORT_SYMBOL(drm_dp_read_downstream_info);
 
-- 
2.26.2



More information about the dri-devel mailing list