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

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Jun 3 04:03:01 UTC 2017


 configure.ac      |    2 
 src/via_display.c |   18 ----
 src/via_outputs.c |  238 ------------------------------------------------------
 src/via_ums.h     |    1 
 4 files changed, 1 insertion(+), 258 deletions(-)

New commits:
commit 3c995eb1f5ea5eba307971d7a3bd6b22c4fe90b4
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 2 20:59:47 2017 -0700

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

diff --git a/configure.ac b/configure.ac
index 97d0f76..90d4eac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.6.125],
+        [0.6.126],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 46b0f46eb420d2e9e924157b3f4f4143029fec70
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 2 20:55:30 2017 -0700

    Not disabling IGA1 and IGA2 in prepare, commit, and DPMS callbacks
    
    Disabling them cause varying results depending on the chipset, so the
    safest thing to do is not disturbing IGA1 and IGA2.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index dd3a6fb..95ce340 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -3600,10 +3600,8 @@ iga1_crtc_dpms(xf86CrtcPtr crtc, int mode)
     case DPMSModeOn:
     case DPMSModeStandby:
     case DPMSModeSuspend:
-        viaIGA1SetDisplayOutput(pScrn, TRUE);
         break;
     case DPMSModeOff:
-        viaIGA1SetDisplayOutput(pScrn, FALSE);
         break;
     default:
         break;
@@ -3699,9 +3697,6 @@ iga1_crtc_prepare(xf86CrtcPtr crtc)
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered iga1_crtc_prepare.\n"));
 
-    /* Turn off IGA1. */
-    viaIGA1SetDisplayOutput(pScrn, FALSE);
-
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Exiting iga1_crtc_prepare.\n"));
 }
@@ -3791,9 +3786,6 @@ iga1_crtc_commit(xf86CrtcPtr crtc)
     if (crtc->scrn->pScreen != NULL && pVia->drmmode.hwcursor)
         xf86_reload_cursors(crtc->scrn->pScreen);
 
-    /* Turn on IGA1. */
-    viaIGA1SetDisplayOutput(pScrn, TRUE);
-
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Exiting iga1_crtc_commit.\n"));
 }
@@ -3997,15 +3989,11 @@ iga2_crtc_dpms(xf86CrtcPtr crtc, int mode)
 
     switch (mode) {
     case DPMSModeOn:
-        viaIGA2DisplayOutput(pScrn, TRUE);
         break;
-
     case DPMSModeStandby:
     case DPMSModeSuspend:
     case DPMSModeOff:
-        viaIGA2DisplayOutput(pScrn, FALSE);
         break;
-
     default:
         xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid DPMS mode: %d\n",
                     mode);
@@ -4115,9 +4103,6 @@ iga2_crtc_prepare(xf86CrtcPtr crtc)
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Entered iga2_crtc_prepare.\n"));
 
-    /* Turn off IGA2. */
-    viaIGA2DisplayOutput(pScrn, FALSE);
-
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Exiting iga2_crtc_prepare.\n"));
 }
@@ -4197,9 +4182,6 @@ iga2_crtc_commit(xf86CrtcPtr crtc)
     if (crtc->scrn->pScreen != NULL && pVia->drmmode.hwcursor)
         xf86_reload_cursors(crtc->scrn->pScreen);
 
-    /* Turn on IGA2. */
-    viaIGA2DisplayOutput(pScrn, TRUE);
-
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Exiting iga2_crtc_commit.\n"));
 }
commit 97a82fbd6586ec4286cdc68fcd181decce294a81
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue May 30 21:29:39 2017 -0700

    Removing viaProbePinStrapping
    
    This function has outlived its usefulness.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_outputs.c b/src/via_outputs.c
index b310338..8f918d9 100644
--- a/src/via_outputs.c
+++ b/src/via_outputs.c
@@ -411,240 +411,6 @@ viaDFPLowEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState)
                         "Exiting viaDFPLowEnableIOPads.\n"));
 }
 
