[Openchrome-devel] xf86-video-openchrome: 7 commits - configure.ac src/via_fp.c src/via_ums.h

Kevin Brace kevinbrace at kemper.freedesktop.org
Sat Jun 10 00:09:51 UTC 2017


 configure.ac  |    2 
 src/via_fp.c  |  152 ++++++++++++++--------------------------------------------
 src/via_ums.h |   60 ++++++++++++++++++++++
 3 files changed, 100 insertions(+), 114 deletions(-)

New commits:
commit 6297013117491f2e526c8fde632ec6f3c130210d
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 9 17:08:56 2017 -0700

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

diff --git a/configure.ac b/configure.ac
index 9612262..fd927ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.6.132],
+        [0.6.133],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 25095dc03cdf365f387da29daf46e3b645988ff5
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 9 17:07:52 2017 -0700

    Converted viaLVDS2SetDithering to an inline function
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_fp.c b/src/via_fp.c
index 7ad4fed..23d4722 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -272,32 +272,6 @@ viaDFPHighSetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap)
 }
 
 /*
- * Turns LVDS2 output color dithering on or off. (18-bit color display vs.
- * 24-bit color display)
- */
-static void
-viaLVDS2SetDithering(ScrnInfoPtr pScrn, CARD8 ditheringStatus)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Entered viaLVDS2SetDithering.\n"));
-
-    /* Set LVDS2 output color dithering bit. */
-    /* 3X5.D4[6] - LVDS Channel 2 Output Bits
-     *             0: 24 bits (dithering off)
-     *             1: 18 bits (dithering on) */
-    ViaCrtcMask(hwp, 0xD4, ditheringStatus ? 0x40 : 0x00, 0x40);
-
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                "LVDS2 Output Color Dithering: %s\n",
-                ditheringStatus ? "On (18 bit)" : "Off (24 bit)");
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Exiting viaLVDS2SetDithering.\n"));
-}
-
-/*
  * Sets output format of LVDS2 to rotation or sequential mode.
  */
 static void
diff --git a/src/via_ums.h b/src/via_ums.h
index 3913699..28e9641 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -703,6 +703,22 @@ viaLVDS2SetPower(ScrnInfoPtr pScrn, Bool powerState)
 }
 
 /*
+ * Sets LVDS2 output color dithering (18-bit color display vs.
+ * 24-bit color display).
+ */
+static inline void
+viaLVDS2SetDithering(ScrnInfoPtr pScrn, Bool dithering)
+{
+    /* 3X5.D4[6] - LVDS Channel 2 Output Bits
+     *             0: 24 bits (dithering off)
+     *             1: 18 bits (dithering on) */
+    ViaCrtcMask(VGAHWPTR(pScrn), 0xD4, dithering ? BIT(6) : 0x00, BIT(6));
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "LVDS2 Color Dithering: %s\n",
+                        dithering ? "On (18 bit color)" : "Off (24 bit color)"));
+}
+
+/*
  * Sets CX700 or later single chipset's LVDS2 I/O pad state.
  */
 static inline void
commit a82499f940c2f49659ddd40a73a62ecd79802751
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 9 16:52:20 2017 -0700

    Converted viaLVDS1SetDithering to an inline function
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_fp.c b/src/via_fp.c
index b54dd2b..7ad4fed 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -130,32 +130,6 @@ viaLVDS1SetFormat(ScrnInfoPtr pScrn, CARD8 format)
 }
 
 /*
- * Turns LVDS1 output color dithering on or off. (18-bit color display vs.
- * 24-bit color display)
- */
-static void
-viaLVDS1SetDithering(ScrnInfoPtr pScrn, CARD8 ditheringStatus)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Entered viaLVDS1SetDithering.\n"));
-
-    /* Set LVDS1 output color dithering bit. */
-    /* 3X5.88[0] - LVDS Channel 1 Output Bits
-     *             0: 24 bits (dithering off)
-     *             1: 18 bits (dithering on) */
-    ViaCrtcMask(hwp, 0x88, ditheringStatus ? 0x01 : 0x00, 0x01);
-
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                "LVDS1 Output Color Dithering: %s\n",
-                ditheringStatus ? "On (18 bit)" : "Off (24 bit)");
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Exiting viaLVDS1SetDithering.\n"));
-}
-
-/*
  * Sets output format of LVDS1 to rotation or sequential mode.
  */
 static void
