Commit cf57fdc8 authored by Benjamin Gaignard's avatar Benjamin Gaignard

drm/stm: ltdc: restore calls to clk_{enable/disable}

Restore calls to clk_{enable/disable} deleted after applying the wrong
version of the patch

Fixes: fd6905fc ("drm/stm: ltdc: remove clk_round_rate comment")
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190527115830.15836-1-benjamin.gaignard@st.com
parent fd86575f
...@@ -507,10 +507,12 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc, ...@@ -507,10 +507,12 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
struct ltdc_device *ldev = crtc_to_ltdc(crtc); struct ltdc_device *ldev = crtc_to_ltdc(crtc);
int rate = mode->clock * 1000; int rate = mode->clock * 1000;
clk_disable(ldev->pixel_clk);
if (clk_set_rate(ldev->pixel_clk, rate) < 0) { if (clk_set_rate(ldev->pixel_clk, rate) < 0) {
DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate); DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate);
return false; return false;
} }
clk_enable(ldev->pixel_clk);
adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000; adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment