disp: msm: dp: fix aux error handling

If an aux transaction fails at its lowest level, there is a builtin
retry mechanism before erroring out. Currently an error message is
printed after each failed attempt even though the aux transaction
might succeed on retry.

This change switches the alert level to warning on these attempts
and makes sure an error message is printed if the transfer errors
out after retries.

Change-Id: I47fb27fe0aa15eb5e2400c4338f9b9c59439983f
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
This commit is contained in:
Rajkumar Subbiah
2023-04-06 13:27:36 -07:00
parent 36ba8cc716
commit efbcec2fb0
4 changed files with 68 additions and 32 deletions

View File

@@ -3091,8 +3091,10 @@ int dp_panel_get_sink_crc(struct dp_panel *dp_panel, u16 *crc)
* per component (RGB or CrYCb).
*/
rc = drm_dp_dpcd_read(drm_aux, DP_TEST_CRC_R_CR, crc_bytes, 6);
if (rc < 0)
return rc;
if (rc != 6) {
DP_ERR("failed to read sink CRC, ret:%d\n", rc);
return -EIO;
}
rc = 0;
crc[0] = crc_bytes[0] | crc_bytes[1] << 8;
@@ -3115,12 +3117,16 @@ int dp_panel_sink_crc_enable(struct dp_panel *dp_panel, bool enable)
if (dp_panel->link_info.capabilities & DP_LINK_CAP_CRC) {
ret = drm_dp_dpcd_readb(drm_aux, DP_TEST_SINK, &buf);
if (ret < 0)
return ret;
if (ret != 1) {
DP_ERR("failed to read CRC cap, ret:%d\n", ret);
return -EIO;
}
ret = drm_dp_dpcd_writeb(drm_aux, DP_TEST_SINK, buf | DP_TEST_SINK_START);
if (ret < 0)
return ret;
if (ret != 1) {
DP_ERR("failed to enable Sink CRC, ret:%d\n", ret);
return -EIO;
}
drm_dp_dpcd_readb(drm_aux, DP_TEST_SINK, &buf);
}