Commit b59b8de3 authored by Chris Zhong's avatar Chris Zhong Committed by Mark Yao

drm/rockchip: return a true clock rate to adjusted_mode

Since the mipi dsi driver need to use the clock of vop to make the
calculation of Blanking. But sometimes the clock driver can not set a
accurate clock_rate for vop, get it by clk_round_rate before mode_set,
so we can get the true value.
Signed-off-by: default avatarChris Zhong <zyw@rock-chips.com>
Acked-by: default avatarMark Yao <mark.yao@rock-chips.com>
parent c11b8989
...@@ -878,9 +878,14 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc, ...@@ -878,9 +878,14 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,
const struct drm_display_mode *mode, const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode) struct drm_display_mode *adjusted_mode)
{ {
struct vop *vop = to_vop(crtc);
if (adjusted_mode->htotal == 0 || adjusted_mode->vtotal == 0) if (adjusted_mode->htotal == 0 || adjusted_mode->vtotal == 0)
return false; return false;
adjusted_mode->clock =
clk_round_rate(vop->dclk, mode->clock * 1000) / 1000;
return true; return true;
} }
......
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