Skip to content

Commit 24436a5

Browse files
fltoAbhinav Kumar
authored andcommitted
drm/msm/dsi: improve/fix dsc pclk calculation
drm_mode_vrefresh() can introduce a large rounding error, avoid it. Fixes: 7c9e4a5 ("drm/msm/dsi: Reduce pclk rate for compression") Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/618432/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abhinav Kumar <[email protected]>
1 parent f260ed8 commit 24436a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/msm/dsi/dsi_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static unsigned long dsi_adjust_pclk_for_compression(const struct drm_display_mo
542542

543543
int new_htotal = mode->htotal - mode->hdisplay + new_hdisplay;
544544

545-
return new_htotal * mode->vtotal * drm_mode_vrefresh(mode);
545+
return mult_frac(mode->clock * 1000u, new_htotal, mode->htotal);
546546
}
547547

548548
static unsigned long dsi_get_pclk_rate(const struct drm_display_mode *mode,

0 commit comments

Comments
 (0)