aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
index 6ff585055a07..bfa7e2b146df 100644
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
@@ -457,8 +457,9 @@ static void sun6i_dsi_setup_inst_loop(struct sun6i_dsi *dsi,
457 u16 delay = 50 - 1; 457 u16 delay = 50 - 1;
458 458
459 if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) { 459 if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
460 delay = (mode->htotal - mode->hdisplay) * 150; 460 u32 hsync_porch = (mode->htotal - mode->hdisplay) * 150;
461 delay /= (mode->clock / 1000) * 8; 461
462 delay = (hsync_porch / ((mode->clock / 1000) * 8));
462 delay -= 50; 463 delay -= 50;
463 } 464 }
464 465