Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/tegra: dsi: Calculate packet parameters for video mode

Calculate packet parameters for video mode same way it is done for
command mode, by halving timings plugged into equations.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20250909073335.91531-3-clamor95@gmail.com

authored by

Svyatoslav Ryhel and committed by
Thierry Reding
ef8ff042 ae4235f7

+10 -3
+10 -3
drivers/gpu/drm/tegra/dsi.c
··· 546 546 /* horizontal back porch */ 547 547 hbp = (mode->htotal - mode->hsync_end) * mul / div; 548 548 549 - if ((dsi->flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) == 0) 550 - hbp += hsw; 551 - 552 549 /* horizontal front porch */ 553 550 hfp = (mode->hsync_start - mode->hdisplay) * mul / div; 551 + 552 + if (dsi->master || dsi->slave) { 553 + hact /= 2; 554 + hsw /= 2; 555 + hbp /= 2; 556 + hfp /= 2; 557 + } 558 + 559 + if ((dsi->flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) == 0) 560 + hbp += hsw; 554 561 555 562 /* subtract packet overhead */ 556 563 hsw -= 10;