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: fd6905fca4 ("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
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user