diff --git a/src/via_ums.h b/src/via_ums.h
index 08a5397..3913699 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -644,6 +644,22 @@ viaLVDS1SetSoftDisplayPeriod(ScrnInfoPtr pScrn, Bool softOn)
 }
 
 /*
+ * Sets LVDS1 output color dithering (18-bit color display vs.
+ * 24-bit color display).
+ */
+static inline void
+viaLVDS1SetDithering(ScrnInfoPtr pScrn, Bool dithering)
+{
+    /* 3X5.88[0] - LVDS Channel 1 Output Bits
+     *             0: 24 bits (dithering off)
+     *             1: 18 bits (dithering on) */
+    ViaCrtcMask(VGAHWPTR(pScrn), 0x88, dithering ? BIT(0) : 0x00, BIT(0));
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "LVDS1 Color Dithering: %s\n",
+                        dithering ? "On (18 bit color)" : "Off (24 bit color)"));
+}
+
+/*
  * Sets CX700 or later single chipset's LVDS1 I/O pad state.
  */
 static inline void
commit e73387f95b4577932ec3f66f9167f19b71b03547
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 9 13:17:17 2017 -0700

    Added viaFPDithering
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_fp.c b/src/via_fp.c
index e07fb46..b54dd2b 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -396,6 +396,32 @@ viaFPIOPadState(ScrnInfoPtr pScrn, CARD8 diPort, Bool ioPadOn)
 }
 
 static void
+viaFPDithering(ScrnInfoPtr pScrn, CARD8 diPort, Bool dithering)
+{
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Entered viaFPDithering.\n"));
+
+    switch(diPort) {
+    case VIA_DI_PORT_LVDS1:
+        viaLVDS1SetDithering(pScrn, dithering);
+        break;
+    case VIA_DI_PORT_LVDS2:
+        viaLVDS2SetDithering(pScrn, dithering);
+        break;
+    case (VIA_DI_PORT_LVDS1 |
+          VIA_DI_PORT_LVDS2):
+        viaLVDS1SetDithering(pScrn, dithering);
+        viaLVDS2SetDithering(pScrn, dithering);
+        break;
+    default:
+        break;
+    }
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Exiting viaFPDithering.\n"));
+}
+
+static void
 viaFPDisplaySource(ScrnInfoPtr pScrn, int index, CARD8 diPort)
 {
     CARD8 displaySource = index & 0x01;
@@ -1078,9 +1104,6 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode,
         switch (pVia->Chipset) {
         case VIA_CX700:
         case VIA_VX800:
-            /* Set LVDS2 output color dithering. */
-            viaLVDS2SetDithering(pScrn, pVIAFP->useDithering ? TRUE : FALSE);
-
             /* Set LVDS2 output format to sequential mode. */
             viaLVDS2SetOutputFormat(pScrn, 0x01);
 
@@ -1089,9 +1112,6 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode,
             break;
         case VIA_VX855:
         case VIA_VX900:
-            /* Set LVDS1 output color dithering. */
-            viaLVDS1SetDithering(pScrn, pVIAFP->useDithering ? TRUE : FALSE);
-
             /* Set LVDS1 output format to sequential mode. */
             viaLVDS1SetOutputFormat(pScrn, 0x01);
 
@@ -1101,6 +1121,17 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode,
         default:
             break;
         }
+
+        switch (pVia->Chipset) {
+        case VIA_CX700:
+        case VIA_VX800:
+        case VIA_VX855:
+        case VIA_VX900:
+            viaFPDithering(pScrn, pVIAFP->diPort, pVIAFP->useDithering);
+            break;
+        default:
+            break;
+        }
     }
 }
 
commit 75ca7086fad540da999355e39b38db3ea18863c8
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 9 12:49:53 2017 -0700

    Converted viaLVDS2SetDisplaySource to an inline function
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_fp.c b/src/via_fp.c
index 43608a1..e07fb46 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -181,33 +181,6 @@ viaLVDS1SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat)
 }
 
 /*
- * Sets IGA1 or IGA2 as the display output source for VIA Technologies
- * Chrome IGP LVDS2 integrated LVDS transmitter.
- */
-static void
-viaLVDS2SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-    CARD8 temp = displaySource;
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Entered viaLVDS2SetDisplaySource.\n"));
-
-    /* Set LVDS2 integrated LVDS transmitter display output source. */
-    /* 3X5.97[4] - LVDS Channel 2 Data Source Selection
-     *             0: Primary Display
-     *             1: Secondary Display */
-    ViaCrtcMask(hwp, 0x97, temp << 4, 0x10);
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                "LVDS2 Integrated LVDS Transmitter Display Output "
-                "Source: IGA%d\n",
-                (temp & 0x01) + 1);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Exiting viaLVDS2SetDisplaySource.\n"));
-}
-
-/*
  * Sets LVDS2 (LVDS Channel 2) integrated LVDS transmitter delay tap.
  */
 static void
