Skip to content

Commit

Permalink
drm/stm: ltdc: remove clk_round_rate comment
Browse files Browse the repository at this point in the history
Clk_round_rate returns rounded clock without changing
the hardware in any way.
This function couldn't replace set_rate/get_rate calls.
Todo comment has been removed & a new log inserted.

Signed-off-by: Yannick Fertré <[email protected]>
Signed-off-by: Benjamin Gaignard <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
YFESTM authored and Benjamin-Gaignard committed May 24, 2019
1 parent 909fa33 commit fd6905f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/gpu/drm/stm/ltdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,20 +507,16 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
struct ltdc_device *ldev = crtc_to_ltdc(crtc);
int rate = mode->clock * 1000;

/*
* TODO clk_round_rate() does not work yet. When ready, it can
* be used instead of clk_set_rate() then clk_get_rate().
*/

clk_disable(ldev->pixel_clk);
if (clk_set_rate(ldev->pixel_clk, rate) < 0) {
DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate);
return false;
}
clk_enable(ldev->pixel_clk);

adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;

DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
mode->clock, adjusted_mode->clock);

return true;
}

Expand Down

0 comments on commit fd6905f

Please sign in to comment.