Reviewed-by: Samer El-Haj-Mahmoud <[email protected]> ________________________________ From: xorg-devel <[email protected]> on behalf of [email protected] <[email protected]> Sent: Monday, June 12, 2017 4:08:42 PM To: [email protected] Cc: Mathieu Larouche Subject: [PATCH video-mga] xf86-video-mga: Fix-to-always-set-HiPri-for-G200e4
From: Mathieu Larouche <[email protected]> - Changed the HiPri value for G200e4 to always be 0. - Added Bandwith limitation to block resolution above 1920x1200x60Hz --- src/mga_driver.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/src/mga_driver.c b/src/mga_driver.c index 79c6da7..615518a 100644 --- a/src/mga_driver.c +++ b/src/mga_driver.c @@ -2969,14 +2969,21 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) } - ulMemoryBandwidth = (mode->Clock * ulBitsPerPixel) / 1000; - - if (ulMemoryBandwidth > 3100) ucHiPriLvl = 0; - else if (ulMemoryBandwidth > 2600) ucHiPriLvl = 1; - else if (ulMemoryBandwidth > 1900) ucHiPriLvl = 2; - else if (ulMemoryBandwidth > 1160) ucHiPriLvl = 3; - else if (ulMemoryBandwidth > 440) ucHiPriLvl = 4; - else ucHiPriLvl = 5; + if (pMga->reg_1e24 >= 0x04) + { + ucHiPriLvl = 0; + } + else + { + ulMemoryBandwidth = (mode->Clock * ulBitsPerPixel) / 1000; + + if (ulMemoryBandwidth > 3100) ucHiPriLvl = 0; + else if (ulMemoryBandwidth > 2600) ucHiPriLvl = 1; + else if (ulMemoryBandwidth > 1900) ucHiPriLvl = 2; + else if (ulMemoryBandwidth > 1160) ucHiPriLvl = 3; + else if (ulMemoryBandwidth > 440) ucHiPriLvl = 4; + else ucHiPriLvl = 5; + } OUTREG8(0x1FDE, 0x06); OUTREG8(0x1FDF, ucHiPriLvl); @@ -3883,15 +3890,17 @@ MGAValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) return MODE_VIRTUAL_Y; if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 244) return MODE_BANDWIDTH; - } else { - if (pMga->reg_1e24 == 0x02) { - if (mode->HDisplay > 1920) - return MODE_VIRTUAL_X; - if (mode->VDisplay > 1200) - return MODE_VIRTUAL_Y; - if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 301) - return MODE_BANDWIDTH; - } + } else if (pMga->reg_1e24 == 0x02) { + if (mode->HDisplay > 1920) + return MODE_VIRTUAL_X; + if (mode->VDisplay > 1200) + return MODE_VIRTUAL_Y; + if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 301) + return MODE_BANDWIDTH; + } + else { + if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 550) + return MODE_BANDWIDTH; } } else if (pMga->is_G200WB){ if (mode->Flags & V_DBLSCAN) -- 1.8.3.1 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
