<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div>
<div dir="auto" style="direction:ltr; margin:0; padding:0; font-family:sans-serif; font-size:11pt; color:black; background-color:white">
Reviewed-by: Samer El-Haj-Mahmoud <smahmoud@lenovo.com> <br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> xorg-devel <xorg-devel-bounces@lists.x.org> on behalf of mathieu.larouche@matrox.com <mathieu.larouche@matrox.com><br>
<b>Sent:</b> Monday, June 12, 2017 4:08:42 PM<br>
<b>To:</b> xorg-devel@lists.x.org<br>
<b>Cc:</b> Mathieu Larouche<br>
<b>Subject:</b> [PATCH video-mga] xf86-video-mga: Fix-to-always-set-HiPri-for-G200e4</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">From: Mathieu Larouche <mathieu.larouche@matrox.com><br>
<br>
  - Changed the HiPri value for G200e4 to always be 0.<br>
  - Added Bandwith limitation to block resolution above 1920x1200x60Hz<br>
---<br>
 src/mga_driver.c | 43 ++++++++++++++++++++++++++-----------------<br>
 1 file changed, 26 insertions(+), 17 deletions(-)<br>
<br>
diff --git a/src/mga_driver.c b/src/mga_driver.c<br>
index 79c6da7..615518a 100644<br>
--- a/src/mga_driver.c<br>
+++ b/src/mga_driver.c<br>
@@ -2969,14 +2969,21 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)<br>
             }<br>
 <br>
             <br>
-            ulMemoryBandwidth = (mode->Clock * ulBitsPerPixel) / 1000;<br>
-<br>
-            if      (ulMemoryBandwidth    > 3100)  ucHiPriLvl = 0;<br>
-            else if (ulMemoryBandwidth    > 2600)  ucHiPriLvl = 1;<br>
-            else if (ulMemoryBandwidth    > 1900)  ucHiPriLvl = 2;<br>
-            else if (ulMemoryBandwidth    > 1160)  ucHiPriLvl = 3;<br>
-            else if (ulMemoryBandwidth    > 440)   ucHiPriLvl = 4;<br>
-            else ucHiPriLvl = 5;<br>
+            if (pMga->reg_1e24 >= 0x04)<br>
+            {<br>
+                ucHiPriLvl = 0;<br>
+            }<br>
+            else<br>
+            {<br>
+                 ulMemoryBandwidth = (mode->Clock * ulBitsPerPixel) / 1000;<br>
+<br>
+                if      (ulMemoryBandwidth    > 3100)  ucHiPriLvl = 0;<br>
+                else if (ulMemoryBandwidth    > 2600)  ucHiPriLvl = 1;<br>
+                else if (ulMemoryBandwidth    > 1900)  ucHiPriLvl = 2;<br>
+                else if (ulMemoryBandwidth    > 1160)  ucHiPriLvl = 3;<br>
+                else if (ulMemoryBandwidth    > 440)   ucHiPriLvl = 4;<br>
+                else ucHiPriLvl = 5;<br>
+            }<br>
 <br>
             OUTREG8(0x1FDE, 0x06);<br>
                     OUTREG8(0x1FDF, ucHiPriLvl);<br>
@@ -3883,15 +3890,17 @@ MGAValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)<br>
                     return MODE_VIRTUAL_Y;<br>
                 if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 244)<br>
                     return MODE_BANDWIDTH;<br>
-        } else {<br>
-            if (pMga->reg_1e24 == 0x02) {<br>
-                   if (mode->HDisplay > 1920)<br>
-                       return MODE_VIRTUAL_X;<br>
-                   if (mode->VDisplay > 1200)<br>
-                       return MODE_VIRTUAL_Y;<br>
-                   if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 301)<br>
-                       return MODE_BANDWIDTH;<br>
-            }<br>
+        } else if (pMga->reg_1e24 == 0x02) {<br>
+            if (mode->HDisplay > 1920)<br>
+                return MODE_VIRTUAL_X;<br>
+            if (mode->VDisplay > 1200)<br>
+                return MODE_VIRTUAL_Y;<br>
+            if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 301)<br>
+                return MODE_BANDWIDTH;<br>
+        }<br>
+        else {<br>
+            if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 550)<br>
+                return MODE_BANDWIDTH;<br>
         }<br>
     } else if (pMga->is_G200WB){<br>
         if (mode->Flags & V_DBLSCAN)<br>
-- <br>
1.8.3.1<br>
<br>
_______________________________________________<br>
xorg-devel@lists.x.org: X.Org development<br>
Archives: <a href="http://lists.x.org/archives/xorg-devel">http://lists.x.org/archives/xorg-devel</a><br>
Info: <a href="https://lists.x.org/mailman/listinfo/xorg-devel">https://lists.x.org/mailman/listinfo/xorg-devel</a></div>
</span></font>
</body>
</html>