Commit 920dd1b1 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh



htotal*vtotal*vrefresh ~= clock. So just say "clock" when we mean it.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-12-ville.syrjala@linux.intel.com
parent 42acb06b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -537,8 +537,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
	 * porches and sync.
	 */
	/* (ps/s) / (pixels/s) = ps/pixels */
	pclk = DIV_ROUND_UP_ULL(1000000000000,
				(drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal));
	pclk = DIV_ROUND_UP_ULL(1000000000000, mode->clock);
	dev_dbg(d->dev, "picoseconds between two pixels: %llu\n",
		pclk);