diff options
author | Francesco Dolcini <francesco.dolcini@toradex.com> | 2023-04-27 17:29:32 +0300 |
---|---|---|
committer | Robert Foss <rfoss@kernel.org> | 2023-05-05 21:11:48 +0300 |
commit | 3666aad8185af8d0ce164fd3c4974235417d6d0b (patch) | |
tree | 00df68b50960ab3191c72290fc67b3ace98bf3a2 /drivers/gpu | |
parent | 77a089328da791118af9692543a5eedc79eb5fd4 (diff) | |
download | linux-3666aad8185af8d0ce164fd3c4974235417d6d0b.tar.xz |
drm/bridge: tc358768: fix TXTAGOCNT computation
Correct computation of TXTAGOCNT register.
This register must be set to a value that ensure that the
TTA-GO period = (4 x TLPX)
with the actual value of TTA-GO being
4 x (TXTAGOCNT + 1) x (HSByteClk cycle)
Fixes: ff1ca6397b1d ("drm/bridge: Add tc358768 driver")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230427142934.55435-8-francesco@dolcini.it
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/bridge/tc358768.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c index e3f456bfb90c..d8209433d5f4 100644 --- a/drivers/gpu/drm/bridge/tc358768.c +++ b/drivers/gpu/drm/bridge/tc358768.c @@ -796,7 +796,7 @@ static void tc358768_bridge_pre_enable(struct drm_bridge *bridge) /* TXTAGOCNT[26:16] RXTASURECNT[10:0] */ val = tc358768_to_ns((lptxcnt + 1) * dsibclk_nsk * 4); - val = tc358768_ns_to_cnt(val, dsibclk_nsk) - 1; + val = tc358768_ns_to_cnt(val, dsibclk_nsk) / 4 - 1; val2 = tc358768_ns_to_cnt(tc358768_to_ns((lptxcnt + 1) * dsibclk_nsk), dsibclk_nsk) - 2; val = val << 16 | val2; |