[openchrome-devel] xf86-video-openchrome: 8 commits - configure.ac src/via_display.c src/via_driver.h src/via_ums.h

Kevin Brace kevinbrace at kemper.freedesktop.org
Wed Jun 20 01:02:40 UTC 2018


 configure.ac      |    2 -
 src/via_display.c |   55 +++++++++++++-----------------------------------------
 src/via_driver.h  |    7 ------
 src/via_ums.h     |   24 ++++++++++++++++++++++-
 4 files changed, 38 insertions(+), 50 deletions(-)

New commits:
commit 88391a2625d39fe444b1d48d6301dbe90e267743
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Jun 19 16:39:02 2018 -0700

    Version bumped to 0.6.176
    
    Fix for VGA display transmitting out of range signal when both VGA and
    HDMI are connected on ECS VX900-I and VIA VE-900 mainboards.
    
    Tested-by: P Touchman <ptouchman at gmail.com>
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/configure.ac b/configure.ac
index f733f69..fb3cf31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.6.175],
+        [0.6.176],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 752311098a96f46b54385165a41da5f3663ababc
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Jun 19 16:18:31 2018 -0700

    Turn off CR45[0] when VX900 chipset is in use
    
    Officially, CR45[0] is a reserved bit for VX900 chipset, but this bit
    set to 1 causes the display connected to VGA output of ECS VX900-I and
    VIA VE-900 mainboards to indicate receiving out of range signals and
    nothing will be displayed on the screen.
    
    Tested-by: P Touchman <ptouchman at gmail.com>
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 9607dcd..f18796b 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -744,6 +744,13 @@ viaIGAInitCommon(ScrnInfoPtr pScrn)
     temp = hwp->readCrtc(hwp, 0x3F);
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "CR3F: 0x%02X\n", temp));
+
+    if (pVia->Chipset == VIA_VX900) {
+        temp = hwp->readCrtc(hwp, 0x45);
+        DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                            "CR45: 0x%02X\n", temp));
+    }
+
     temp = hwp->readCrtc(hwp, 0x47);
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "CR47: 0x%02X\n", temp));
@@ -927,6 +934,10 @@ viaIGAInitCommon(ScrnInfoPtr pScrn)
      *               1: Enable */
     ViaCrtcMask(hwp, 0x36, 0x01, 0x01);
 
+    if (pVia->Chipset == VIA_VX900) {
+        ViaCrtcMask(hwp, 0x45, 0x00, 0x01);
+    }
+
     /* 3X5.3B through 3X5.3F are scratch pad registers. */
     ViaCrtcMask(hwp, 0x3B, pVIADisplay->originalCR3B, 0xFF);
     ViaCrtcMask(hwp, 0x3C, pVIADisplay->originalCR3C, 0xFF);
commit 640217271a4cfb3a6c84f8160b8dfe384584d6f7
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Jun 19 15:29:32 2018 -0700

    Disable display scaling when initializing display controllers
    
    On ECS VX900-I and VIA VE-900 mainboards, if VGA and HDMI are both
    connected, the video BIOS actives the display scaling engine normally
    meant for a laptop FP. This causes distortion of the VGA display, so
    display scaling will be turned off when initializing the display
    controllers.
    
    Tested-by: P Touchman <ptouchman at gmail.com>
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index d766db7..9607dcd 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -968,6 +968,9 @@ viaIGAInitCommon(ScrnInfoPtr pScrn)
         ViaCrtcMask(hwp, 0x6C, 0x00, 0x01);
     }
 
+    /* Disable display scaling. */
+    viaSetDisplayScaling(pScrn, FALSE);
+
     DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
                         "Exiting viaIGAInitCommon.\n"));
 }
commit 9b34e916d6a9f36c7b28e9cb09ae1c4ea4f4e583
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Jun 19 15:08:21 2018 -0700

    Add viaSetDisplayScaling inline function
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_ums.h b/src/via_ums.h
index 0357449..abdb32a 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -1533,6 +1533,24 @@ viaTMDSSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
                         (displaySource & 0x01) + 1));
 }
 
+/*
+ * Turn on / off display scaling engine.
+ */
+static inline void
+viaSetDisplayScaling(ScrnInfoPtr pScrn, Bool scalingState)
+{
+    /*
+     * 3X5.79[0] - LCD Scaling Enable
+     *             0: Disable
+     *             1: Enable
+     */
+    ViaCrtcMask(VGAHWPTR(pScrn), 0x79,
+                scalingState, BIT(0));
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Display Scaling: %s\n",
+                        scalingState ? "On" : "Off"));
+}
+
 
 /* via_ums.c */
 void viaUnmapMMIO(ScrnInfoPtr pScrn);
commit 77b4883dbb62d19ecc0da712a69d8376c5639a46
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Jun 16 12:38:40 2018 -0700

    Move I2C bus related extern declarations to via_ums.h
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.h b/src/via_driver.h
index 859302b..ecde134 100644
--- a/src/via_driver.h
+++ b/src/via_driver.h
@@ -463,11 +463,6 @@ int viaXvMCInitXv(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr XvAdapt);
 unsigned long viaXvMCPutImageSize(ScrnInfoPtr pScrn);
 #endif
 
-/* via_i2c.c */
-void ViaI2CInit(ScrnInfoPtr pScrn);
-Bool xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr,
-                        I2CByte value, I2CByte mask);
-
 #ifdef HAVE_DRI
 Bool VIADRI1ScreenInit(ScreenPtr pScreen);
 void VIADRICloseScreen(ScreenPtr pScreen);
