drm/exynos: Use mode->clock instead of reverse calculating it from the vrefresh
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 19 Feb 2020 20:35:34 +0000 (22:35 +0200)
committerInki Dae <inki.dae@samsung.com>
Wed, 18 Mar 2020 03:11:44 +0000 (12:11 +0900)
htotal*vtotal*vrefresh ~= clock. So just use say "clock" when we mean it.

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos7_drm_decon.c

index ff59c641fa809224b96972928c3b6ae6a5fb3c21..e7b58097ccdc370c69627be183e79aeaed3b800f 100644 (file)
@@ -139,7 +139,7 @@ static void decon_ctx_remove(struct decon_context *ctx)
 static u32 decon_calc_clkdiv(struct decon_context *ctx,
                const struct drm_display_mode *mode)
 {
-       unsigned long ideal_clk = mode->htotal * mode->vtotal * mode->vrefresh;
+       unsigned long ideal_clk = mode->clock;
        u32 clkdiv;
 
        /* Find the clock divider value that gets us closest to ideal_clk */