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