Commit 33fd2900 authored by Xiaodong Yan's avatar Xiaodong Yan Committed by Alex Deucher

drm/amd/display: make aux defer delay and aux sw start delay seperate

[why]
1. defer delay and sw start delay has been mixed up, defer delay was
programmed to AUX_SW_CONTROL:AUX_SW_START_DELAY.
2. There's no delay for defer

[how]
1. Set  aux sw start to 0
2. Add delay for defer scenario
Signed-off-by: default avatarXiaodong Yan <Xiaodong.Yan@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ce10a0f3
...@@ -475,7 +475,7 @@ int dce_aux_transfer_raw(struct ddc_service *ddc, ...@@ -475,7 +475,7 @@ int dce_aux_transfer_raw(struct ddc_service *ddc,
aux_req.action = i2caux_action_from_payload(payload); aux_req.action = i2caux_action_from_payload(payload);
aux_req.address = payload->address; aux_req.address = payload->address;
aux_req.delay = payload->defer_delay * 10; aux_req.delay = 0;
aux_req.length = payload->length; aux_req.length = payload->length;
aux_req.data = payload->data; aux_req.data = payload->data;
...@@ -544,8 +544,15 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc, ...@@ -544,8 +544,15 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
case AUX_TRANSACTION_REPLY_AUX_DEFER: case AUX_TRANSACTION_REPLY_AUX_DEFER:
case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK: case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK:
case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER: case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER:
if (++aux_defer_retries >= AUX_MAX_DEFER_RETRIES) if (++aux_defer_retries >= AUX_MAX_DEFER_RETRIES) {
goto fail; goto fail;
} else {
if ((*payload->reply == AUX_TRANSACTION_REPLY_AUX_DEFER) ||
(*payload->reply == AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER)) {
if (payload->defer_delay > 0)
msleep(payload->defer_delay);
}
}
break; break;
case AUX_TRANSACTION_REPLY_I2C_DEFER: case AUX_TRANSACTION_REPLY_I2C_DEFER:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment