[55/76] drm/amd/dal: Handle AUX error during RECIEVE state of transaction

Submitted by Harry Wentland on Nov. 21, 2016, 11:01 p.m.

Details

Message ID 20161121230136.5208-56-harry.wentland@amd.com
State New
Headers show
Series "DAL Patches Nov 21, 2016" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Harry Wentland Nov. 21, 2016, 11:01 p.m.
From: Wenjing Liu <Wenjing.Liu@amd.com>

[Description]
DP compliance intermittent failure for aux channel error retry.
During DP compliance test generates AUX channel error,
asic may intermittently set the AUX_SW_DONE bit to 1
but indicates channel error during RECIEVE state.
Driver fails to retry without checking the error bits
The fix will retry upon following errors:
During the RECIEVE state of a SW transaction,
some `H` symbol(s) were detected that were not part of a `STOP` pattern
During the RECIEVE state of a SW transaction,
some `L` symbol(s) were detected that were not part of a `STOP` pattern.
During the RECIEVE state of a SW transaction,
symbol(s) had both correlation counters below the threshold level
of detection set by
 AUX_RX_CONTROL.AUX_RX_DETECTION_THRESHOLD.

Signed-off-by: Wenjing Liu <Wenjing.Liu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/i2caux/dce110/aux_engine_dce110.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/dal/dc/i2caux/dce110/aux_engine_dce110.c b/drivers/gpu/drm/amd/dal/dc/i2caux/dce110/aux_engine_dce110.c
index c112bdd5e7ab..f49fd1ad3807 100644
--- a/drivers/gpu/drm/amd/dal/dc/i2caux/dce110/aux_engine_dce110.c
+++ b/drivers/gpu/drm/amd/dal/dc/i2caux/dce110/aux_engine_dce110.c
@@ -362,7 +362,11 @@  static enum aux_channel_operation_result get_channel_status(
 			(value & AUX_SW_STATUS__AUX_SW_RX_TIMEOUT_MASK))
 			return AUX_CHANNEL_OPERATION_FAILED_TIMEOUT;
 
-		else if (value & AUX_SW_STATUS__AUX_SW_RX_INVALID_STOP_MASK)
+		else if ((value & AUX_SW_STATUS__AUX_SW_RX_INVALID_STOP_MASK) ||
+			(value & AUX_SW_STATUS__AUX_SW_RX_RECV_NO_DET_MASK) ||
+			(value &
+				AUX_SW_STATUS__AUX_SW_RX_RECV_INVALID_H_MASK) ||
+			(value & AUX_SW_STATUS__AUX_SW_RX_RECV_INVALID_L_MASK))
 			return AUX_CHANNEL_OPERATION_FAILED_INVALID_REPLY;
 
 		*returned_bytes = get_reg_field_value(value,