[Openchrome-devel] xf86-video-openchrome: 6 commits - configure.ac src/via_fp.c src/via_ums.h
Kevin Brace
kevinbrace at kemper.freedesktop.org
Fri Jun 9 12:27:50 UTC 2017
configure.ac | 2
src/via_fp.c | 171 ++++++++++------------------------------------------------
src/via_ums.h | 40 +++++++++++++
3 files changed, 73 insertions(+), 140 deletions(-)
New commits:
commit 2d217f9f1ca281b136c9ea1768554161aa0f17be
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jun 9 05:25:53 2017 -0700
Version bumped to 0.6.131
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index 2fac114..0710a36 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- [0.6.130],
+ [0.6.131],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 6922b7f887cbad5916548e59b6785554cc31f7c7
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jun 9 05:18:46 2017 -0700
Updated viaFPIOPadSetting
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 2788ada..400b866 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -402,111 +402,47 @@ viaLVDS2SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat)
}
static void
-viaFPIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn)
+viaFPIOPadSetting(ScrnInfoPtr pScrn, CARD8 diPort, Bool ioPadOn)
{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
- VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
-
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPIOPadSetting.\n"));
- if ((pVia->Chipset == VIA_CX700)
- || (pVia->Chipset == VIA_VX800)
- || (pVia->Chipset == VIA_VX855)
- || (pVia->Chipset == VIA_VX900)) {
-
- sr5a = hwp->readSeq(hwp, 0x5A);
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "SR5A: 0x%02X\n", sr5a));
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Setting 3C5.5A[0] to 0.\n"));
- ViaSeqMask(hwp, 0x5A, sr5a & 0xFE, 0x01);
- }
-
- sr12 = hwp->readSeq(hwp, 0x12);
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "SR12: 0x%02X\n", sr12));
- sr13 = hwp->readSeq(hwp, 0x13);
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "SR13: 0x%02X\n", sr13));
-
- switch (pVia->Chipset) {
- case VIA_CLE266:
+ switch(diPort) {
+ case VIA_DI_PORT_DVP0:
+ viaDVP0SetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
break;
- case VIA_KM400:
- case VIA_K8M800:
- case VIA_PM800:
- case VIA_P4M800PRO:
+ case VIA_DI_PORT_DVP1:
+ viaDVP1SetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
break;
- case VIA_P4M890:
- case VIA_K8M890:
- case VIA_P4M900:
- /* The tricky thing about VIA Technologies PCI Express based
- * north bridge / south bridge 2 chip chipset is that
- * it pin multiplexes DVP0 / DVP1 with north bridge's PCI
- * Express x16 link. In particular, HP 2133 Mini-Note's WLAN
- * is connected to north bridge's PCI Express Lane 0, but the
- * Lane 0 is also pin multiplexed with DVP0. What this means is
- * turning on DVP0 without probing the relevant strapping pin
- * to determine the connected panel interface type will lead to
- * the PCIe based WLAN to getting disabled by OpenChrome DDX
- * when X.Org Server starts.
- * The current remedy for this will be to turn on DVP0
- * only when an 18-bit / 24-bit interface flat panel is
- * connected. */
- /* 3C5.12[4] - DVP0D4 pin strapping
- * 0: Use DVP1 only for a flat panel.
- * 1: Use DVP0 and DVP1 for a flat panel */
- if (sr12 & 0x10) {
- /* Since an 18-bit / 24-bit flat panel is being used, actively
- * control DVP0. */
- viaFPDPHighSetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
- } else {
- /* Keep DVP0 powered down. Otherwise, it will interfere with
- * PCIe Lane 0 through 7. */
- viaFPDPHighSetIOPadState(pScrn, 0x00);
- }
-
- /* Control DVP1 for a flat panel. */
+ case VIA_DI_PORT_FPDPLOW:
viaFPDPLowSetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
break;
- case VIA_CX700:
- case VIA_VX800:
- case VIA_VX855:
- case VIA_VX900:
- /* 3C5.13[7:6] - DVP1D15 and DVP1D14 pin strappings
- * 00: LVDS1 + LVDS2
- * 01: DVI + LVDS2
- * 10: Dual LVDS (LVDS1 + LVDS2 used
- * simultaneously)
- * 11: DVI only */
- if ((((~(sr13 & 0x80)) && (~(sr13 & 0x40)))
- || ((sr13 & 0x80) && (~(sr13 & 0x40))))
- && (!pVia->isVIANanoBook)) {
-
- viaLVDS1SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
- }
-
- if (((~(sr13 & 0x80)) || (~(sr13 & 0x40)))
- || (pVia->isVIANanoBook)) {
-
- viaLVDS2SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
- }
+ case VIA_DI_PORT_FPDPHIGH:
+ viaFPDPHighSetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
+ break;
+ case (VIA_DI_PORT_FPDPLOW |
+ VIA_DI_PORT_FPDPHIGH):
+ viaFPDPLowSetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
+ viaFPDPHighSetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
+ break;
+ case VIA_DI_PORT_LVDS1:
+ viaLVDS1SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
+ break;
+ case VIA_DI_PORT_LVDS2:
+ viaLVDS2SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
+ break;
+ case (VIA_DI_PORT_LVDS1 |
+ VIA_DI_PORT_LVDS2):
+ viaLVDS1SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
+ viaLVDS2SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
break;
default:
break;
}
- if ((pVia->Chipset == VIA_CX700)
- || (pVia->Chipset == VIA_VX800)
- || (pVia->Chipset == VIA_VX855)
- || (pVia->Chipset == VIA_VX900)) {
-
- hwp->writeSeq(hwp, 0x5A, sr5a);
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Restoring 3C5.5A[0].\n"));
- }
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FP I/O Pad: %s\n",
+ ioPadOn ? "On": "Off");
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Exiting viaFPIOPadSetting.\n"));
@@ -1064,6 +1000,7 @@ via_fp_dpms(xf86OutputPtr output, int mode)
{
ScrnInfoPtr pScrn = output->scrn;
VIAPtr pVia = VIAPTR(pScrn);
+ VIAFPPtr pVIAFP = (VIAFPPtr) output->driver_private;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered via_fp_dpms.\n"));
@@ -1093,7 +1030,7 @@ via_fp_dpms(xf86OutputPtr output, int mode)
break;
}
- viaFPIOPadSetting(pScrn, TRUE);
+ viaFPIOPadSetting(pScrn, pVIAFP->diPort, TRUE);
break;
case DPMSModeStandby:
case DPMSModeSuspend:
@@ -1121,7 +1058,7 @@ via_fp_dpms(xf86OutputPtr output, int mode)
break;
}
- viaFPIOPadSetting(pScrn, FALSE);
+ viaFPIOPadSetting(pScrn, pVIAFP->diPort, FALSE);
break;
default:
break;
commit 043c88a17fbe9ba0ffe14a3e429a2e8d6452e9a3
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jun 9 04:48:50 2017 -0700
Converting viaFPDPHighSetIOPadState to an inline function
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 2a25662..2788ada 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -401,34 +401,6 @@ viaLVDS2SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat)
"Exiting viaLVDS2SetOutputFormat.\n"));
}
-/*
- * Sets FPDP (Flat Panel Display Port) High I/O pad state
- */
-static void
-viaFPDPHighSetIOPadState(ScrnInfoPtr pScrn, CARD8 ioPadState)
-{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaFPDPHighSetIOPadState.\n"));
-
- /* 3C5.2A[3:2] - FPDP High Power Control
- * 0x: Pad always off
- * 10: Depend on the other control signal
- * 11: Pad on/off according to the
- * Power Management Status (PMS) */
- ViaSeqMask(hwp, 0x2A, ioPadState << 2, BIT(3) | BIT(2));
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "FPDP High I/O Pad State: %s\n",
- ((ioPadState & (BIT(1) | BIT(0))) == 0x03) ? "On" :
- ((ioPadState & (BIT(1) | BIT(0))) == 0x02) ? "Conditional" :
- ((ioPadState & (BIT(1) | BIT(0))) == 0x01) ? "Off" :
- "Off"));
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaFPDPHighSetIOPadState.\n"));
-}
-
static void
viaFPIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn)
{
diff --git a/src/via_ums.h b/src/via_ums.h
index 0ff147c..66296a6 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -536,6 +536,26 @@ viaFPDPLowSetIOPadState(ScrnInfoPtr pScrn, CARD8 ioPadState)
}
/*
+ * Sets FPDP (Flat Panel Display Port) High I/O pad state
+ */
+static inline void
+viaFPDPHighSetIOPadState(ScrnInfoPtr pScrn, CARD8 ioPadState)
+{
+ /* 3C5.2A[3:2] - FPDP High Power Control
+ * 0x: Pad always off
+ * 10: Depend on the other control signal
+ * 11: Pad on/off according to the
+ * Power Management Status (PMS) */
+ ViaSeqMask(VGAHWPTR(pScrn), 0x2A, ioPadState << 2, BIT(3) | BIT(2));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FPDP High I/O Pad State: %s\n",
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x03) ? "On" :
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x02) ? "Conditional" :
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x01) ? "Off" :
+ "Off"));
+}
+
+/*
* Sets CX700 or later chipset's LVDS1 power state.
*/
static inline void
commit a24b75c4582c131e0afee1c347b4843272e9e0df
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jun 9 04:25:15 2017 -0700
Changed viaDVP0PCIeSetIOPadSetting to viaFPDPHighSetIOPadState
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 779988b..2a25662 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -402,25 +402,31 @@ viaLVDS2SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat)
}
/*
- * Sets PCIe based 2 chip chipset's pin multiplexed DVP0 I/O pad state.
+ * Sets FPDP (Flat Panel Display Port) High I/O pad state
*/
static void
-viaDVP0PCIeSetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState)
+viaFPDPHighSetIOPadState(ScrnInfoPtr pScrn, CARD8 ioPadState)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaDVP0PCIeSetIOPadSetting.\n"));
-
- /* Set pin multiplexed DVP1 I/O pad state. */
- /* 3C5.2A[3:2] - DVP0 I/O Pad Control */
- ViaSeqMask(hwp, 0x2A, ioPadState << 2, 0x0C);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "DVP0 I/O Pad State: %d\n",
- (ioPadState & 0x03));
+ "Entered viaFPDPHighSetIOPadState.\n"));
+
+ /* 3C5.2A[3:2] - FPDP High Power Control
+ * 0x: Pad always off
+ * 10: Depend on the other control signal
+ * 11: Pad on/off according to the
+ * Power Management Status (PMS) */
+ ViaSeqMask(hwp, 0x2A, ioPadState << 2, BIT(3) | BIT(2));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FPDP High I/O Pad State: %s\n",
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x03) ? "On" :
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x02) ? "Conditional" :
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x01) ? "Off" :
+ "Off"));
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaDVP0PCIeSetIOPadSetting.\n"));
+ "Exiting viaFPDPHighSetIOPadState.\n"));
}
static void
@@ -483,11 +489,11 @@ viaFPIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn)
if (sr12 & 0x10) {
/* Since an 18-bit / 24-bit flat panel is being used, actively
* control DVP0. */
- viaDVP0PCIeSetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
+ viaFPDPHighSetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
} else {
/* Keep DVP0 powered down. Otherwise, it will interfere with
* PCIe Lane 0 through 7. */
- viaDVP0PCIeSetIOPadSetting(pScrn, 0x00);
+ viaFPDPHighSetIOPadState(pScrn, 0x00);
}
/* Control DVP1 for a flat panel. */
commit d937936a84b80e9cf2c89d63fb1aa1481f0ccf92
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jun 9 04:18:26 2017 -0700
Converting viaFPDPLowSetIOPadState to an inline function
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index e18d81e..779988b 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -423,27 +423,6 @@ viaDVP0PCIeSetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState)
"Exiting viaDVP0PCIeSetIOPadSetting.\n"));
}
-/*
- * Sets FPDP (Flat Panel Display Port) Low I/O pad state.
- */
-static void
-viaFPDPLowSetIOPadState(ScrnInfoPtr pScrn, CARD8 ioPadState)
-{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaFPDPLowSetIOPadState.\n"));
-
- /* 3C5.2A[1:0] - DVP1 I/O Pad Control */
- ViaSeqMask(hwp, 0x2A, ioPadState, 0x03);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "DVP1 I/O Pad State: %d\n",
- (ioPadState & 0x03));
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaFPDPLowSetIOPadState.\n"));
-}
-
static void
viaFPIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn)
{
diff --git a/src/via_ums.h b/src/via_ums.h
index d3e6f7e..0ff147c 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -516,6 +516,26 @@ viaFPSetPrimaryHardPower(ScrnInfoPtr pScrn, Bool powerState)
}
/*
+ * Sets FPDP (Flat Panel Display Port) Low I/O pad state.
+ */
+static inline void
+viaFPDPLowSetIOPadState(ScrnInfoPtr pScrn, CARD8 ioPadState)
+{
+ /* 3C5.2A[1:0] - FPDP Low Power Control
+ * 0x: Pad always off
+ * 10: Depend on the other control signal
+ * 11: Pad on/off according to the
+ * Power Management Status (PMS) */
+ ViaSeqMask(VGAHWPTR(pScrn), 0x2A, ioPadState, BIT(1) | BIT(0));
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FPDP Low I/O Pad State: %s\n",
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x03) ? "On" :
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x02) ? "Conditional" :
+ ((ioPadState & (BIT(1) | BIT(0))) == 0x01) ? "Off" :
+ "Off"));
+}
+
+/*
* Sets CX700 or later chipset's LVDS1 power state.
*/
static inline void
commit dc697cf23b1ec77455bffe2188305a310648e746
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jun 9 04:06:28 2017 -0700
Changed viaDVP1PCIeSetIOPadSetting to viaFPDPLowSetIOPadState
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 813236e..e18d81e 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -424,17 +424,16 @@ viaDVP0PCIeSetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState)
}
/*
- * Sets PCIe based 2 chip chipset's pin multiplexed DVP1 I/O pad state.
+ * Sets FPDP (Flat Panel Display Port) Low I/O pad state.
*/
static void
-viaDVP1PCIeSetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState)
+viaFPDPLowSetIOPadState(ScrnInfoPtr pScrn, CARD8 ioPadState)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaDVP1PCIeSetIOPadSetting.\n"));
+ "Entered viaFPDPLowSetIOPadState.\n"));
- /* Set pin multiplexed DVP0 I/O pad state. */
/* 3C5.2A[1:0] - DVP1 I/O Pad Control */
ViaSeqMask(hwp, 0x2A, ioPadState, 0x03);
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -442,7 +441,7 @@ viaDVP1PCIeSetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState)
(ioPadState & 0x03));
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaDVP1PCIeSetIOPadSetting.\n"));
+ "Exiting viaFPDPLowSetIOPadState.\n"));
}
static void
@@ -513,7 +512,7 @@ viaFPIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn)
}
/* Control DVP1 for a flat panel. */
- viaDVP1PCIeSetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
+ viaFPDPLowSetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
break;
case VIA_CX700:
case VIA_VX800:
More information about the Openchrome-devel
mailing list