[Openchrome-devel] xf86-video-openchrome: 4 commits - configure.ac src/via_driver.c src/via_fp.c src/via_tmds.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Tue Feb 28 00:07:52 UTC 2017


 configure.ac     |    2 -
 src/via_driver.c |    1 
 src/via_fp.c     |    2 -
 src/via_tmds.c   |   57 +++++++++++++++++--------------------------------------
 4 files changed, 19 insertions(+), 43 deletions(-)

New commits:
commit 8c819edb95880c6726f9bc80cae6ac3b3bd0f6a8
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Feb 27 15:59:10 2017 -0800

    Version bumped to 0.5.900 (Version 0.6 RC1)
    
    This is the first release candidate of OpenChrome DDX Version 0.6. It
    will be nice if people who own VIA Technologies Chrome IGP based
    hardware can dust off their long unused hardware, and let the
    developer know how it performs. If there are no serious problems, this
    version will be the Version 0.6 official release version.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index 65cbf12..38e5967 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.5.187],
+        [0.5.900],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit f50e55fc7e70a3bc1ed688bb7c1746de67da203d
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Feb 27 15:57:01 2017 -0800

    Faking integrated TMDS (DVI) transmitter DVI detection
    
    Probably not a good idea, but do not have a choice for now.
    Integrated TMDS transmitter based DVI's detection pin does not really
    work, so this is how detection needs to be faked. This issue does not
    affect those where the DVI is coming from an external TMDS transmitter
    like SiI 164 or VT1632(A).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_tmds.c b/src/via_tmds.c
index 2c373b2..9543665 100644
--- a/src/via_tmds.c
+++ b/src/via_tmds.c
@@ -198,21 +198,8 @@ viaTMDSSense(ScrnInfoPtr pScrn)
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered viaTMDSSense.\n"));
 
-    if (pVia->Chipset == VIA_CX700) {
-        /* Detect the presence of DVI. */
-        /* 3C5.1A[4] - DVI Sense
-         *             0: No connect
-         *             1: Connected */
-        tmdsReceiverDetected = (hwp->readSeq(hwp, 0x1A) >> 4) & 0x01;
-    } else if ((pVia->Chipset == VIA_VX800)
-                || (pVia->Chipset == VIA_VX855)
-                || (pVia->Chipset == VIA_VX900)) {
-        /* Detect the presence of DVI. */
-        /* 3C5.3E[5] - Integrated DVI Sense
-         *             0: No connect
-         *             1: Connected */
-        tmdsReceiverDetected = (hwp->readSeq(hwp, 0x3E) >> 5) & 0x01;
-    }
+    /* For now, faking DVI detection.*/
+    tmdsReceiverDetected = 0x01;
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                 "Integrated TMDS transmitter %s a TMDS receiver.\n",
commit d2b60273cc69f382f9616718c61ca36a23f4210b
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Feb 27 15:47:54 2017 -0800

    Minor reduction of unused variables
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.c b/src/via_driver.c
index c219181..439313c 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -627,7 +627,6 @@ static Bool
 VIASetupDefaultOptions(ScrnInfoPtr pScrn)
 {
     VIAPtr pVia = VIAPTR(pScrn);
-    VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
 
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VIASetupDefaultOptions - Setting up default chipset options.\n"));
 
diff --git a/src/via_fp.c b/src/via_fp.c
index ee69fc1..dea6ec9 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -161,7 +161,6 @@ static void
 viaLVDS1SetFormat(ScrnInfoPtr pScrn, CARD8 format)
 {
     vgaHWPtr hwp = VGAHWPTR(pScrn);
-    VIAPtr pVia = VIAPTR(pScrn);
 
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered viaLVDS1SetFormat.\n"));
@@ -258,7 +257,6 @@ static void
 viaLVDS2SetFormat(ScrnInfoPtr pScrn, CARD8 format)
 {
     vgaHWPtr hwp = VGAHWPTR(pScrn);
-    VIAPtr pVia = VIAPTR(pScrn);
 
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered viaLVDS2SetFormat.\n"));
diff --git a/src/via_tmds.c b/src/via_tmds.c
index 4d5b154..2c373b2 100644
--- a/src/via_tmds.c
+++ b/src/via_tmds.c
@@ -1094,7 +1094,7 @@ viaTMDSInit(ScrnInfoPtr pScrn)
     vgaHWPtr hwp = VGAHWPTR(pScrn);
     VIAPtr pVia = VIAPTR(pScrn);
     VIATMDSRecPtr pVIATMDSRec = NULL;
-    CARD8 sr13, sr5a, cr3e;
+    CARD8 sr13, sr5a;
     Bool status = FALSE;
     char outputNameBuffer[32];
 
commit 770d5c08bdbd8d115f16f29d23ed4bf9390b5328
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Feb 27 15:34:24 2017 -0800

    Improving DVI connector availability
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_tmds.c b/src/via_tmds.c
index 3e0267d..4d5b154 100644
--- a/src/via_tmds.c
+++ b/src/via_tmds.c
@@ -1103,6 +1103,10 @@ viaTMDSInit(ScrnInfoPtr pScrn)
 
     sr5a = hwp->readSeq(hwp, 0x5A);
     ViaSeqMask(hwp, 0x5A, sr5a | 0x01, 0x01);
+    sr13 = hwp->readSeq(hwp, 0x13);
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "SR13: 0x%02X\n", sr13));
+    hwp->writeSeq(hwp, 0x5A, sr5a);
 
     /* 3C5.13[7:6] - Integrated LVDS / DVI Mode Select
      *               (DVP1D15-14 pin strapping)
@@ -1110,32 +1114,20 @@ viaTMDSInit(ScrnInfoPtr pScrn)
      *               01: DVI + LVDS2
      *               10: Dual LVDS Channel (High Resolution Panel)
      *               11: One DVI only (decrease the clock jitter) */
-    sr13 = hwp->readSeq(hwp, 0x13);
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "SR13: 0x%02X\n", sr13));
-    hwp->writeSeq(hwp, 0x5A, sr5a);
-    sr13 &= 0xC0;
-    if ((sr13 == 0x40) || (sr13 == 0xC0)) {
+    /* Check for DVI presence using pin strappings.
+     * VIA Technologies NanoBook reference design based products
+     * have their pin strappings set to a wrong setting to communicate
+     * the presence of DVI, so it requires special handling here. */
+    if ((((~(sr13 & 0x80)) && (sr13 & 0x40))
+         || ((sr13 & 0x80) && (sr13 & 0x40)))
+       || (pVia->isVIANanoBook)) {
+
         xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                     "Integrated TMDS transmitter found via pin strapping.\n");
     } else {
-        /* 3X5.3E[5] supposedly signals the presence of
-         * a DVI connector coming from an integrated TMDS transmitter.
-         * This check is done if the pin strapping does not indicate
-         * the presence of a DVI connector. Note that 3X5.3E is set by
-         * VIA Technologies VGA BIOS. */
-        cr3e = hwp->readCrtc(hwp, 0x3E);
-        DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "CR3E: 0x%02X\n", cr3e));
-        if (cr3e & 0x20) {
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Integrated TMDS transmitter found via "
-                        "VIA Technologies VGA BIOS scratch pad register.\n");
-        } else {
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Integrated TMDS transmitter not found.\n");
-            goto exit;
-        }
+        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                    "Integrated TMDS transmitter not found.\n");
+        goto exit;
     }
 
     pVIATMDSRec = xnfcalloc(1, sizeof(VIATMDSRec));


More information about the Openchrome-devel mailing list