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 <jonathan@marek.ca> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/618432/ Link: https://lore.kernel.org/r/20241007050157.26855-1-jonathan@marek.ca Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
1 parent f260ed8 commit 24436a5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)