1244N/A+ This function optimize the Priority Request control
1244N/A+ Higher HiPriLvl will reduce drawing performance
1244N/A+ We need to give enough bandwith to crtc to avoid visual artifact
1244N/A+ if (pMga->reg_1e24 >= 0x02)
1244N/A+ /* Calulate CRTC Priority value */
1244N/A+ /* uiBitsPerPixel can only be 8,16 or32 */
1244N/A+ if (pScrn->bitsPerPixel > 16)
1244N/A+ else if (pScrn->bitsPerPixel > 8)
1244N/A+ ulMemoryBandwidth = (mode->Clock * ulBitsPerPixel) / 1000;
1244N/A+ if (ulMemoryBandwidth > 3100) ucHiPriLvl = 0;
1244N/A+ else if (ulMemoryBandwidth > 2600) ucHiPriLvl = 1;
1244N/A+ else if (ulMemoryBandwidth > 1900) ucHiPriLvl = 2;
1244N/A+ else if (ulMemoryBandwidth > 1160) ucHiPriLvl = 3;
1244N/A+ else if (ulMemoryBandwidth > 440) ucHiPriLvl = 4;
1244N/A- if (pMga->reg_1e24 == 0x01)
1244N/A+ OUTREG8(0x1FDF, ucHiPriLvl);
1244N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Clock == %d\n", mode->Clock);
1244N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "BitsPerPixel == %d\n", pScrn->bitsPerPixel);
1244N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "MemoryBandwidth == %d\n", ulMemoryBandwidth);
1244N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HiPriLvl == %02X\n", ucHiPriLvl);
1244N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Clock == %d\n", mode->Clock);
1244N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "BitsPerPixel == %d\n", pScrn->bitsPerPixel);
1244N/A+ if (pMga->reg_1e24 >= 0x01)
1244N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HiPriLvl == 03\n");
1244N/A+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HiPriLvl == 14h\n");
1244N/A MGAPtr pMga = MGAPTR(pScrn);
1244N/A if (pMga->Chipset == PCI_CHIP_MGAG200_SE_A_PCI) {
1244N/A- if (mode->HDisplay > 1600)
1244N/A- if (mode->VDisplay > 1200)
1244N/A- if (pMga->reg_1e24 == 0x01 &&
1244N/A- xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 244)
1244N/A+ if (pMga->reg_1e24 == 0x01) {
1244N/A+ if (mode->HDisplay > 1600)
1244N/A+ if (mode->VDisplay > 1200)
1244N/A+ if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 244)
1244N/A+ if (pMga->reg_1e24 >= 0x02) {
1244N/A+ if (mode->HDisplay > 1920)
1244N/A+ if (mode->VDisplay > 1200)
1244N/A+ if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 301)
1244N/A } else if (pMga->is_G200WB){
1244N/A if (mode->Flags & V_DBLSCAN)