-/*
- * Reads off the VIA Technologies IGP pin strapping for
- * display detection purposes.
- */
-void
-viaProbePinStrapping(ScrnInfoPtr pScrn)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-    VIAPtr pVia = VIAPTR(pScrn);
-    CARD8 sr12, sr13, sr5a;
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Entered viaProbePinStrapping.\n"));
-
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                "Probing VIA Technologies IGP pin strapping . . .\n");
-
-    if ((pVia->Chipset == VIA_CX700)
-        || (pVia->Chipset == VIA_VX800)
-        || (pVia->Chipset == VIA_VX855)
-        || (pVia->Chipset == VIA_VX900)) {
-
-        sr5a = hwp->readSeq(hwp, 0x5A);
-        DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "SR5A: 0x%02X\n", sr5a));
-        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                    "Setting 3C5.5A[0] to 0.\n");
-        ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01);
-    }
-
-    sr12 = hwp->readSeq(hwp, 0x12);
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "SR12: 0x%02X\n", sr12));
-    sr13 = hwp->readSeq(hwp, 0x13);
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "SR13: 0x%02X\n", sr13));
-
-    switch (pVia->Chipset) {
-    case VIA_CLE266:
-
-        /* 3C5.12[4] - FPD17 pin strapping
-         *             0: TMDS transmitter (DVI) / capture device
-         *             1: Flat panel */
-        if (sr12 & 0x10) {
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "A flat panel is connected to "
-                        "flat panel interface.\n");
-
-            /* 3C5.12[3:0] - FPD16-13 pin strapping
-             *               0 ~ 15: Flat panel code defined
-             *                       by VIA Technologies */
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Detected Flat Panel Type from "
-                        "Strapping Pins: %d\n", sr12 & 0x0F);
-        } else {
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "A TMDS transmitter (DVI) / capture device is "
-                        "connected to DIP0.\n");
-        }
-
-        /* 3C5.12[5] - FPD18 pin strapping
-         *             0: TMDS transmitter (DVI)
-         *             1: TV encoder */
-        if (sr12 & 0x20) {
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "A TV encoder is connected to "
-                        "DIP0.\n");
-
-            /* 3C5.13[4:3] - FPD21-20 pin strapping
-             *               00: PAL
-             *               01: NTSC
-             *               10: PAL-N
-             *               11: PAL-NC */
-            if ((!(sr13 & 0x08)) && (sr13 & 0x04)) {
-                xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "NTSC for the TV encoder.\n");
-            } else {
-                if (!(sr13 & 0x08)) {
-                    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                                "PAL for the TV encoder.\n");
-                } else {
-                    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                                "PAL%s for the TV encoder.\n",
-                                (sr13 & 0x04) ? "-NC" : "-N");
-                }
-            }
-
-            /* 3C5.12[6] - FPD19 pin strapping
-             *             0: 525 lines (NTSC)
-             *             1: 625 lines (PAL) */
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "%s lines for the TV encoder.\n",
-                        (sr12 & 0x40) ? "625" : "525");
-        } else {
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "A TMDS transmitter (DVI) is connected to "
-                        "DIP0.\n");
-        }
-
-        break;
-
-    case VIA_KM400:
-    case VIA_K8M800:
-    case VIA_PM800:
-    case VIA_P4M800PRO:
-
-        /* 3C5.12[6] - DVP0D6 pin strapping
-         *             0: Disable DVP0 (Digital Video Port 0) for
-         *                DVI or TV out use
-         *             1: Enable DVP0 (Digital Video Port 0) for
-         *                DVI or TV out use */
-        if (sr12 & 0x40) {
-
-            /* 3C5.12[5] - DVP0D5 pin strapping
-             *             0: TMDS transmitter (DVI)
-             *             1: TV encoder */
-            if (sr12 & 0x20) {
-                xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "A TV encoder is detected on "
-                            "DVP0 (Digital Video Port 0).\n");
-            } else {
-                xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "A TMDS transmitter (DVI) is detected on "
-                            "DVP0 (Digital Video Port 0).\n");
-            }
-        }
-
-
-        /* 3C5.13[3] - DVP0D8 pin strapping
-         *             0: AGP pins are used for AGP
-         *             1: AGP pins are used by FPDP
-         *             (Flat Panel Display Port) */
-        if (sr13 & 0x08) {
-
-            /* 3C5.12[4] - DVP0D4 pin strapping
-             *             0: Dual 12-bit FPDP (Flat Panel Display Port)
-             *             1: 24-bit FPDP (Flat Panel Display Port) */
-            if (sr12 & 0x10) {
-                xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "24-bit FPDP (Flat Panel Display Port) "
-                            "detected.\n");
-
-                /* 3C5.12[3:0] - DVP0D3-0 pin strapping
-                 *               0 ~ 15: Flat panel code defined
-                 *                       by VIA Technologies */
-                xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "Detected Flat Panel Type from "
-                            "Strapping Pins: %d\n", sr12 & 0x0F);
-            } else {
-
-                /* 3C5.12[6] - DVP0D6 pin strapping
-                 *             0: Disable DVP0 (Digital Video Port 0) for
-                 *                DVI or TV out use
-                 *             1: Enable DVP0 (Digital Video Port 0) for
-                 *                DVI or TV out use
-                 * 3C5.12[5] - DVP0D5 pin strapping
-                 *             0: TMDS transmitter (DVI)
-                 *             1: TV encoder */
-                if ((!(sr12 & 0x40)) && (!(sr12 & 0x20))) {
-                    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                                "A TV encoder is connected to "
-                                "FPDP (Flat Panel Display Port).\n");
-                } else {
-                    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                                "Dual 12-bit FPDP (Flat Panel Display Port) "
-                                "detected.\n");
-
-                    /* 3C5.12[3:0] - DVP0D3-0 pin strapping
-                     *               0 ~ 15: Flat panel code defined
-                     *                       by VIA Technologies */
-                    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                                "Detected Flat Panel Type from "
-                                "Strapping Pins: %d\n", sr12 & 0x0F);
-                }
-            }
-        }
-
-        break;
-
-    default:
-        break;
-    }
-
-    if ((pVia->Chipset == VIA_CX700)
-        || (pVia->Chipset == VIA_VX800)
-        || (pVia->Chipset == VIA_VX855)
-        || (pVia->Chipset == VIA_VX900)) {
-
-        xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                    "Setting 3C5.5A[0] to 1.\n");
-        ViaSeqMask(hwp, 0x5A, sr5a | 0x01, 0x01);
-
-        sr12 = hwp->readSeq(hwp, 0x12);
-        DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "SR12: 0x%02X\n", sr12));
-        sr13 = hwp->readSeq(hwp, 0x13);
-        DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                            "SR13: 0x%02X\n", sr13));
-
-        /* 3C5.13[7:6] - Integrated LVDS / DVI Mode Select
-         *               (DVP1D15-14 pin strapping)
-         *               00: LVDS1 + LVDS2
-         *               01: DVI + LVDS2
-         *               10: Dual LVDS Channel (High Resolution Panel)
-         *               11: One DVI only (decrease the clock jitter) */
-        switch (sr13 & 0xC0) {
-        case 0x00:
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "LVDS1 + LVDS2 detected.\n");
-            break;
-        case 0x40:
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Single Link DVI + LVDS2 detected.\n");
-            break;
-        case 0x80:
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Dual Channel LVDS detected.\n");
-            break;
-        case 0xC0:
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Single Link DVI detected.\n");
-            break;
-        default:
-            break;
-        }
-
-        hwp->writeSeq(hwp, 0x5A, sr5a);
-
-    }
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Exiting viaProbePinStrapping.\n"));
-}
-
 void
 viaInitDisplay(ScrnInfoPtr pScrn)
 {
@@ -663,10 +429,6 @@ viaInitDisplay(ScrnInfoPtr pScrn)
     /* Initialize the number of FP connectors. */
     pVIADisplay->numberFP = 0;
 
-    /* Read off the VIA Technologies IGP pin strapping for
-       display detection purposes. */
-    viaProbePinStrapping(pScrn);
-
     viaExtTMDSProbe(pScrn);
     viaTMDSProbe(pScrn);
 
diff --git a/src/via_ums.h b/src/via_ums.h
index f90f843..894c3ff 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -641,7 +641,6 @@ void viaDFPLowEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState);
 void viaInitDisplay(ScrnInfoPtr pScrn);
 CARD32 ViaGetMemoryBandwidth(ScrnInfoPtr pScrn);
 CARD32 ViaModeDotClockTranslate(ScrnInfoPtr pScrn, DisplayModePtr mode);
-void viaProbePinStrapping(ScrnInfoPtr pScrn);
 void ViaSetPrimaryDotclock(ScrnInfoPtr pScrn, CARD32 clock);
 void ViaSetSecondaryDotclock(ScrnInfoPtr pScrn, CARD32 clock);
 void ViaSetUseExternalClock(vgaHWPtr hwp);


More information about the Openchrome-devel mailing list