[Openchrome-devel] xf86-video-openchrome: 5 commits - configure.ac src/via_analog.c src/via_display.c src/via_ums.h
configure.ac |2 +- src/via_analog.c |5 ++--- src/via_display.c | 16 src/via_ums.h | 32 4 files changed, 51 insertions(+), 4 deletions(-) New commits: commit fc1c232cb31d990b3dc725f8051f0b0eaece Author: Kevin BraceDate: Sun Jun 25 06:57:52 2017 -0500 Version bumped to 0.6.139 Signed-off-by: Kevin Brace diff --git a/configure.ac b/configure.ac index 00a05cf..f909674 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ(2.57) AC_INIT([xf86-video-openchrome], -[0.6.138], +[0.6.139], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg=Driver/openchrome], [xf86-video-openchrome]) commit 048cf5eca9dfbe1e8137c8308bbda572040f37eb Author: Kevin Brace Date: Sun Jun 25 06:56:16 2017 -0500 Reversing commit 46b0f46 The new code is slightly different from what commit 46b0f46 removed, but the original functionality of turning off IGA1 / IGA2 through DPMS callback function is now restored. Signed-off-by: Kevin Brace diff --git a/src/via_display.c b/src/via_display.c index a3b46ae..04ed559 100644 --- a/src/via_display.c +++ b/src/via_display.c @@ -3577,8 +3577,10 @@ iga1_crtc_dpms(xf86CrtcPtr crtc, int mode) case DPMSModeOn: case DPMSModeStandby: case DPMSModeSuspend: +viaIGA1SetDisplayOutput(pScrn, TRUE); break; case DPMSModeOff: +viaIGA1SetDisplayOutput(pScrn, FALSE); break; default: break; @@ -3674,6 +3676,9 @@ iga1_crtc_prepare(xf86CrtcPtr crtc) DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga1_crtc_prepare.\n")); +/* Turn off IGA1. */ +viaIGA1SetDisplayOutput(pScrn, FALSE); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting iga1_crtc_prepare.\n")); } @@ -3757,6 +3762,9 @@ iga1_crtc_commit(xf86CrtcPtr crtc) if (crtc->scrn->pScreen != NULL && pVia->drmmode.hwcursor) xf86_reload_cursors(crtc->scrn->pScreen); +/* Turn on IGA1. */ +viaIGA1SetDisplayOutput(pScrn, TRUE); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting iga1_crtc_commit.\n")); } @@ -3960,10 +3968,12 @@ iga2_crtc_dpms(xf86CrtcPtr crtc, int mode) switch (mode) { case DPMSModeOn: +viaIGA2SetDisplayOutput(pScrn, TRUE); break; case DPMSModeStandby: case DPMSModeSuspend: case DPMSModeOff: +viaIGA2SetDisplayOutput(pScrn, FALSE); break; default: xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Invalid DPMS mode: %d\n", @@ -4074,6 +4084,9 @@ iga2_crtc_prepare(xf86CrtcPtr crtc) DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered iga2_crtc_prepare.\n")); +/* Turn off IGA2. */ +viaIGA2SetDisplayOutput(pScrn, FALSE); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting iga2_crtc_prepare.\n")); } @@ -4153,6 +4166,9 @@ iga2_crtc_commit(xf86CrtcPtr crtc) if (crtc->scrn->pScreen != NULL && pVia->drmmode.hwcursor) xf86_reload_cursors(crtc->scrn->pScreen); +/* Turn on IGA2. */ +viaIGA2SetDisplayOutput(pScrn, TRUE); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Exiting iga2_crtc_commit.\n")); } commit f5335d37c099d89d565539d861d41305f234ddb2 Author: Kevin Brace Date: Sun Jun 25 06:27:39 2017 -0500 Added viaIGA2SetDisplayOutput This commit effectively reverses commit 0fab3ad. Signed-off-by: Kevin Brace diff --git a/src/via_ums.h b/src/via_ums.h index 4f2be39..60c2bba 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -306,6 +306,22 @@ viaIGA1SetDisplayOutput(ScrnInfoPtr pScrn, Bool outputState) } /* + * Sets IGA2 display output state. + */ +static inline void +viaIGA2SetDisplayOutput(ScrnInfoPtr pScrn, Bool outputState) +{ +/* 3X5.6B[2] - IGA2 Screen Off + * 0: Screen on + * 1: Screen off */ +ViaCrtcMask(VGAHWPTR(pScrn), 0x6B, +outputState ? 0x00 : BIT(2), BIT(2)); +DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, +"IGA2 Display Output: %s\n", +outputState ? "On" : "Off")); +} + +/* * Sets DVP0 (Digital Video Port 0) I/O pad state. */ static inline void commit 2816955d4f3a54831d11b86c03e147dd15e548c0 Author: Kevin Brace Date: Sun Jun 25 06:04:06 2017 -0500 Permanently turning off CRT DACOFF bit Turning on this bit was the likely cause why commit 46b0f46 was made. Thanks to this fix, may be able to revert back the code removed by this commit. Turning off this bit prevents 3C5.01[5] from turning off analog (VGA) DAC. This affects CX700 / VX700, VX800, VX855, and
[Openchrome-devel] xf86-video-openchrome: 5 commits - configure.ac src/via_analog.c src/via_display.c src/via_ums.h
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 BraceDate: 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 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=Driver/openchrome], [xf86-video-openchrome]) commit ee83fe15498bede28bbc53e64eaf8d428cff0fdd Author: Kevin Brace 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 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 Date: Wed May 24 08:30:01 2017 -0700 Rename viaIGA1DisplayOutput as viaIGA1SetDisplayOutput Signed-off-by: Kevin Brace 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)