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

Kevin Brace kevinbrace at kemper.freedesktop.org
Wed Aug 10 22:46:02 UTC 2016


 configure.ac   |    2 -
 src/via_lvds.c |   84 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 80 insertions(+), 6 deletions(-)

New commits:
commit 0a5c73f281c0cb4513ccd2b1347d7eb59dc9a654
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Wed Aug 10 15:44:38 2016 -0700

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

diff --git a/configure.ac b/configure.ac
index 927f081..14fe727 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-openchrome],
-        [0.5.125],
+        [0.5.126],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
         [xf86-video-openchrome])
 
commit 189fae8ef421043423b12e82c38d84bb2c8b3c1e
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Wed Aug 10 15:42:27 2016 -0700

    Set LVDS2 output color dithering from via_lvds_mode_set
    
    Rather than setting LVDS2 output color dithering from
    viaSetLVDSOutput function, it will now be set from
    via_lvds_mode_set callback function.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_lvds.c b/src/via_lvds.c
index 60567ff..e4fd5df 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -964,11 +964,6 @@ viaSetLVDSOutput(ScrnInfoPtr pScrn)
 
         /* Sequential mode for LVDS Channel 2 output format. */
         ViaCrtcMask(hwp, 0xD4, 0x80, 0x80);
-
-        /* This part will have to be programmable between 18-bit
-         * mode and 24-bit mode in the future. */
-        /* Turn on 18-bit (dither) mode for LVDS Channel 2. */
-        ViaCrtcMask(hwp, 0xD4, 0x40, 0x40);
         break;
     }
 
@@ -1021,6 +1016,11 @@ via_lvds_mode_set(xf86OutputPtr output, DisplayModePtr mode,
         case VIA_VX855:
         case VIA_VX900:
             viaLVDS2SetDisplaySource(pScrn, iga->index ? 0x01 : 0x00);
+
+            /* This part will have to be programmable between 18-bit
+             * mode and 24-bit mode in the future. */
+            /* Turn on 18-bit (dithering) mode for LVDS Channel 2. */
+            viaLVDS2SetDithering(pScrn, TRUE);
             break;
         default:
             break;
commit deeea8afa59662fc88481de3130b5a3f5572d95a
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Wed Aug 10 15:33:09 2016 -0700

    Added viaLVDS2SetDithering
    
    viaLVDS2SetDithering function sets the output color dithering state
    for LVDS2 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 6f86f69..60567ff 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -249,6 +249,32 @@ viaDFPHighSetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap)
                         "Exiting viaDFPHighSetDelayTap.\n"));
 }
 
+/*
+ * 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"));
+}
+
 static void
 ViaLVDSSoftwarePowerFirstSequence(ScrnInfoPtr pScrn, Bool on)
 {
commit c0c87ea43477995ed1284066f8e47a23e6ec1e91
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Aug 8 17:11:09 2016 -0700

    Added viaDFPHighSetDisplaySource
    
    viaDFPHighSetDisplaySource function sets the display output source
    for DFP (Digital Flat Panel) High interface. 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 b5fdf58..6f86f69 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -180,6 +180,32 @@ viaDFPLowSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
 }
 
 /*
+ * Sets IGA1 or IGA2 as the display output source for VIA Technologies
+ * Chrome IGP DFP (Digital Flat Panel) High interface.
+ */
+static void
+viaDFPHighSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
+{
+    vgaHWPtr hwp = VGAHWPTR(pScrn);
+    CARD8 temp = displaySource;
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Entered viaDFPHighSetDisplaySource.\n"));
+
+    /* Set DFP High display output source.
+    /* 3X5.97[4] - DFP High Data Source Selection
+     *             0: Primary Display
+     *             1: Secondary Display */
+    ViaCrtcMask(hwp, 0x97, temp << 4, 0x10);
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                "DFP High Display Output Source: IGA%d\n",
+                (temp & 0x01) + 1);
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Exiting viaDFPHighSetDisplaySource.\n"));
+}
+
+/*
  * Sets DFP (Digital Flat Panel) Low interface delay tap.
  */
 static void
commit a94dde4233f1e134f92bb97c9bfd2179fc431f02
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Mon Aug 8 16:56:48 2016 -0700

    Added viaDFPHighSetDelayTap
    
    viaDFPHighSetDelayTap function sets the delay tap value for
    DFP (Digital Flat Panel) High interface. 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 a136e5c..b5fdf58 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -201,6 +201,28 @@ viaDFPLowSetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap)
                         "Exiting viaDFPLowSetDelayTap.\n"));
 }
 
+/*
+ * Sets DFP (Digital Flat Panel) High interface delay tap.
+ */
+static void
+viaDFPHighSetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap)
+{
+    vgaHWPtr hwp = VGAHWPTR(pScrn);
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Entered viaDFPHighSetDelayTap.\n"));
+
+    /* Set DFP High interface delay tap.
+    /* 3X5.97[3:0] - DFP High Delay Tap */
+    ViaCrtcMask(hwp, 0x97, delayTap, 0x0F);
+    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                "DFP High Delay Tap: %d\n",
+                (delayTap & 0x0F));
+
+    DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+                        "Exiting viaDFPHighSetDelayTap.\n"));
+}
+
 static void
 ViaLVDSSoftwarePowerFirstSequence(ScrnInfoPtr pScrn, Bool on)
 {


More information about the Openchrome-devel mailing list