[Openchrome-devel] xf86-video-openchrome: 2 commits - configure.ac src/via_display.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Sun Aug 21 00:00:32 UTC 2016


 configure.ac      |    2 +-
 src/via_display.c |   35 +++++++++++++++++++++++++++--------
 2 files changed, 28 insertions(+), 9 deletions(-)

New commits:
commit 4450edfe85ebacb2d03202a212164cfaf4121006
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Aug 20 16:58:56 2016 -0700

    Version bumped to 0.5.134
    
    This version adds IGA1 > 2048 horizontal resolution support for
    VX900 chipset.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index 0ad8361..94898dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.5.133],
+        [0.5.134],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit cd19542df40afcbd2f85de41b514355df72c5c36
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Aug 20 16:50:00 2016 -0700

    IGA1 > 2048 horizontal resolution support for VX900 chipset
    
    Patrick Chen of VIA Technologies in December 2011 suggested that
    VX900 chipset supports horizontal resolution > 2048, but no one
    bothered to implement it for OpenChrome UMS code until now.
    
    Suggested-by: Patrick Chen <PatrickChen at via.com.tw>
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 8a54f03..11ae1f2 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -1095,9 +1095,9 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
 
 
     /* Set IGA1 horizontal display end. */
-    /* Due to IGA1 horizontal display end being only 8 bits wide,
-     * the adjusted horizontal display end needs to be shifted by
-     * 3 bit positions to the right.
+    /* Due to IGA1 horizontal display end being only 8 bits
+     * or 9 bits (for VX900 chipset) wide, the adjusted horizontal
+     * display end needs to be shifted by 3 bit positions to the right.
      * In addition to that, this particular register requires the
      * value to be 1 less than the actual value being written. */
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -1107,11 +1107,17 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
     /* 3X5.01[7:0] - Horizontal Display End Bits [7:0] */
     hwp->writeCrtc(hwp, 0x01, temp & 0xFF);
 
+    if (pVia->Chipset == VIA_VX900) {
+        /* 3X5.45[1] - Horizontal Display End Bit [8] */
+        ViaCrtcMask(hwp, 0x45, temp >> 7, 0x02);
+    }
+
 
     /* Set IGA1 horizontal blank start. */
-    /* Due to IGA1 horizontal blank start being only 8 bits wide,
-     * the adjusted horizontal blank start needs to be shifted by
-     * 3 bit positions to the right. */
+    /* Due to IGA1 horizontal blank start being only 8 bits or
+     * 9 bits (for VX900 chipset) wide, the adjusted horizontal
+     * blank start needs to be shifted by 3 bit positions to the
+     * right. */
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "IGA1 CrtcHBlankStart: %d\n", mode->CrtcHBlankStart));
     temp = mode->CrtcHBlankStart >> 3;
@@ -1119,6 +1125,11 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
     /* 3X5.02[7:0] - Horizontal Blanking Start Bits [7:0] */
      hwp->writeCrtc(hwp, 0x02, temp & 0xFF);
 
+     if (pVia->Chipset == VIA_VX900) {
+         /* 3X5.45[2] - Horizontal Blanking Start Bit [8] */
+         ViaCrtcMask(hwp, 0x45, temp >> 6, 0x04);
+     }
+
 
     /* Set IGA1 horizontal blank end. */
     /* After shifting horizontal blank end by 3 bit positions to the
@@ -1317,6 +1328,8 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
 static ModeStatus
 viaIGA1ModeValid(ScrnInfoPtr pScrn, DisplayModePtr mode)
 {
+    VIAPtr pVia = VIAPTR(pScrn);
+
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered viaIGA1ModeValid.\n"));
 
@@ -1333,10 +1346,16 @@ viaIGA1ModeValid(ScrnInfoPtr pScrn, DisplayModePtr mode)
     if (mode->CrtcHTotal > (4096 + ((1 << 3) * (5 - 1))))
         return MODE_BAD_HVALUE;
 
-    if (mode->CrtcHDisplay > 2048)
+    if (((pVia->Chipset != VIA_VX900)
+            && (mode->CrtcHDisplay > 2048))
+        || ((pVia->Chipset == VIA_VX900)
+            && (mode->CrtcHDisplay > 4096)))
         return MODE_BAD_HVALUE;
 
-    if (mode->CrtcHBlankStart > 2048)
+    if (((pVia->Chipset != VIA_VX900)
+            && (mode->CrtcHBlankStart > 2048))
+        || ((pVia->Chipset == VIA_VX900)
+            && (mode->CrtcHBlankStart > 4096)))
         return MODE_BAD_HVALUE;
 
     if ((mode->CrtcHBlankEnd - mode->CrtcHBlankStart) > 1025)


More information about the Openchrome-devel mailing list