[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-mga: Changes to 'debian-unstable'



 ChangeLog        |   28 +++++++++++++
 debian/changelog |   10 ++++
 debian/control   |    2 
 src/mga_dri.c    |    1 
 src/mga_driver.c |  116 ++++++++++++++++++++++++++++++++++++++++++++++++-------
 src/mga_reg.h    |    3 +
 6 files changed, 144 insertions(+), 16 deletions(-)

New commits:
commit fe9be5248c08ca69adf84479aa444fa3c2ac5a0b
Author: Tormod Volden <debian.tormod@gmail.com>
Date:   Sun Oct 9 23:20:18 2011 +0200

    Bump Standards-Version to 3.9.2

diff --git a/debian/changelog b/debian/changelog
index 62c3988..89eb632 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ xserver-xorg-video-mga (1:1.4.13.dfsg-4) UNRELEASED; urgency=low
     - 01ca218... Reset tagfifo for renesas.
     - c083bf0... Added support for G200SE Pilot3
     - 43280e6... Don't include xf86Priv.h
+  * Bump Standards-Version to 3.9.2 (no changes needed)
 
  -- Tormod Volden <debian.tormod@gmail.com>  Sun, 09 Oct 2011 23:14:26 +0200
 
diff --git a/debian/control b/debian/control
index 60ee16e..539353e 100644
--- a/debian/control
+++ b/debian/control
@@ -22,7 +22,7 @@ Build-Depends:
  x11proto-xf86dri-dev,
  quilt,
  xutils-dev (>= 1:7.5+4)
-Standards-Version: 3.9.1
+Standards-Version: 3.9.2
 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-video-mga
 Vcs-Browser: http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-mga.git
 

commit 992d6ae23501458f9cd86d658981cc88abfdb12b
Author: Tormod Volden <debian.tormod@gmail.com>
Date:   Sun Oct 9 23:17:12 2011 +0200

    Update changelogs

diff --git a/ChangeLog b/ChangeLog
index 53ef9fe..c55d36e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+commit 01ca2186ea028b2549de509b51726aa08519fce0
+Author: Christian Toutant <ctoutant@matrox.com>
+Date:   Tue Sep 20 13:07:16 2011 -0400
+
+    Reset tagfifo for renesas.
+    
+    For renesas, we need to reset tagfifo after a mode switch.
+    
+    Signed-off-by: Christian Toutant <ctoutant@matrox.com>
+
+commit c083bf0a66bef9a4345847f39be5fb895c211f79
+Author: Christian Toutant <ctoutant@matrox.com>
+Date:   Wed Aug 3 09:45:13 2011 -0400
+
+    Added support for G200SE Pilot3
+    
+    Optimize use of bandwidth and increase maximum resolution to 1920x1200
+    
+    Signed-off-by: Christian Toutant <ctoutant@matrox.com>
+
+commit 43280e6521815582f219d42821d896093c9c0d5f
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Wed Jun 22 17:02:29 2011 -0400
+
+    Don't include xf86Priv.h
+    
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
 commit 5f1b04e86e79938c8158055a777280a649f95510
 Author: Yannick Heneault <yheneaul@matrox.com>
 Date:   Fri Dec 17 09:00:46 2010 -0500
diff --git a/debian/changelog b/debian/changelog
index 9e1bff1..62c3988 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xserver-xorg-video-mga (1:1.4.13.dfsg-4) UNRELEASED; urgency=low
+
+  * Merge from upstream up to 01ca2186ea028b2549de509b51726aa08519fce0
+    - 01ca218... Reset tagfifo for renesas.
+    - c083bf0... Added support for G200SE Pilot3
+    - 43280e6... Don't include xf86Priv.h
+
+ -- Tormod Volden <debian.tormod@gmail.com>  Sun, 09 Oct 2011 23:14:26 +0200
+
 xserver-xorg-video-mga (1:1.4.13.dfsg-3) unstable; urgency=low
 
   * Merge from upstream up to 5f1b04e86e79938c8158055a777280a649f95510

commit 01ca2186ea028b2549de509b51726aa08519fce0
Author: Christian Toutant <ctoutant@matrox.com>
Date:   Tue Sep 20 13:07:16 2011 -0400

    Reset tagfifo for renesas.
    
    For renesas, we need to reset tagfifo after a mode switch.
    
    Signed-off-by: Christian Toutant <ctoutant@matrox.com>

diff --git a/src/mga_driver.c b/src/mga_driver.c
index b140013..58a1390 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -3282,6 +3282,28 @@ MGA_HAL(
 	    outb(0xfac, 0x02);
     }
 
+    /* Reset tagfifo*/ 
+	if (pMga->is_G200ER) 
+    {
+        CARD32 ulMemCtl = INREG(MGAREG_MEMCTL);
+        CARD8  ucSeq1;
+
+        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Reset tagfifo\n");
+        /* Screen off */
+    	OUTREG8(MGAREG_SEQ_INDEX, 0x01);	/* Select SEQ1 */
+	    ucSeq1 = INREG8(MGAREG_SEQ_DATA) | 0x20;
+    	OUTREG8(MGAREG_SEQ_DATA, ucSeq1);
+
+        /* Reset tagfifo */
+        OUTREG(MGAREG_MEMCTL, ulMemCtl | 0x002000000);
+        usleep(1000); /* wait 1ms */
+        OUTREG(MGAREG_MEMCTL, ulMemCtl & ~0x002000000);
+
+        /* Screen on */
+    	OUTREG8(MGAREG_SEQ_DATA, ucSeq1 & ~0x20);
+
+    }
+
     /* 
      This function optimize the Priority Request control
      Higher HiPriLvl will reduce drawing performance
diff --git a/src/mga_reg.h b/src/mga_reg.h
index 5a37db6..ae0fe8c 100644
--- a/src/mga_reg.h
+++ b/src/mga_reg.h
@@ -119,6 +119,9 @@
 #define MGAREG_WACCEPTSEQ       0x1dd4
 #define MGAREG_WMISC            0x1e70
 
+
+#define MGAREG_MEMCTL           0x2E08
+
 /* OPMODE register additives */
 
 #define MGAOPM_DMA_GENERAL	(0x00 << 2)

commit c083bf0a66bef9a4345847f39be5fb895c211f79
Author: Christian Toutant <ctoutant@matrox.com>
Date:   Wed Aug 3 09:45:13 2011 -0400

    Added support for G200SE Pilot3
    
    Optimize use of bandwidth and increase maximum resolution to 1920x1200
    
    Signed-off-by: Christian Toutant <ctoutant@matrox.com>

diff --git a/src/mga_driver.c b/src/mga_driver.c
index 7232c73..b140013 100644
--- a/src/mga_driver.c
+++ b/src/mga_driver.c
@@ -3282,15 +3282,71 @@ MGA_HAL(
 	    outb(0xfac, 0x02);
     }
 
-    MGA_NOT_HAL(
-	if (pMga->is_G200SE) {
+    /* 
+     This function optimize the Priority Request control
+     Higher HiPriLvl will reduce drawing performance
+     We need to give enough bandwith to crtc to avoid visual artifact
+    */
+	if (pMga->is_G200SE) 
+    {
+        if (pMga->reg_1e24 >= 0x02)
+        {
+            /* Calulate CRTC Priority value */
+            CARD8  ucHiPriLvl;
+            CARD32 ulBitsPerPixel;
+            CARD32 ulMemoryBandwidth;
+
+            /* uiBitsPerPixel can only be 8,16 or32 */
+            if (pScrn->bitsPerPixel > 16)
+            {
+                ulBitsPerPixel = 32;
+            }
+            else if (pScrn->bitsPerPixel >  8) 
+            {
+                ulBitsPerPixel = 16;
+            }
+            else 
+            {
+                ulBitsPerPixel = 8;
+            }
+
+            
+            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);
-	    if (pMga->reg_1e24 >= 0x01)
-		OUTREG8(0x1FDF, 0x03);
-	    else 
-		OUTREG8(0x1FDF, 0x14);
+		    OUTREG8(0x1FDF, ucHiPriLvl);
+
+            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Clock           == %d\n",   mode->Clock);
+            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "BitsPerPixel    == %d\n",   pScrn->bitsPerPixel);
+            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "MemoryBandwidth == %d\n",   ulMemoryBandwidth);
+            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HiPriLvl        == %02X\n", ucHiPriLvl);
         }
-    );
+        else
+        {
+            MGA_NOT_HAL(
+                xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Clock           == %d\n",   mode->Clock);
+                xf86DrvMsg(pScrn->scrnIndex, X_INFO, "BitsPerPixel    == %d\n",   pScrn->bitsPerPixel);
+                OUTREG8(0x1FDE, 0x06);
+	            if (pMga->reg_1e24 >= 0x01)
+                {
+		            OUTREG8(0x1FDF, 0x03);
+                    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HiPriLvl        == 03\n");
+                }
+	            else 
+                {
+		            OUTREG8(0x1FDF, 0x14);
+                    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HiPriLvl        == 14h\n");
+                }
+            );
+        }
+    }
 
     pMga->CurrentLayout.mode = mode;
 
