From: Ville Syrjälä Date: Mon, 14 Oct 2013 11:50:31 +0000 (+0300) Subject: drm/i915: Use vlv_clock() in vlv_crtc_clock_get() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f646628b9f40cbd1c13a0eb190901c6a78395be6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Use vlv_clock() in vlv_crtc_clock_get() Avoid some code duplication. Signed-off-by: Ville Syrjälä Reviewed-by: Jesse Barnes Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 5e7127b08ada..e6a4ca16f33c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5215,10 +5215,10 @@ static void vlv_crtc_clock_get(struct intel_crtc *crtc, clock.p1 = (mdiv >> DPIO_P1_SHIFT) & 7; clock.p2 = (mdiv >> DPIO_P2_SHIFT) & 0x1f; - clock.vco = refclk * clock.m1 * clock.m2 / clock.n; - clock.dot = 2 * clock.vco / (clock.p1 * clock.p2); + vlv_clock(refclk, &clock); - pipe_config->port_clock = clock.dot / 10; + /* clock.dot is the fast clock */ + pipe_config->port_clock = clock.dot / 5; } static bool i9xx_get_pipe_config(struct intel_crtc *crtc,