diff options
author | Yannick Fertré <yannick.fertre@st.com> | 2019-05-10 17:03:20 +0200 |
---|---|---|
committer | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2019-05-24 10:30:46 +0200 |
commit | fd6905fca4f013463026ca1a07fee463fbf0d974 (patch) | |
tree | 064e411d738b438ea9142696661baf0c51746e0e /drivers | |
parent | 909fa3321d348ef69366aad9e84e1dd9ee0bd060 (diff) | |
download | linux-fd6905fca4f013463026ca1a07fee463fbf0d974.tar.bz2 |
drm/stm: ltdc: remove clk_round_rate comment
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é <yannick.fertre@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1557500600-19771-1-git-send-email-yannick.fertre@st.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/stm/ltdc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 14eb8c40953b..ae2aaf2a62ee 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -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; } |