[Openchrome-devel] xf86-video-openchrome: 2 commits - src/via_display.c src/via_lvds.c

Kevin Brace kevinbrace at kemper.freedesktop.org
Wed Apr 20 09:44:13 UTC 2016


 src/via_display.c |    7 +++++++
 src/via_lvds.c    |   11 -----------
 2 files changed, 7 insertions(+), 11 deletions(-)

New commits:
commit e00e8524785a1306b0a2e3f6f778c5387824652f
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Wed Apr 20 02:33:31 2016 -0700

    Always use IGA2 for DVP1 Data Source Selection 0
    
    This is part of an attempt to fix the bug where the LVDS FP
    (Flat Panel) screen gets lost after an ACPI S3 State (i.e., Suspend
    to RAM or STR) resume.
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 5034ab3..6c45543 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -661,6 +661,9 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
      * (Power Management System?). */
     ViaSeqMask(hwp, 0x2A, 0x0F, 0x0F);
 
+    /* Use IGA2 for DVP1 Data Source Selection 0 */
+    ViaCrtcMask(hwp, 0x9b, 0x10, 0x10);
+
     /* Linear Mode */
     ViaCrtcMask(hwp, 0x62, 0x00, 0x01);
 
commit 23c54676e34febe58f088f92637e842fd3fe68d7
Author: Kevin Brace <kevinbrace at gmx.com>
Date:   Tue Apr 19 22:36:12 2016 -0700

    Removing ViaLVDSDFPPower
    
    Due to a poor assumption made by previous developers, this function
    turns off LVDS Channel 1 and 2 I/O pads when a laptop with an LVDS FP
    (Flat Panel) resumes from ACPI S3 State. Because this function leads
    to a loss of the use of an LVDS FP, it is now discontinued. The
    equivalent functionality is now implemented within
    viaIGA2SetDisplayRegister function inside via_display.c. The I/O pad
    on / off state will now be governed by PMS (Power Management Status).
    
    Signed-off-by: Kevin Brace <kevinbrace at gmx.com>

diff --git a/src/via_display.c b/src/via_display.c
index 3db2026..5034ab3 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -657,6 +657,10 @@ viaIGA2SetDisplayRegister(ScrnInfoPtr pScrn, DisplayModePtr mode)
             break;
     }
 
+    /* LVDS Channel 1 and 2 should be controlled by PMS
+     * (Power Management System?). */
+    ViaSeqMask(hwp, 0x2A, 0x0F, 0x0F);
+
     /* Linear Mode */
     ViaCrtcMask(hwp, 0x62, 0x00, 0x01);
 
diff --git a/src/via_lvds.c b/src/via_lvds.c
index 788304e..80f5c83 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -236,16 +236,6 @@ ViaLVDSHardwarePowerSecondSequence(ScrnInfoPtr pScrn, Bool on)
 }
 
 static void
-ViaLVDSDFPPower(ScrnInfoPtr pScrn, Bool on)
-{
-    vgaHWPtr hwp = VGAHWPTR(pScrn);
-    VIAPtr pVia = VIAPTR(pScrn);
-
-    /* Switch DFP High/Low pads on or off for channels active at EnterVT(). */
-    ViaSeqMask(hwp, 0x2A, on ? pVia->SavedReg.SR2A : 0, 0x0F);
-}
-
-static void
 ViaLVDSPowerChannel(ScrnInfoPtr pScrn, Bool on)
 {
     vgaHWPtr hwp = VGAHWPTR(pScrn);
@@ -285,7 +275,6 @@ ViaLVDSPower(ScrnInfoPtr pScrn, Bool Power_On)
         break;
     }
 
-    ViaLVDSDFPPower(pScrn, Power_On);
     ViaLVDSPowerChannel(pScrn, Power_On);
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,


More information about the Openchrome-devel mailing list