diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2020-04-28 19:19:35 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2020-05-27 13:31:42 +0200 |
commit | 920dd1b1425bdf1c10b04e4f43269e402da9f626 (patch) | |
tree | c8040cb9e9b4fcba7ecaebd57a088cef1d0a193e /drivers/gpu/drm/mcde | |
parent | drm: pahole struct drm_display_mode (diff) | |
download | linux-920dd1b1425bdf1c10b04e4f43269e402da9f626.tar.xz linux-920dd1b1425bdf1c10b04e4f43269e402da9f626.zip |
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: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-12-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/mcde')
-rw-r--r-- | drivers/gpu/drm/mcde/mcde_dsi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index ed28eaa42251..981923caa7e6 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -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); |