aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Gusakov <andrey.gusakov@cogentembedded.com>2017-11-07 11:56:23 -0500
committerAndrzej Hajda <a.hajda@samsung.com>2017-11-30 01:56:12 -0500
commit9217c1abbc145a77d65c476cf2004a3df02104c7 (patch)
tree7e37fe8bdb1e03c578327927874f269f0f3eb85e
parent66d1c3b94d5d59e4325e61a78d520f92c043d645 (diff)
drm/bridge: tc358767: fix AUXDATAn registers access
First four bytes should go to DP0_AUXWDATA0. Due to bug if len > 4 first four bytes was writen to DP0_AUXWDATA1 and all data get shifted by 4 bytes. Fix it. Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-6-git-send-email-andrey.gusakov@cogentembedded.com
-rw-r--r--drivers/gpu/drm/bridge/tc358767.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index b916346b933a..24f495bf0567 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -318,7 +318,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux,
318 tmp = (tmp << 8) | buf[i]; 318 tmp = (tmp << 8) | buf[i];
319 i++; 319 i++;
320 if (((i % 4) == 0) || (i == size)) { 320 if (((i % 4) == 0) || (i == size)) {
321 tc_write(DP0_AUXWDATA(i >> 2), tmp); 321 tc_write(DP0_AUXWDATA((i - 1) >> 2), tmp);
322 tmp = 0; 322 tmp = 0;
323 } 323 }
324 } 324 }