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

Kevin Brace kevinbrace at kemper.freedesktop.org
Fri Oct 7 04:23:44 UTC 2016


 configure.ac   |    2 -
 src/via_lvds.c |   96 +++++++++++++++++++++++++++++++++++++--------------------
 2 files changed, 64 insertions(+), 34 deletions(-)

New commits:
commit eb02101c4d9b41bebac51813750d7cba4046dac9
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Oct 6 14:03:05 2016 -0700

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

diff --git a/configure.ac b/configure.ac
index 4ff3945..b0da202 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.5.161],
+        [0.5.162],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 7c15ee25d0c4fd37dc0b07dc68ffb849dcf50ba0
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Thu Oct 6 14:01:10 2016 -0700

    Change how AGP based UniChrome IGP's FP display source is set
    
    This change affects KM400, K8M800, PM800, and P4M800 Pro chipset
    families and their derivatives. The newer devices (PCI Express
    based Chrome9 IGPs and single chip type chipsets) are not affected.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_lvds.c b/src/via_lvds.c
index 995b290..6b9a65e 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -1065,6 +1065,9 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
         case VIA_K8M800:
         case VIA_PM800:
         case VIA_P4M800PRO:
+            viaDFPLowSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00);
+            viaDFPHighSetDisplaySource(pScrn, iga->index ? 0x01 : 0x00);
+            break;
         case VIA_P4M890:
         case VIA_K8M890:
         case VIA_P4M900:
commit 97df49c4abce98b44ad4fef964cc81d620f70aab
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Oct 4 15:53:02 2016 -0700

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

diff --git a/configure.ac b/configure.ac
index 62e32bf..4ff3945 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.5.160],
+        [0.5.161],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
diff --git a/src/via_lvds.c b/src/via_lvds.c
index b38a09a..995b290 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -1039,15 +1039,15 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
     drmmode_crtc_private_ptr iga = output->crtc->driver_private;
     VIAPtr pVia = VIAPTR(pScrn);
 
-    if (Panel->Scale) {
-        ViaPanelScale(pScrn, mode->HDisplay, mode->VDisplay,
-                        Panel->NativeWidth,
-                        Panel->NativeHeight);
-    } else {
-        ViaPanelScaleDisable(pScrn);
-    }
-
     if (output->crtc) {
+        if (Panel->Scale) {
+            ViaPanelScale(pScrn, mode->HDisplay, mode->VDisplay,
+                            Panel->NativeWidth,
+                            Panel->NativeHeight);
+        } else {
+            ViaPanelScaleDisable(pScrn);
+        }
+
         switch (pVia->Chipset) {
         case VIA_P4M900:
             viaDFPLowSetDelayTap(pScrn, 0x08);
commit 17d7e94b437988497fc60a3f1f10824bd7a0048d
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Oct 4 15:44:22 2016 -0700

    Discontinued the use of viaSetLVDSOutput
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_lvds.c b/src/via_lvds.c
index 672b8e2..b38a09a 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -915,30 +915,6 @@ ViaPanelScaleDisable(ScrnInfoPtr pScrn)
 }
 
 static void
-viaSetLVDSOutput(ScrnInfoPtr pScrn)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-    VIAPtr pVia = VIAPTR(pScrn);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Entered viaSetLVDSOutput.\n"));
-
-    switch (pVia->Chipset) {
-    case VIA_CX700:
-    case VIA_VX800:
-    case VIA_VX855:
-    case VIA_VX900:
-        /* Do not power down LVDS Channel 2. */
-        /* For now, use OPENLDI mode for LVDS Channel 2. */
-        ViaCrtcMask(hwp, 0xD2, 0x01, 0x41);
-        break;
-    }
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Exiting viaSetLVDSOutput.\n"));
-}
-
-static void
 via_lvds_create_resources(xf86OutputPtr output)
 {
 }
@@ -1072,8 +1048,6 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
     }
 
     if (output->crtc) {
-        viaSetLVDSOutput(pScrn);
-
         switch (pVia->Chipset) {
         case VIA_P4M900:
             viaDFPLowSetDelayTap(pScrn, 0x08);
@@ -1108,6 +1082,9 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 
             /* Set LVDS2 output format to sequential mode. */
             viaLVDS2SetOutputFormat(pScrn, 0x01);
+
+            /* Set LVDS2 output to OPENLDI mode. */
+            viaLVDS2SetFormat(pScrn, 0x01);
             break;
         default:
             break;
commit 8285de827c752e32f732cbd0814bcf39d48c1072
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Oct 4 11:43:11 2016 -0700

    Added viaLVDS1SetFormat
    
    viaLVDS1SetFormat function sets the format (SPWG or OPENLDI) for
    LVDS1 (LVDS Channel 1) integrated LVDS transmitter. This function
    is located inside via_lvds.c.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_lvds.c b/src/via_lvds.c
index 459c726..672b8e2 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -133,6 +133,31 @@ viaLVDS1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
 }
 
 /*
+ * Sets LVDS1 (LVDS Channel 1) integrated LVDS transmitter format.
+ */
+static void
+viaLVDS1SetFormat(ScrnInfoPtr pScrn, CARD8 format)
+{
+    vgaHWPtr hwp = VGAHWPTR(pScrn);
+    VIAPtr pVia = VIAPTR(pScrn);
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Entered viaLVDS1SetFormat.\n"));
+
+    /* Set LVDS1 format. */
+    /* 3X5.D2[1] - LVDS Channel 1 Format Selection
+     *             0: SPWG Mode
+     *             1: OPENLDI Mode */
+    ViaCrtcMask(hwp, 0xD2, format << 1, 0x02);
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                "LVDS1 Format: %s\n",
+                (format & 0x01) ? "OPENLDI" : "SPWG");
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Exiting viaLVDS1SetFormat.\n"));
+}
+
+/*
  * Sets IGA1 or IGA2 as the display output source for VIA Technologies
  * Chrome IGP LVDS2 integrated LVDS transmitter.
  */
commit 46f5fcc6b0810fb0ddbd947f89ce22f7281071bc
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Oct 4 11:37:13 2016 -0700

    Added viaLVDS2SetFormat
    
    viaLVDS2SetFormat function sets the format (SPWG or OPENLDI) for
    LVDS2 (LVDS Channel 2) integrated LVDS transmitter. This function
    is located inside via_lvds.c.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_lvds.c b/src/via_lvds.c
index cf9a121..459c726 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -183,6 +183,31 @@ viaLVDS2SetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap)
 }
 
 /*
+ * Sets LVDS2 (LVDS Channel 2) integrated LVDS transmitter format.
+ */
+static void
+viaLVDS2SetFormat(ScrnInfoPtr pScrn, CARD8 format)
+{
+    vgaHWPtr hwp = VGAHWPTR(pScrn);
+    VIAPtr pVia = VIAPTR(pScrn);
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Entered viaLVDS2SetFormat.\n"));
+
+    /* Set LVDS2 format. */
+    /* 3X5.D2[0] - LVDS Channel 2 Format Selection
+     *             0: SPWG Mode
+     *             1: OPENLDI Mode */
+    ViaCrtcMask(hwp, 0xD2, format, 0x01);
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                "LVDS2 Format: %s\n",
+                (format & 0x01) ? "OPENLDI" : "SPWG");
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Exiting viaLVDS2SetFormat.\n"));
+}
+
+/*
  * Sets IGA1 or IGA2 as the display output source for VIA Technologies
  * Chrome IGP DFP (Digital Flat Panel) High interface.
  */


More information about the Openchrome-devel mailing list