@@ -4354,13 +4410,23 @@ MGAValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
     MGAPtr pMga = MGAPTR(pScrn);
 
     if (pMga->Chipset == PCI_CHIP_MGAG200_SE_A_PCI) {
-	if (mode->HDisplay > 1600)
-	    return MODE_VIRTUAL_X;
-	if (mode->VDisplay > 1200)
-	    return MODE_VIRTUAL_Y;
-	if (pMga->reg_1e24 >= 0x01 &&
-	    xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 244)
-	    return MODE_BANDWIDTH;
+    	if (pMga->reg_1e24 == 0x01) {
+	        if (mode->HDisplay > 1600)
+	            return MODE_VIRTUAL_X;
+	        if (mode->VDisplay > 1200)
+	            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->is_G200WB){
         if (mode->Flags & V_DBLSCAN)
             return MODE_NO_DBLESCAN;

commit 43280e6521815582f219d42821d896093c9c0d5f
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jun 22 17:02:29 2011 -0400

    Don't include xf86Priv.h
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/src/mga_dri.c b/src/mga_dri.c
index 3fda623..14f342f 100644
--- a/src/mga_dri.c
+++ b/src/mga_dri.c
@@ -32,7 +32,6 @@
 
 #include "xf86.h"
 #include "xf86_OSproc.h"
-#include "xf86Priv.h"
 
 #include "xf86PciInfo.h"
 #include "xf86Pci.h"


Reply to: