int pipe = pipe_config->cpu_transcoder;
intel_clock_t clock;
u32 mdiv;
- int refclk = 100000, fastclk, update_rate;
+ int refclk = 100000;
mutex_lock(&dev_priv->dpio_lock);
mdiv = vlv_dpio_read(dev_priv, DPIO_DIV(pipe));
clock.p1 = (mdiv >> DPIO_P1_SHIFT) & 7;
clock.p2 = (mdiv >> DPIO_P2_SHIFT) & 0x1f;
- update_rate = refclk / clock.n;
- clock.vco = update_rate * clock.m1 * clock.m2;
- fastclk = clock.vco / clock.p1 / clock.p2;
- clock.dot = (2 * fastclk);
+ clock.vco = refclk * clock.m1 * clock.m2 / clock.n;
+ clock.dot = 2 * clock.vco / (clock.p1 * clock.p2);
pipe_config->adjusted_mode.clock = clock.dot / 10;
}