Lines Matching refs:clock

113 /** Derive the pixel clock for the given refclk and divisors for 8xx chips. */
114 static void mrst_lvds_clock(int refclk, struct gma_clock_t *clock)
116 clock->dot = (refclk * clock->m) / (14 * clock->p1);
119 static void mrst_print_pll(struct gma_clock_t *clock)
122 clock->dot, clock->m, clock->m1, clock->m2, clock->n,
123 clock->p1, clock->p2);
130 struct gma_clock_t clock;
135 memset(&clock, 0, sizeof(clock));
137 for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
138 for (clock.n = limit->n.min; clock.n <= limit->n.max;
139 clock.n++) {
140 for (clock.p1 = limit->p1.min;
141 clock.p1 <= limit->p1.max; clock.p1++) {
143 clock.p = clock.p1 * limit->p2.p2_slow;
144 target_vco = target * clock.p;
153 actual_freq = (refclk * clock.m) /
154 (clock.n * clock.p);
169 *best_clock = clock;
181 * Returns a set of divisors for the desired target clock with the given refclk,
188 struct gma_clock_t clock;
192 memset(&clock, 0, sizeof(clock));
194 for (clock.m = limit->m.min; clock.m <= limit->m.max; clock.m++) {
195 for (clock.p1 = limit->p1.min; clock.p1 <= limit->p1.max;
196 clock.p1++) {
199 mrst_lvds_clock(refclk, &clock);
201 this_err = abs(clock.dot - target);
203 *best_clock = clock;
371 struct gma_clock_t clock;
507 ok = limit->find_pll(limit, crtc, adjusted_mode->clock,
508 refclk, &clock);
512 clock.p1 = (1L << (clock.p1 - 1));
513 clock.m -= 2;
514 clock.n = (1L << (clock.n - 1));
520 mrst_print_pll(&clock);
523 fp = clock.n << 16 | clock.m;
525 fp = oaktrail_m_converts[(clock.m - MRST_M_MIN)] << 8;
539 adjusted_mode->clock / mode->clock;
550 dpll |= clock.p1 << 16; // dpll |= (1 << (clock.p1 - 1)) << 16;
552 dpll |= (1 << (clock.p1 - 2)) << 17;
664 .clock = mrst_lvds_clock,