Commit 0594ffee authored by Lewis Huang's avatar Lewis Huang Committed by Alex Deucher

drm/amd/display: fix i2c wtire mot incorrect issue

[Why]
I2C write command always send mot = true will cause sink state incorrect.

[How]
1. Remove default i2c write mot = true.
2. Deciding mot flag by is_end_of_payload flag.
Signed-off-by: default avatarLewis Huang <Lewis.Huang@amd.com>
Reviewed-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 616f5b65
...@@ -525,7 +525,7 @@ bool dal_ddc_service_query_ddc_data( ...@@ -525,7 +525,7 @@ bool dal_ddc_service_query_ddc_data(
if (write_size != 0) { if (write_size != 0) {
payload.write = true; payload.write = true;
payload.mot = true; payload.mot = false;
payload.length = write_size; payload.length = write_size;
payload.data = write_buf; payload.data = write_buf;
...@@ -594,7 +594,7 @@ bool dal_ddc_submit_aux_command(struct ddc_service *ddc, ...@@ -594,7 +594,7 @@ bool dal_ddc_submit_aux_command(struct ddc_service *ddc,
current_payload.i2c_over_aux = payload->i2c_over_aux; current_payload.i2c_over_aux = payload->i2c_over_aux;
current_payload.length = is_end_of_payload ? current_payload.length = is_end_of_payload ?
payload->length - retrieved : DEFAULT_AUX_MAX_DATA_SIZE; payload->length - retrieved : DEFAULT_AUX_MAX_DATA_SIZE;
current_payload.mot = payload->mot ? payload->mot : !is_end_of_payload; current_payload.mot = !is_end_of_payload;
current_payload.reply = payload->reply; current_payload.reply = payload->reply;
current_payload.write = payload->write; current_payload.write = payload->write;
......
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