Lines Matching refs:mnp
29 unsigned int mnp) in g450_mnp2vco() argument
33 m = ((mnp >> 16) & 0x0FF) + 1; in g450_mnp2vco()
34 n = ((mnp >> 7) & 0x1FE) + 4; in g450_mnp2vco()
38 unsigned int g450_mnp2f(const struct matrox_fb_info *minfo, unsigned int mnp) in g450_mnp2f() argument
40 return g450_vco2f(mnp, g450_mnp2vco(minfo, mnp)); in g450_mnp2f()
57 unsigned int *fvco, unsigned int mnp) in g450_nextpll() argument
62 m = (mnp >> 16) & 0xFF; in g450_nextpll()
63 p = mnp & 0xFF; in g450_nextpll()
137 unsigned int mnp, unsigned int pll) in g450_setpll() argument
141 matroxfb_DAC_out(minfo, M1064_XPIXPLLAM, mnp >> 16); in g450_setpll()
142 matroxfb_DAC_out(minfo, M1064_XPIXPLLAN, mnp >> 8); in g450_setpll()
143 matroxfb_DAC_out(minfo, M1064_XPIXPLLAP, mnp); in g450_setpll()
147 matroxfb_DAC_out(minfo, M1064_XPIXPLLBM, mnp >> 16); in g450_setpll()
148 matroxfb_DAC_out(minfo, M1064_XPIXPLLBN, mnp >> 8); in g450_setpll()
149 matroxfb_DAC_out(minfo, M1064_XPIXPLLBP, mnp); in g450_setpll()
153 matroxfb_DAC_out(minfo, M1064_XPIXPLLCM, mnp >> 16); in g450_setpll()
154 matroxfb_DAC_out(minfo, M1064_XPIXPLLCN, mnp >> 8); in g450_setpll()
155 matroxfb_DAC_out(minfo, M1064_XPIXPLLCP, mnp); in g450_setpll()
159 matroxfb_DAC_out(minfo, DAC1064_XSYSPLLM, mnp >> 16); in g450_setpll()
160 matroxfb_DAC_out(minfo, DAC1064_XSYSPLLN, mnp >> 8); in g450_setpll()
161 matroxfb_DAC_out(minfo, DAC1064_XSYSPLLP, mnp); in g450_setpll()
165 matroxfb_DAC_out(minfo, M1064_XVIDPLLM, mnp >> 16); in g450_setpll()
166 matroxfb_DAC_out(minfo, M1064_XVIDPLLN, mnp >> 8); in g450_setpll()
167 matroxfb_DAC_out(minfo, M1064_XVIDPLLP, mnp); in g450_setpll()
174 unsigned int mnp, unsigned int pll) in g450_cmppll() argument
176 unsigned char m = mnp >> 16; in g450_cmppll()
177 unsigned char n = mnp >> 8; in g450_cmppll()
178 unsigned char p = mnp; in g450_cmppll()
229 static int g450_testpll(const struct matrox_fb_info *minfo, unsigned int mnp, in g450_testpll() argument
232 return g450_isplllocked(minfo, g450_setpll(minfo, mnp, pll)); in g450_testpll()
235 static void updatehwstate_clk(struct matrox_hw_state* hw, unsigned int mnp, unsigned int pll) { in updatehwstate_clk() argument
238 hw->DACclk[3] = mnp >> 16; in updatehwstate_clk()
239 hw->DACclk[4] = mnp >> 8; in updatehwstate_clk()
240 hw->DACclk[5] = mnp; in updatehwstate_clk()
245 void matroxfb_g450_setpll_cond(struct matrox_fb_info *minfo, unsigned int mnp, in matroxfb_g450_setpll_cond() argument
248 if (g450_cmppll(minfo, mnp, pll)) { in matroxfb_g450_setpll_cond()
249 g450_setpll(minfo, mnp, pll); in matroxfb_g450_setpll_cond()
266 unsigned int mnp; in g450_findworkingpll() local
269 mnp = mnparray[idx]; in g450_findworkingpll()
270 if (mnp & 0x38) { in g450_findworkingpll()
271 *sptr++ = mnp - 8; in g450_findworkingpll()
273 if ((mnp & 0x38) != 0x38) { in g450_findworkingpll()
274 *sptr++ = mnp + 8; in g450_findworkingpll()
276 *sptr = mnp; in g450_findworkingpll()
279 unsigned int mnp = *sptr--; in g450_findworkingpll() local
281 if (g450_testpll(minfo, mnp - 0x0300, pll) && in g450_findworkingpll()
282 g450_testpll(minfo, mnp + 0x0300, pll) && in g450_findworkingpll()
283 g450_testpll(minfo, mnp - 0x0200, pll) && in g450_findworkingpll()
284 g450_testpll(minfo, mnp + 0x0200, pll) && in g450_findworkingpll()
285 g450_testpll(minfo, mnp - 0x0100, pll) && in g450_findworkingpll()
286 g450_testpll(minfo, mnp + 0x0100, pll)) { in g450_findworkingpll()
287 if (g450_testpll(minfo, mnp, pll)) { in g450_findworkingpll()
288 return mnp; in g450_findworkingpll()
290 } else if (!found && g450_testpll(minfo, mnp, pll)) { in g450_findworkingpll()
291 mnpfound = mnp; in g450_findworkingpll()
317 unsigned int mnp; in g450_checkcache() local
319 mnp = ci->data[i].mnp_value; in g450_checkcache()
323 ci->data[0].mnp_value = mnp; in g450_checkcache()
325 return mnp; in g450_checkcache()
410 unsigned int mnp; in __g450_setclk() local
419 mnp = matroxfb_DAC_in(minfo, M1064_XPIXPLLCM) << 16; in __g450_setclk()
420 mnp |= matroxfb_DAC_in(minfo, M1064_XPIXPLLCN) << 8; in __g450_setclk()
432 unsigned int mnp; in __g450_setclk() local
435 …for (mnp = g450_firstpll(minfo, pi, &xvco, fout); mnp != NO_MORE_MNP; mnp = g450_nextpll(minfo, pi… in __g450_setclk()
440 vco = g450_mnp2vco(minfo, mnp); in __g450_setclk()
441 delta = pll_freq_delta(fout, g450_vco2f(mnp, vco)); in __g450_setclk()
463 mnparray[idx] = mnp; in __g450_setclk()
474 unsigned int mnp; in __g450_setclk() local
477 mnp = g450_checkcache(minfo, ci, mnparray[0]); in __g450_setclk()
478 if (mnp != NO_MORE_MNP) { in __g450_setclk()
479 matroxfb_g450_setpll_cond(minfo, mnp, pll); in __g450_setclk()
481 mnp = g450_findworkingpll(minfo, pll, mnparray, mnpcount); in __g450_setclk()
482 g450_addcache(ci, mnparray[0], mnp); in __g450_setclk()
484 updatehwstate_clk(&minfo->hw, mnp, pll); in __g450_setclk()
486 return mnp; in __g450_setclk()