H A D | g450_pll.c | 29 unsigned int mnp) g450_mnp2vco() 33 m = ((mnp >> 16) & 0x0FF) + 1; g450_mnp2vco() 34 n = ((mnp >> 7) & 0x1FE) + 4; g450_mnp2vco() 38 unsigned int g450_mnp2f(const struct matrox_fb_info *minfo, unsigned int mnp) g450_mnp2f() argument 40 return g450_vco2f(mnp, g450_mnp2vco(minfo, mnp)); g450_mnp2f() 57 unsigned int *fvco, unsigned int mnp) g450_nextpll() 62 m = (mnp >> 16) & 0xFF; g450_nextpll() 63 p = mnp & 0xFF; g450_nextpll() 137 unsigned int mnp, unsigned int pll) g450_setpll() 141 matroxfb_DAC_out(minfo, M1064_XPIXPLLAM, mnp >> 16); g450_setpll() 142 matroxfb_DAC_out(minfo, M1064_XPIXPLLAN, mnp >> 8); g450_setpll() 143 matroxfb_DAC_out(minfo, M1064_XPIXPLLAP, mnp); g450_setpll() 147 matroxfb_DAC_out(minfo, M1064_XPIXPLLBM, mnp >> 16); g450_setpll() 148 matroxfb_DAC_out(minfo, M1064_XPIXPLLBN, mnp >> 8); g450_setpll() 149 matroxfb_DAC_out(minfo, M1064_XPIXPLLBP, mnp); g450_setpll() 153 matroxfb_DAC_out(minfo, M1064_XPIXPLLCM, mnp >> 16); g450_setpll() 154 matroxfb_DAC_out(minfo, M1064_XPIXPLLCN, mnp >> 8); g450_setpll() 155 matroxfb_DAC_out(minfo, M1064_XPIXPLLCP, mnp); g450_setpll() 159 matroxfb_DAC_out(minfo, DAC1064_XSYSPLLM, mnp >> 16); g450_setpll() 160 matroxfb_DAC_out(minfo, DAC1064_XSYSPLLN, mnp >> 8); g450_setpll() 161 matroxfb_DAC_out(minfo, DAC1064_XSYSPLLP, mnp); g450_setpll() 165 matroxfb_DAC_out(minfo, M1064_XVIDPLLM, mnp >> 16); g450_setpll() 166 matroxfb_DAC_out(minfo, M1064_XVIDPLLN, mnp >> 8); g450_setpll() 167 matroxfb_DAC_out(minfo, M1064_XVIDPLLP, mnp); g450_setpll() 174 unsigned int mnp, unsigned int pll) g450_cmppll() 176 unsigned char m = mnp >> 16; g450_cmppll() 177 unsigned char n = mnp >> 8; g450_cmppll() 178 unsigned char p = mnp; g450_cmppll() 229 static int g450_testpll(const struct matrox_fb_info *minfo, unsigned int mnp, g450_testpll() argument 232 return g450_isplllocked(minfo, g450_setpll(minfo, mnp, pll)); g450_testpll() 235 static void updatehwstate_clk(struct matrox_hw_state* hw, unsigned int mnp, unsigned int pll) { updatehwstate_clk() argument 238 hw->DACclk[3] = mnp >> 16; updatehwstate_clk() 239 hw->DACclk[4] = mnp >> 8; updatehwstate_clk() 240 hw->DACclk[5] = mnp; updatehwstate_clk() 245 void matroxfb_g450_setpll_cond(struct matrox_fb_info *minfo, unsigned int mnp, matroxfb_g450_setpll_cond() argument 248 if (g450_cmppll(minfo, mnp, pll)) { matroxfb_g450_setpll_cond() 249 g450_setpll(minfo, mnp, pll); matroxfb_g450_setpll_cond() 266 unsigned int mnp; g450_findworkingpll() local 269 mnp = mnparray[idx]; g450_findworkingpll() 270 if (mnp & 0x38) { g450_findworkingpll() 271 *sptr++ = mnp - 8; g450_findworkingpll() 273 if ((mnp & 0x38) != 0x38) { g450_findworkingpll() 274 *sptr++ = mnp + 8; g450_findworkingpll() 276 *sptr = mnp; g450_findworkingpll() 279 unsigned int mnp = *sptr--; g450_findworkingpll() local 281 if (g450_testpll(minfo, mnp - 0x0300, pll) && g450_findworkingpll() 282 g450_testpll(minfo, mnp + 0x0300, pll) && g450_findworkingpll() 283 g450_testpll(minfo, mnp - 0x0200, pll) && g450_findworkingpll() 284 g450_testpll(minfo, mnp + 0x0200, pll) && g450_findworkingpll() 285 g450_testpll(minfo, mnp - 0x0100, pll) && g450_findworkingpll() 286 g450_testpll(minfo, mnp + 0x0100, pll)) { g450_findworkingpll() 287 if (g450_testpll(minfo, mnp, pll)) { g450_findworkingpll() 288 return mnp; g450_findworkingpll() 290 } else if (!found && g450_testpll(minfo, mnp, pll)) { g450_findworkingpll() 291 mnpfound = mnp; g450_findworkingpll() 317 unsigned int mnp; g450_checkcache() local 319 mnp = ci->data[i].mnp_value; g450_checkcache() 323 ci->data[0].mnp_value = mnp; g450_checkcache() 325 return mnp; g450_checkcache() 412 unsigned int mnp; __g450_setclk() local 421 mnp = matroxfb_DAC_in(minfo, M1064_XPIXPLLCM) << 16; __g450_setclk() 422 mnp |= matroxfb_DAC_in(minfo, M1064_XPIXPLLCN) << 8; __g450_setclk() 423 pixel_vco = g450_mnp2vco(minfo, mnp); __g450_setclk() 435 unsigned int mnp; __g450_setclk() local 438 for (mnp = g450_firstpll(minfo, pi, &xvco, fout); mnp != NO_MORE_MNP; mnp = g450_nextpll(minfo, pi, &xvco, mnp)) { __g450_setclk() 443 vco = g450_mnp2vco(minfo, mnp); __g450_setclk() 463 delta = pll_freq_delta(fout, g450_vco2f(mnp, vco)); __g450_setclk() 485 mnparray[idx] = mnp; __g450_setclk() 496 unsigned int mnp; __g450_setclk() local 499 mnp = g450_checkcache(minfo, ci, mnparray[0]); __g450_setclk() 500 if (mnp != NO_MORE_MNP) { __g450_setclk() 501 matroxfb_g450_setpll_cond(minfo, mnp, pll); __g450_setclk() 503 mnp = g450_findworkingpll(minfo, pll, mnparray, mnpcount); __g450_setclk() 504 g450_addcache(ci, mnparray[0], mnp); __g450_setclk() 506 updatehwstate_clk(&minfo->hw, mnp, pll); __g450_setclk() 508 return mnp; __g450_setclk() 28 g450_mnp2vco(const struct matrox_fb_info *minfo, unsigned int mnp) g450_mnp2vco() argument 55 g450_nextpll(const struct matrox_fb_info *minfo, const struct matrox_pll_limits *pi, unsigned int *fvco, unsigned int mnp) g450_nextpll() argument 136 g450_setpll(const struct matrox_fb_info *minfo, unsigned int mnp, unsigned int pll) g450_setpll() argument 173 g450_cmppll(const struct matrox_fb_info *minfo, unsigned int mnp, unsigned int pll) g450_cmppll() argument
|