diff --git a/src/via_ums.h b/src/via_ums.h
index a0fedc6..08a5397 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -701,6 +701,21 @@ viaLVDS2SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState)
 }
 
 /*
+ * Sets CX700 or later single chipset's LVDS2 display source.
+ */
+static inline void
+viaLVDS2SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
+{
+    /* 3X5.97[4] - LVDS Channel 2 Data Source Selection
+     *             0: Primary Display
+     *             1: Secondary Display */
+    ViaCrtcMask(VGAHWPTR(pScrn), 0x97, displaySource << 4, BIT(4));
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "LVDS2 Display Source: IGA%d\n",
+                        (displaySource & 0x01) + 1));
+}
+
+/*
  * Sets CX700 / VX700 and VX800 chipsets' TMDS (DVI) power state.
  */
 static inline void
commit 24ba6f1b274455aeb486e85cf50c132de110130b
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 9 09:07:38 2017 -0700

    Updated copyright notice of via_fp.c
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_fp.c b/src/via_fp.c
index a2b1515..43608a1 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -1,5 +1,6 @@
 /*
- * Copyright 2007-2015 The Openchrome Project
+ * Copyright 2017 Kevin Brace. All Rights Reserved.
+ * Copyright 2007-2015 The OpenChrome Project
  *                     [https://www.freedesktop.org/wiki/Openchrome]
  * Copyright 1998-2007 VIA Technologies, Inc. All Rights Reserved.
  * Copyright 2001-2007 S3 Graphics, Inc. All Rights Reserved.
commit ec4f39d1a1e256ff54f45f7ad59689593d777ca7
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Fri Jun 9 09:01:00 2017 -0700

    Converted viaLVDS1SetDisplaySource to an inline function
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_fp.c b/src/via_fp.c
index 0b94edc..a2b1515 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -105,33 +105,6 @@ static DisplayModeRec OLPCMode = {
 #define TD3 25
 
 /*
- * Sets IGA1 or IGA2 as the display output source for VIA Technologies
- * Chrome IGP LVDS1 integrated LVDS transmitter.
- */
-static void
-viaLVDS1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-    CARD8 temp = displaySource;
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Entered viaLVDS1SetDisplaySource.\n"));
-
-    /* Set LVDS1 integrated LVDS transmitter display output source. */
-    /* 3X5.99[4] - LVDS Channel 1 Data Source Selection
-     *             0: Primary Display
-     *             1: Secondary Display */
-    ViaCrtcMask(hwp, 0x99, temp << 4, 0x10);
-    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                "LVDS1 Integrated LVDS Transmitter Display Output "
-                "Source: IGA%d\n",
-                (temp & 0x01) + 1);
-
-    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-                        "Exiting viaLVDS1SetDisplaySource.\n"));
-}
-
-/*
  * Sets LVDS1 (LVDS Channel 1) integrated LVDS transmitter format.
  */
 static void
diff --git a/src/via_ums.h b/src/via_ums.h
index 66296a6..a0fedc6 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -656,6 +656,19 @@ viaLVDS1SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState)
                         (ioPadState & (BIT(1) | BIT(0)))));
 }
 
+/* Sets CX700 or later single chipset's LVDS1 display source. */
+static inline void
+viaLVDS1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
+{
+    /* 3X5.99[4] - LVDS Channel 1 Data Source Selection
+     *             0: Primary Display
+     *             1: Secondary Display */
+    ViaCrtcMask(VGAHWPTR(pScrn), 0x99, displaySource << 4, BIT(4));
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "LVDS1 Display Source: IGA%d\n",
+                        (displaySource & 0x01) + 1));
+}
+
 /*
  * Sets CX700 / VX700 and VX800 chipsets' LVDS2 power state.
  */


More information about the Openchrome-devel mailing list