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

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Sep 17 22:41:14 UTC 2016


 configure.ac      |    2 +-
 src/via_analog.c  |   39 +++++++++++++++++++++++++++++++++++++--
 src/via_display.c |   17 -----------------
 3 files changed, 38 insertions(+), 20 deletions(-)

New commits:
commit e6c5030252a85205fe0f0f3ad4c757eacd711aac
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Sep 17 15:40:09 2016 -0700

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

diff --git a/configure.ac b/configure.ac
index 3e62398..6f58d60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.5.156],
+        [0.5.157],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit c6a65f409044bbb5c809e762b3b5f8ea443ad056
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Sep 17 15:39:06 2016 -0700

    Moving the code that sets sync polarity of analog VGA
    
    Rather than setting the sync polarity of analog VGA when
    initializing IGA1, it was moved to where analog VGA is
    specifically initialized.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_analog.c b/src/via_analog.c
index 1608d0f..185d31b 100644
--- a/src/via_analog.c
+++ b/src/via_analog.c
@@ -132,6 +132,41 @@ viaAnalogInit(ScrnInfoPtr pScrn)
                         "Exiting viaAnalogInit.\n"));
 }
 
+/*
+ * Sets the polarity of horizontal synchronization and vertical
+ * synchronization.
+ */
+static void
+viaAnalogSetSyncPolarity(ScrnInfoPtr pScrn, DisplayModePtr mode)
+{
+    vgaHWPtr hwp = VGAHWPTR(pScrn);
+    CARD8 miscRegister;
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Entered viaAnalogSetSyncPolarity.\n"));
+
+/* Set certain bits of miscellaneous output register
+ * meant for IGA1. */
+    miscRegister = hwp->readMiscOut(hwp);
+    if (mode->Flags & V_NHSYNC) {
+        miscRegister |= 0x40;
+    } else {
+        miscRegister &= (~0x40);
+    }
+
+    if (mode->Flags & V_NVSYNC) {
+        miscRegister |= 0x80;
+    } else {
+        miscRegister &= (~0x80);
+    }
+
+    hwp->writeMiscOut(hwp, miscRegister);
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Exiting viaAnalogSetSyncPolarity.\n"));
+}
+
+
 static void
 via_analog_create_resources(xf86OutputPtr output)
 {
@@ -211,9 +246,9 @@ via_analog_mode_set(xf86OutputPtr output, DisplayModePtr mode,
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered via_analog_mode_set.\n"));
 
-    viaAnalogInit(pScrn);
-
     if (output->crtc) {
+        viaAnalogInit(pScrn);
+        viaAnalogSetSyncPolarity(pScrn, adjusted_mode);
         viaAnalogSource(pScrn, iga->index ? 0x01 : 0x00);
     }
 
diff --git a/src/via_display.c b/src/via_display.c
index 0d4423b..0bab9a4 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -1137,23 +1137,6 @@ viaIGA1SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                 "IGA1 Requested Screen Mode: %s\n", mode->name);
 
-    /* Set certain bits of miscellaneous output register
-     * meant for IGA1. */
-    temp = hwp->readMiscOut(hwp);
-    if (mode->Flags & V_NHSYNC) {
-        temp |= 0x40;
-    } else {
-        temp &= (~0x40);
-    }
-
-    if (mode->Flags & V_NVSYNC) {
-        temp |= 0x80;
-    } else {
-        temp &= (~0x80);
-    }
-
-    hwp->writeMiscOut(hwp, temp);
-
     if (mode->Flags & V_CLKDIV2) {
         ViaSeqMask(hwp, 0x01, 0x08, 0x08);
     } else {


More information about the Openchrome-devel mailing list