Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2 1/2] drm/msm/dsi: improve/fix dsc pclk calculation
@ 2024-10-07  5:01 Jonathan Marek
  2024-10-07  5:01 ` [PATCH v2 2/2] drm/msm/dsi: fix 32-bit signed integer extension in pclk_rate calculation Jonathan Marek
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jonathan Marek @ 2024-10-07  5:01 UTC (permalink / raw)
  To: freedreno
  Cc: Rob Clark, Abhinav Kumar, Dmitry Baryshkov, Sean Paul,
	Marijn Suijten, David Airlie, Simona Vetter, Jessica Zhang,
	Konrad Dybcio, open list:DRM DRIVER for Qualcomm display hardware,
	open list:DRM DRIVER for Qualcomm display hardware, open list

drm_mode_vrefresh() can introduce a large rounding error, avoid it.

Fixes: 7c9e4a554d4a ("drm/msm/dsi: Reduce pclk rate for compression")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
---
 drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 185d7de0bf376..1205aa398e445 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -542,7 +542,7 @@ static unsigned long dsi_adjust_pclk_for_compression(const struct drm_display_mo
 
 	int new_htotal = mode->htotal - mode->hdisplay + new_hdisplay;
 
-	return new_htotal * mode->vtotal * drm_mode_vrefresh(mode);
+	return mult_frac(mode->clock * 1000u, new_htotal, mode->htotal);
 }
 
 static unsigned long dsi_get_pclk_rate(const struct drm_display_mode *mode,
-- 
2.45.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-14 19:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07  5:01 [PATCH v2 1/2] drm/msm/dsi: improve/fix dsc pclk calculation Jonathan Marek
2024-10-07  5:01 ` [PATCH v2 2/2] drm/msm/dsi: fix 32-bit signed integer extension in pclk_rate calculation Jonathan Marek
2024-10-07 13:19   ` Dmitry Baryshkov
2024-10-14 19:30   ` Abhinav Kumar
2024-10-07 13:16 ` [PATCH v2 1/2] drm/msm/dsi: improve/fix dsc pclk calculation Dmitry Baryshkov
2024-10-14 19:39 ` Abhinav Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox