[Openchrome-devel] xf86-video-openchrome: 9 commits - configure.ac src/via_analog.c src/via_display.c src/via_fp.c src/via_regs.h src/via_ums.c src/via_ums.h src/via_vt1632.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Sat Jun 24 18:49:08 UTC 2017
configure.ac | 2 +-
src/via_analog.c | 8 ++++----
src/via_display.c | 23 -----------------------
src/via_fp.c | 34 ++++++++++------------------------
src/via_regs.h | 3 ++-
src/via_ums.c | 3 ---
src/via_ums.h | 17 +++++++++++++++++
src/via_vt1632.c | 1 -
8 files changed, 34 insertions(+), 57 deletions(-)
New commits:
commit 0fb54ca8c4ae0b5f24c97d8909950472d96c3217
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jun 24 13:43:00 2017 -0500
Version bumped to 0.6.138
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index e0e0f20..00a05cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- [0.6.137],
+ [0.6.138],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 29ac0ebb59a4eb70ed4c5ce872e9fb75038f868d
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jun 24 13:38:18 2017 -0500
Fix for analog (VGA) screen going off when changing screen resolution
This commit fixes a regression introduced by commits b9bce1c and
d3d03bb was observed on VX700 chipset and VX900 chipset, but not
VN896 chipset.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_analog.c b/src/via_analog.c
index 6a6cabc..1ad2146 100644
--- a/src/via_analog.c
+++ b/src/via_analog.c
@@ -303,8 +303,8 @@ via_analog_prepare(xf86OutputPtr output)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered via_analog_prepare.\n"));
- viaAnalogSetDPMSControl(pScrn, VIA_ANALOG_DPMS_ON);
- viaAnalogPower(pScrn, TRUE);
+ viaAnalogSetDPMSControl(pScrn, VIA_ANALOG_DPMS_OFF);
+ viaAnalogPower(pScrn, FALSE);
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Exiting via_analog_prepare.\n"));
@@ -318,8 +318,8 @@ via_analog_commit(xf86OutputPtr output)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered via_analog_commit.\n"));
- viaAnalogSetDPMSControl(pScrn, VIA_ANALOG_DPMS_OFF);
- viaAnalogPower(pScrn, FALSE);
+ viaAnalogSetDPMSControl(pScrn, VIA_ANALOG_DPMS_ON);
+ viaAnalogPower(pScrn, TRUE);
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Exiting via_analog_commit.\n"));
commit 71d1dd931940bdb6ba4ac2d942639128639df4c6
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Jun 21 00:54:21 2017 -0500
Added VIASETREGMASK macro
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_regs.h b/src/via_regs.h
index d3c020b..467a88d 100644
--- a/src/via_regs.h
+++ b/src/via_regs.h
@@ -339,6 +339,7 @@ enum VIACHIPTAGS {
#define VIASETREG(addr, data) *(volatile unsigned int *)(pVia->MapBase + (addr)) = (data)
#define VIAGETREG(addr) *(volatile unsigned int *)(pVia->MapBase + (addr))
-
+#define VIASETREGMASK(addr, data, mask) \
+ VIASETREG(addr, (data & mask) | (VIAGETREG(addr) & ~mask))
#endif /* _VIA_REGS_H_ */
commit 142377c5d2267797bf3cd52434a86bab08ce30e1
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jun 17 20:23:42 2017 -0500
Removed unnecessary variables from umsPreInit
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_ums.c b/src/via_ums.c
index d2f6b4e..b49a368 100644
--- a/src/via_ums.c
+++ b/src/via_ums.c
@@ -958,9 +958,7 @@ exit:
Bool
umsPreInit(ScrnInfoPtr pScrn)
{
- vgaHWPtr hwp;
VIAPtr pVia = VIAPTR(pScrn);
- int bMemSize = 0;
if (!xf86LoadSubModule(pScrn, "vgahw"))
return FALSE;
@@ -975,7 +973,6 @@ umsPreInit(ScrnInfoPtr pScrn)
vgaHWSetRegCounts(pScrn, VGA_NUM_CRTC, VGA_NUM_SEQ, VGA_NUM_GFX,
VGA_NUM_ATTR);
#endif
- hwp = VGAHWPTR(pScrn);
if (!viaProbeVRAM(pScrn)) {
return FALSE;
commit e4441cad869bdaa197ced8cfafe7bda45966e217
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jun 17 20:12:48 2017 -0500
Removed an unnecessary variable from viaVT1632Probe
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_vt1632.c b/src/via_vt1632.c
index 07cb391..01a80ee 100644
--- a/src/via_vt1632.c
+++ b/src/via_vt1632.c
@@ -404,7 +404,6 @@ viaVT1632Probe(ScrnInfoPtr pScrn, I2CBusPtr pI2CBus)
{
I2CDevPtr pI2CDevice = NULL;
I2CSlaveAddr i2cAddr = 0x10;
- VIAPtr pVia = VIAPTR(pScrn);
CARD8 i2cData;
CARD16 vendorID, deviceID;
Bool status = FALSE;
commit 0fab3ad9392c81c22ac428af4b30526303c6db4e
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jun 17 19:50:29 2017 -0500
Removed viaIGA2DisplayOutput
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_display.c b/src/via_display.c
index 61ce05c..a3b46ae 100644
--- a/src/via_display.c
+++ b/src/via_display.c
@@ -362,29 +362,6 @@ viaIGA2HWReset(ScrnInfoPtr pScrn, CARD8 resetState)
}
/*
- * Controls IGA2 display output on or off state.
- */
-static void
-viaIGA2DisplayOutput(ScrnInfoPtr pScrn, Bool outputState)
-{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaIGA2DisplayOutput.\n"));
-
- /* 3X5.6B[2] - IGA2 Screen Off
- * 0: Screen on
- * 1: Screen off */
- ViaCrtcMask(hwp, 0x6B, outputState ? 0x00 : 0x04, 0x04);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "IGA2 Display Output: %s\n",
- outputState ? "On" : "Off");
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaIGA2DisplayOutput.\n"));
-}
-
-/*
* Controls IGA2 display channel state.
*/
void
commit 6933748434fefa9fae20ebfda64e96800564ad80
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jun 17 19:23:11 2017 -0500
Added viaFPSetSecondaryPowerSeqType
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 0acc3ce..487ce93 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -461,8 +461,8 @@ viaFPSecondaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPSecondaryHardPowerSeq.\n"));
- /* Use hardware control power sequence. */
- hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFE);
+ /* Use hardware FP power sequence control. */
+ viaFPSetSecondaryPowerSeqType(pScrn, TRUE);
if (powerState) {
/* Turn on back light. */
diff --git a/src/via_ums.h b/src/via_ums.h
index 3c01fc3..81c8e8b 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -595,6 +595,23 @@ viaFPSetPrimaryHardPower(ScrnInfoPtr pScrn, Bool powerState)
}
/*
+ * Sets FP secondary power sequence control type.
+ */
+static inline void
+viaFPSetSecondaryPowerSeqType(ScrnInfoPtr pScrn, Bool ctrlType)
+{
+ /* 3X5.D3[0] - FP Secondary Power Sequence Control Type
+ * 0: Hardware Control
+ * 1: Software Control */
+ ViaCrtcMask(VGAHWPTR(pScrn), 0xD3, ctrlType ? 0x00 : BIT(0),
+ BIT(0));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FP Secondary Power Sequence Control Type: "
+ "%s Control\n",
+ ctrlType ? "Hardware" : "Software"));
+}
+
+/*
* Sets FPDP (Flat Panel Display Port) Low I/O pad state.
*/
static inline void
commit 61ec1cc4653ce24af7db1ea31dbb02907f2e3b34
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jun 17 19:17:18 2017 -0500
Renaming ViaLVDSHardwarePowerSecondSequence to viaFPSecondaryHardPowerSeq
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index d829995..0acc3ce 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -454,13 +454,17 @@ viaFPPrimaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
}
static void
-ViaLVDSHardwarePowerSecondSequence(ScrnInfoPtr pScrn, Bool on)
+viaFPSecondaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
- if (on) {
- /* Use hardware control power sequence. */
- hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFE);
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered viaFPSecondaryHardPowerSeq.\n"));
+
+ /* Use hardware control power sequence. */
+ hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0xFE);
+
+ if (powerState) {
/* Turn on back light. */
hwp->writeCrtc(hwp, 0xD3, hwp->readCrtc(hwp, 0xD3) & 0x3F);
/* Turn on hardware power sequence. */
@@ -472,6 +476,9 @@ ViaLVDSHardwarePowerSecondSequence(ScrnInfoPtr pScrn, Bool on)
/* Turn off back light. */
hwp->writeCrtc(hwp, 0xD3, 0xC0);
}
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting viaFPSecondaryHardPowerSeq.\n"));
}
static void
commit a5437b862114b9ffe5d71076980578b9c1d57089
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sat Jun 17 18:20:53 2017 -0500
Removing ViaLVDSHardwarePowerFirstSequence
viaFPPrimaryHardPowerSeq function already has the identical
functionality.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index ff576a7..d829995 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -454,27 +454,6 @@ viaFPPrimaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
}
static void
-ViaLVDSHardwarePowerFirstSequence(ScrnInfoPtr pScrn, Bool on)
-{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
- if (on) {
- /* Use hardware control power sequence. */
- hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0xFE);
- /* Turn on back light. */
- hwp->writeCrtc(hwp, 0x91, hwp->readCrtc(hwp, 0x91) & 0x3F);
- /* Turn on hardware power sequence. */
- hwp->writeCrtc(hwp, 0x6A, hwp->readCrtc(hwp, 0x6A) | 0x08);
- } else {
- /* Turn off power sequence. */
- hwp->writeCrtc(hwp, 0x6A, hwp->readCrtc(hwp, 0x6A) & 0xF7);
- usleep(1);
- /* Turn off back light. */
- hwp->writeCrtc(hwp, 0x91, 0xC0);
- }
-}
-
-static void
ViaLVDSHardwarePowerSecondSequence(ScrnInfoPtr pScrn, Bool on)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
@@ -533,7 +512,7 @@ viaFPPower(ScrnInfoPtr pScrn, int Chipset, CARD8 diPortType, Bool powerState)
break;
case VIA_VX855:
case VIA_VX900:
- ViaLVDSHardwarePowerFirstSequence(pScrn, powerState);
+ viaFPPrimaryHardPowerSeq(pScrn, powerState);
viaLVDS1SetPower(pScrn, powerState);
break;
default:
More information about the Openchrome-devel
mailing list