drm/amd/display: add i2c over aux failure handling
authorWenjing Liu <Wenjing.Liu@amd.com>
Sat, 23 Feb 2019 21:07:45 +0000 (16:07 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:36:49 +0000 (15:36 -0500)
[why]
We will not retry when EDID read failure using i2c over aux

[how]
treat i2c over aux failure the same as defer

Signed-off-by: Wenjing Liu <Wenjing.Liu@amd.com>
Reviewed-by: David Francis <David.Francis@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_ddc_types.h
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c

index 05c8c31..4ef97f6 100644 (file)
@@ -68,6 +68,8 @@ enum aux_transaction_reply {
        AUX_TRANSACTION_REPLY_AUX_ACK = 0x00,
        AUX_TRANSACTION_REPLY_AUX_NACK = 0x01,
        AUX_TRANSACTION_REPLY_AUX_DEFER = 0x02,
+       AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK = 0x04,
+       AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER = 0x08,
 
        AUX_TRANSACTION_REPLY_I2C_ACK = 0x00,
        AUX_TRANSACTION_REPLY_I2C_NACK = 0x10,
index c9b881d..cdb3042 100644 (file)
@@ -528,6 +528,8 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
                        break;
 
                        case AUX_TRANSACTION_REPLY_AUX_DEFER:
+                       case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK:
+                       case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER:
                                if (++aux_defer_retries >= AUX_MAX_DEFER_RETRIES)
                                        goto fail;
                                break;