diff options
author | Mathieu Larouche <mathieu.larouche@matrox.com> | 2017-06-13 13:43:45 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2017-06-20 16:20:22 -0400 |
commit | 42fabf69c33d0e803eb661cc06217611bc3c9048 (patch) | |
tree | 7630045cf2f32f48c2b492eba71d9e1f9219c272 | |
parent | e55abc95c2b7f7cb8de73e1e21688fb5b5c08d5c (diff) |
xf86-video-mga: Fix to always set HiPri for G200e4 V2
- Changed the HiPri value for G200e4 to always be 0.
- Added Bandwith limitation to block resolution above 1920x1200x60Hz
- (V2): Pulled out ulMemoryBandwidth of condition so it's always initialized
as reviewed by : Stefan Dirsch <sndirsch@suse.de>
Reviewed-by: Samer El-Haj-Mahmoud <smahmoud@lenovo.com>
-rw-r--r-- | src/mga_driver.c | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/src/mga_driver.c b/src/mga_driver.c index 79c6da7..e496d0b 100644 --- a/src/mga_driver.c +++ b/src/mga_driver.c @@ -2971,12 +2971,20 @@ 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 + { + + 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 +3891,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) |