Skip to content

Commit

Permalink
drm/mcde: Use mode->clock instead of reverse calculating it from the …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Ville Syrjälä committed May 27, 2020
1 parent 42acb06 commit 920dd1b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/mcde/mcde_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 920dd1b

Please sign in to comment.