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

Kevin Brace kevinbrace at kemper.freedesktop.org
Thu Jun 2 11:34:30 UTC 2016


 configure.ac      |    2 +-
 src/via_display.c |   40 ++++++++++++++++++++++++++--------------
 2 files changed, 27 insertions(+), 15 deletions(-)

New commits:
commit d22b2dd0bf6317bee4afb899363632cf6bb3aeb6
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Jun 2 04:27:23 2016 -0700

    Version bumped to 0.4.159
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index 9673ce6..2162c77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.4.158],
+        [0.4.159],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit ec8776a3ae3ba1dfe355d33fe6c919b05e36e895
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Jun 2 04:25:39 2016 -0700

    Cleanup of the code that sets IGA1 horizontal display fetch count
    
    viaIGA1SetDisplayRegister function contains the code in question.
    This function is located inside via_display.c.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index c9f78fc..3f6cac7 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -889,6 +889,23 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
     ViaCrtcMask(hwp, 0x35, temp >> 3, 0xE0);
 
 
+    /* Set IGA1 alignment. */
+    temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 3;
+
+    /* Make sure that this is 32-byte aligned. */
+    if (temp & 0x03) {
+        temp += 0x03;
+        temp &= ~0x03;
+    }
+
+    /* 3C5.1C[7:0] - Primary Display Horizontal Display
+     *               Fetch Count Data Bits [7:0] */
+    hwp->writeSeq(hwp, 0x1C, (temp >> 1) & 0xFF);
+
+    /* 3C5.1D[1:0] - Primary Display Horizontal Display
+     *               Fetch Count Data Bits [9:8] */
+    ViaSeqMask(hwp, 0x1D, temp >> 9, 0x03);
+
     /* line compare: We are not doing splitscreen so 0x3FFF */
     hwp->writeCrtc(hwp, 0x18, 0xFF);
     ViaCrtcMask(hwp, 0x07, 0x10, 0x10);
@@ -900,17 +917,6 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
     ViaCrtcMask(hwp, 0x09, 0x00, 0x1F);
     hwp->writeCrtc(hwp, 0x14, 0x00);
 
-    /* fetch count */
-    temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 3;
-    /* Make sure that this is 32-byte aligned. */
-    if (temp & 0x03) {
-        temp += 0x03;
-        temp &= ~0x03;
-    }
-
-    hwp->writeSeq(hwp, 0x1C, ((temp >> 1)+1) & 0xFF);
-    ViaSeqMask(hwp, 0x1D, temp >> 9, 0x03);
-
     switch (pVia->Chipset) {
         case VIA_CX700:
         case VIA_K8M890:
commit 71ea18dc52fb63b4f6709403a487acf8c70d399e
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Jun 2 03:41:36 2016 -0700

    Cleanup of the code that sets IGA1 horizontal offset
    
    viaIGA1SetDisplayRegister function contains the code in question.
    This function is located inside via_display.c.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index b19c0cd..c9f78fc 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -873,6 +873,22 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
     ViaCrtcMask(hwp, 0x11, temp & 0x0F, 0x0F);
 
 
+    /* Set IGA1 horizontal offset adjustment. */
+    temp = (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)) >> 3;
+
+    /* Make sure that this is 32-byte aligned. */
+    if (temp & 0x03) {
+        temp += 0x03;
+        temp &= ~0x03;
+    }
+
+    /* 3X5.13[7:0] - Primary Display Horizontal Offset Bits [7:0] */
+    hwp->writeCrtc(hwp, 0x13, temp & 0xFF);
+
+    /* 3X5.35[7:5] - Primary Display Horizontal Offset Bits [10:8] */
+    ViaCrtcMask(hwp, 0x35, temp >> 3, 0xE0);
+
+
     /* line compare: We are not doing splitscreen so 0x3FFF */
     hwp->writeCrtc(hwp, 0x18, 0xFF);
     ViaCrtcMask(hwp, 0x07, 0x10, 0x10);
@@ -884,16 +900,6 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
     ViaCrtcMask(hwp, 0x09, 0x00, 0x1F);
     hwp->writeCrtc(hwp, 0x14, 0x00);
 
-    /* offset */
-    temp = (pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)) >> 3;
-    /* Make sure that this is 32-byte aligned. */
-    if (temp & 0x03) {
-        temp += 0x03;
-        temp &= ~0x03;
-    }
-    hwp->writeCrtc(hwp, 0x13, temp & 0xFF);
-    ViaCrtcMask(hwp, 0x35, temp >> 3, 0xE0);
-
     /* fetch count */
     temp = (mode->CrtcHDisplay * (pScrn->bitsPerPixel >> 3)) >> 3;
     /* Make sure that this is 32-byte aligned. */


More information about the Openchrome-devel mailing list