[11/25] drm/amd/display: fix i2c wtire mot incorrect issue

Submitted by Li, Sun peng (Leo) on Sept. 10, 2019, 1:54 p.m.

Details

Message ID 20190910135445.18300-12-sunpeng.li@amd.com
State New
Headers show
Series "DC Patches 09 Sep 2019" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Li, Sun peng (Leo) Sept. 10, 2019, 1:54 p.m.
From: Lewis Huang <Lewis.Huang@amd.com>

[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: Lewis Huang <Lewis.Huang@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
index f70137d67c82..588a07b525a0 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
@@ -523,7 +523,7 @@  bool dal_ddc_service_query_ddc_data(
 
 		if (write_size != 0) {
 			payload.write = true;
-			payload.mot = true;
+			payload.mot = false;
 			payload.length = write_size;
 			payload.data = write_buf;
 
@@ -592,7 +592,7 @@  bool dal_ddc_submit_aux_command(struct ddc_service *ddc,
 		current_payload.i2c_over_aux = payload->i2c_over_aux;
 		current_payload.length = is_end_of_payload ?
 			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.write = payload->write;