diff --git a/src/via_ums.h b/src/via_ums.h
index 698575b..0357449 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -1542,6 +1542,11 @@ Bool umsCreate(ScrnInfoPtr pScrn);
 Bool umsPreInit(ScrnInfoPtr pScrn);
 Bool umsCrtcInit(ScrnInfoPtr pScrn);
 
+/* via_i2c.c */
+void ViaI2CInit(ScrnInfoPtr pScrn);
+Bool xf86I2CMaskByte(I2CDevPtr d, I2CByte subaddr,
+                        I2CByte value, I2CByte mask);
+
 /* via_output.c */
 void viaInitDisplay(ScrnInfoPtr pScrn);
 CARD32 ViaGetMemoryBandwidth(ScrnInfoPtr pScrn);
commit 0fee44d976a88c17425e58a5bcea2ef30a7fc573
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Jun 16 12:33:10 2018 -0700

    Deprecate ViaDisplaySetStreamOnCRT extern reference
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_driver.h b/src/via_driver.h
index 92f5acb..859302b 100644
--- a/src/via_driver.h
+++ b/src/via_driver.h
@@ -484,6 +484,5 @@ int viaOffScreenLinear(struct buffer_object *obj, ScrnInfoPtr pScrn, unsigned lo
 void viaShowCursor(ScrnInfoPtr pScrn);
 void viaHideCursor(ScrnInfoPtr pScrn);
 Bool viaHWCursorInit(ScreenPtr pScreen);
-void ViaDisplaySetStreamOnCRT(ScrnInfoPtr pScrn, Bool primary);
 
 #endif /* _VIA_DRIVER_H_ */
commit 11c669e77b307fbd09257d360fb762d16eb15c40
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Jun 16 12:24:09 2018 -0700

    Deprecate viaDisplayInit
    
    This function is no longer used.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 7e733ac..d766db7 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -509,31 +509,6 @@ viaIGA2SetHIDisplayLocation(ScrnInfoPtr pScrn,
     }
 }
 
-/*
- * Initial settings for displays.
- */
-void
-viaDisplayInit(ScrnInfoPtr pScrn)
-{
-    VIAPtr pVia = VIAPTR(pScrn);
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Entered viaDisplayInit.\n"));
-
-    ViaCrtcMask(hwp, 0x6A, 0x00, 0x3D);
-    hwp->writeCrtc(hwp, 0x6B, 0x00);
-    hwp->writeCrtc(hwp, 0x6C, 0x00);
-    hwp->writeCrtc(hwp, 0x79, 0x00);
-
-    /* (IGA1 Timing Plus 2, added in VT3259 A3 or later) */
-    if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400)
-        ViaCrtcMask(hwp, 0x47, 0x00, 0xC8);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Exiting viaDisplayInit.\n"));
-}
-
 void
 VIALoadRgbLut(ScrnInfoPtr pScrn, int start, int numColors, LOCO *colors)
 {
diff --git a/src/via_ums.h b/src/via_ums.h
index 14fb18e..698575b 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -1552,7 +1552,6 @@ void ViaSetUseExternalClock(vgaHWPtr hwp);
 
 /* via_display.c */
 void viaIGA2DisplayChannel(ScrnInfoPtr pScrn, Bool channelState);
-void viaDisplayInit(ScrnInfoPtr pScrn);
 void ViaGammaDisable(ScrnInfoPtr pScrn);
 void viaIGAInitCommon(ScrnInfoPtr pScrn);
 void viaIGA1Init(ScrnInfoPtr pScrn);
commit e7a31b9b08c4fe0bb084ee57f5dca118431b5e79
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Sat Jun 16 12:15:36 2018 -0700

    Deprecate ViaDisplaySetStreamOnDFP
    
    This function is no longer used.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 79887fa..7e733ac 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -534,22 +534,6 @@ viaDisplayInit(ScrnInfoPtr pScrn)
                         "Exiting viaDisplayInit.\n"));
 }
 
-/*
- * Sets the primary or secondary display stream on internal TMDS.
- */
-void
-ViaDisplaySetStreamOnDFP(ScrnInfoPtr pScrn, Bool primary)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaDisplaySetStreamOnDFP\n"));
-
-    if (primary)
-        ViaCrtcMask(hwp, 0x99, 0x00, 0x10);
-    else
-        ViaCrtcMask(hwp, 0x99, 0x10, 0x10);
-}
-
 void
 VIALoadRgbLut(ScrnInfoPtr pScrn, int start, int numColors, LOCO *colors)
 {
diff --git a/src/via_driver.h b/src/via_driver.h
index 8212c07..92f5acb 100644
--- a/src/via_driver.h
+++ b/src/via_driver.h
@@ -485,6 +485,5 @@ void viaShowCursor(ScrnInfoPtr pScrn);
 void viaHideCursor(ScrnInfoPtr pScrn);
 Bool viaHWCursorInit(ScreenPtr pScreen);
 void ViaDisplaySetStreamOnCRT(ScrnInfoPtr pScrn, Bool primary);
-void ViaDisplaySetStreamOnDFP(ScrnInfoPtr pScrn, Bool primary);
 
 #endif /* _VIA_DRIVER_H_ */


More information about the openchrome-devel mailing list