[Openchrome-devel] xf86-video-openchrome: 5 commits - configure.ac src/via_analog.c src/via_display.c src/via_ums.h
Kevin Brace
kevinbrace at kemper.freedesktop.org
Wed May 24 16:41:17 UTC 2017
configure.ac | 2 +-
src/via_analog.c | 33 +++++++++++++++++++++++++++++----
src/via_display.c | 15 ++-------------
src/via_ums.h | 33 +++++++++++++++++++++++++++++++++
4 files changed, 65 insertions(+), 18 deletions(-)
New commits:
commit 466df96ea95b00d22863a5073e5b5062575b7f0e
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed May 24 09:39:22 2017 -0700
Version bumped to 0.6.121
This version fixes a bug exposed by the updated analog (VGA) and
FP initialization code. Thanks to the updated code, analog and FP
can be assigned to IGA1 or IGA2. However, IGA1 DPMS control code
was controlling analog DPMS, and this led to a buggy behavior
of analog display when turning off analog display from the OS in
some situations. The analog DPMS now correctly controls the DPMS
state, and IGA1 output control is done differently.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index d7c71a2..1353593 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- [0.6.120],
+ [0.6.121],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit ee83fe15498bede28bbc53e64eaf8d428cff0fdd
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed May 24 09:27:10 2017 -0700
Moving DPMS control code to via_analog_dpms
DPMS control is really meant for analog (VGA), so that is where it
belongs. This fixes a bug exposed by the updated analog and FP
initialization code.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_analog.c b/src/via_analog.c
index 0d7f6ec..cbade3a 100644
--- a/src/via_analog.c
+++ b/src/via_analog.c
@@ -248,14 +248,21 @@ via_analog_dpms(xf86OutputPtr output, int mode)
switch (mode) {
case DPMSModeOn:
- viaAnalogOutput(pScrn, TRUE);
+ viaAnalogSetDPMSControl(pScrn, 0x00);
break;
case DPMSModeStandby:
+ viaAnalogSetDPMSControl(pScrn, 0x01);
+ break;
case DPMSModeSuspend:
+ viaAnalogSetDPMSControl(pScrn, 0x02);
+ break;
case DPMSModeOff:
- viaAnalogOutput(pScrn, FALSE);
+ viaAnalogSetDPMSControl(pScrn, 0x03);
break;
default:
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Invalid DPMS Mode: %d\n",
+ mode);
break;
}
@@ -293,13 +300,31 @@ via_analog_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
static void
via_analog_prepare(xf86OutputPtr output)
{
- via_analog_dpms(output, DPMSModeOff);
+ ScrnInfoPtr pScrn = output->scrn;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered via_analog_prepare.\n"));
+
+ /* DPMS On */
+ viaAnalogSetDPMSControl(pScrn, 0x03);
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting via_analog_prepare.\n"));
}
static void
via_analog_commit(xf86OutputPtr output)
{
- via_analog_dpms(output, DPMSModeOn);
+ ScrnInfoPtr pScrn = output->scrn;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered via_analog_commit.\n"));
+
+ /* DPMS off */
+ viaAnalogSetDPMSControl(pScrn, 0x00);
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting via_analog_commit.\n"));
}
static void
diff --git a/src/via_display.c b/src/via_display.c
index b405361..32b9761 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -3643,27 +3643,16 @@ iga1_crtc_dpms(xf86CrtcPtr crtc, int mode)
switch (mode) {
case DPMSModeOn:
- viaIGA1DPMSControl(pScrn, 0x00);
- break;
-
case DPMSModeStandby:
- viaIGA1DPMSControl(pScrn, 0x01);
- break;
-
case DPMSModeSuspend:
- viaIGA1DPMSControl(pScrn, 0x02);
+ viaIGA1DisplayOutput(pScrn, TRUE);
break;
-
case DPMSModeOff:
- viaIGA1DPMSControl(pScrn, 0x03);
+ viaIGA1DisplayOutput(pScrn, FALSE);
break;
-
default:
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid DPMS Mode: %d\n",
- mode);
break;
}
- //vgaHWSaveScreen(pScrn->pScreen, mode);
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Exiting iga1_crtc_dpms.\n"));
commit 657946353d261993c3e0a47f7b099c4ad96ed5dc
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed May 24 08:30:01 2017 -0700
Rename viaIGA1DisplayOutput as viaIGA1SetDisplayOutput
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_ums.h b/src/via_ums.h
index 6b79a20..a59855b 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -264,10 +264,10 @@ union pllparams {
/*
- * Controls IGA1 display output state.
+ * Sets IGA1 display output state.
*/
static inline void
-viaIGA1DisplayOutput(ScrnInfoPtr pScrn, Bool outputState)
+viaIGA1SetDisplayOutput(ScrnInfoPtr pScrn, Bool outputState)
{
/* 3C5.01[5] - IGA1 Screen Off
* 0: Screen on
commit fbf4e5e3ae0ecaa2122c399874df8385cd4c4bb2
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed May 24 08:27:57 2017 -0700
Added viaAnalogSetDPMSControl
This inline function was added to via_ums.h.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_ums.h b/src/via_ums.h
index 4e22d6e..6b79a20 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -279,6 +279,24 @@ viaIGA1DisplayOutput(ScrnInfoPtr pScrn, Bool outputState)
}
/*
+ * Sets analog (VGA) DPMS State.
+ */
+static inline void
+viaAnalogSetDPMSControl(ScrnInfoPtr pScrn, CARD8 dpmsControl)
+{
+ /* 3X5.36[5:4] - DPMS Control
+ * 00: On
+ * 01: Stand-by
+ * 10: Suspend
+ * 11: Off */
+ ViaCrtcMask(VGAHWPTR(pScrn), 0x36, dpmsControl << 4,
+ BIT(5) | BIT(4));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Analog (VGA) DPMS: %u\n",
+ dpmsControl & (BIT(1) | BIT(0))));
+}
+
+/*
* Sets analog (VGA) DAC output state.
*/
static inline void
commit d90f107ce9c55aa73045824d9b36e09b00f23318
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed May 24 08:18:10 2017 -0700
Added viaIGA1DisplayOutput
This inline function was added to via_ums.h.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_ums.h b/src/via_ums.h
index 9b19fcb..4e22d6e 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -264,6 +264,21 @@ union pllparams {
/*
+ * Controls IGA1 display output state.
+ */
+static inline void
+viaIGA1DisplayOutput(ScrnInfoPtr pScrn, Bool outputState)
+{
+ /* 3C5.01[5] - IGA1 Screen Off
+ * 0: Screen on
+ * 1: Screen off */
+ ViaSeqMask(VGAHWPTR(pScrn), 0x01, outputState ? 0x00 : BIT(5), BIT(5));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "IGA1 Display Output: %s\n",
+ outputState ? "On" : "Off"));
+}
+
+/*
* Sets analog (VGA) DAC output state.
*/
static inline void
More information about the Openchrome-devel
mailing list