[Openchrome-devel] xf86-video-openchrome: src/via_display.c src/via_ums.h
Kevin Brace
kevinbrace at kemper.freedesktop.org
Tue Apr 26 16:38:52 UTC 2016
src/via_display.c | 24 ++++++++++++++++++++++++
src/via_ums.h | 1 +
2 files changed, 25 insertions(+)
New commits:
commit 479b2ab119d05c22e1541f4cf25fe816419a86e9
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Tue Apr 26 09:31:58 2016 -0700
Turning off IGA2 correctly
Added viaIGA2Screen function to via_display.c.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_display.c b/src/via_display.c
index 0fe0c13..8dbfeea 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -49,6 +49,26 @@ viaIGA1DPMSControl(ScrnInfoPtr pScrn, CARD8 DPMS_Control)
}
/*
+ * Controls IGA2 screen state.
+ */
+void
+viaIGA2Screen(ScrnInfoPtr pScrn, Bool Screen_State)
+{
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered viaIGA2Screen.\n"));
+
+ /* 3X5.6B[2]: IGA2 Screen Off
+ * 0 = Screen on
+ * 1 = Screen off */
+ ViaCrtcMask(hwp, 0x6B, Screen_State ? 0x00 : 0x04, 0x04);
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting viaIGA2Screen.\n"));
+}
+
+/*
* Controls IGA2 display channel state.
*/
void
@@ -1520,6 +1540,8 @@ iga2_crtc_dpms(xf86CrtcPtr crtc, int mode)
switch (mode) {
case DPMSModeOn:
+ viaIGA2Screen(pScrn, TRUE);
+
if (pBIOSInfo->SimultaneousEnabled)
ViaDisplayEnableSimultaneous(pScrn);
break;
@@ -1527,6 +1549,8 @@ iga2_crtc_dpms(xf86CrtcPtr crtc, int mode)
case DPMSModeStandby:
case DPMSModeSuspend:
case DPMSModeOff:
+ viaIGA2Screen(pScrn, FALSE);
+
if (pBIOSInfo->SimultaneousEnabled)
ViaDisplayDisableSimultaneous(pScrn);
break;
diff --git a/src/via_ums.h b/src/via_ums.h
index 78e5837..78f94cf 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -205,6 +205,7 @@ void ViaSetUseExternalClock(vgaHWPtr hwp);
/* via_display.c */
void viaIGA1DPMSControl(ScrnInfoPtr pScrn, CARD8 DPMS_Control);
+void viaIGA2Screen(ScrnInfoPtr pScrn, Bool Screen_State);
void viaIGA2DisplayChannel(ScrnInfoPtr pScrn, Bool Channel_State);
void viaDisplayInit(ScrnInfoPtr pScrn);
void ViaDisplayEnableSimultaneous(ScrnInfoPtr pScrn);
More information about the Openchrome-devel
mailing list