diff options
| author | Svyatoslav Ryhel <[email protected]> | 2024-12-02 08:12:36 +0200 |
|---|---|---|
| committer | Svyatoslav Ryhel <[email protected]> | 2025-02-26 13:06:40 +0200 |
| commit | 7d2004983e969e8a5603b8973c8450484b55da71 (patch) | |
| tree | dd0364108bfa28bdac563eeb495620e901bfd23e | |
| parent | aa9fa8c1addf76e94f02de8d5ca7774777680285 (diff) | |
video: tegra20: dsi: calculate packet parameters for video mode
Calculate packet parameters for video mode same way it is done or
command mode, by halving timings plugged into equations.
Signed-off-by: Svyatoslav Ryhel <[email protected]>
| -rw-r--r-- | drivers/video/tegra20/tegra-dsi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/tegra20/tegra-dsi.c b/drivers/video/tegra20/tegra-dsi.c index e1502d8d60e..2beb9ec9f24 100644 --- a/drivers/video/tegra20/tegra-dsi.c +++ b/drivers/video/tegra20/tegra-dsi.c @@ -697,12 +697,19 @@ static void tegra_dsi_configure(struct udevice *dev, /* horizontal back porch */ hbp = timing->hback_porch.typ * mul / div; - if ((mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) == 0) - hbp += hsw; - /* horizontal front porch */ hfp = timing->hfront_porch.typ * mul / div; + if (priv->master || priv->slave) { + hact /= 2; + hsw /= 2; + hbp = hbp / 2 - 1; + hfp /= 2; + } + + if ((mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) == 0) + hbp += hsw; + /* subtract packet overhead */ hsw -= 10; hbp -= 14; |
