drm/stm: ltdc: restore calls to clk_{enable/disable}
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Mon, 27 May 2019 11:58:30 +0000 (13:58 +0200)
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>
Tue, 28 May 2019 07:21:34 +0000 (09:21 +0200)
Restore calls to clk_{enable/disable} deleted after applying the wrong
version of the patch

Fixes: fd6905fca4f0 ("drm/stm: ltdc: remove clk_round_rate comment")
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190527115830.15836-1-benjamin.gaignard@st.com
drivers/gpu/drm/stm/ltdc.c

index ae2aaf2a62ee5a4bad2670c3230c08cd6f75481f..ac29890edeb69aa3247c9647d77d189d6f5e1ed3 100644 (file)
@@ -507,10 +507,12 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
        struct ltdc_device *ldev = crtc_to_ltdc(crtc);
        int rate = mode->clock * 1000;
 
+       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;