[openchrome-devel] xf86-video-openchrome: 2 commits - src/via_tmds.c src/via_tv.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Thu Dec 12 21:56:28 UTC 2019
src/via_tmds.c | 75 ++++++++++++++++++++++-----------------------------------
src/via_tv.c | 12 ++++++---
2 files changed, 37 insertions(+), 50 deletions(-)
New commits:
commit 527ccdc69cedecd484cce9f5abac3489112fe5c7
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Dec 12 15:56:14 2019 -0600
Suppress uninitialized variable compilation warnings
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_tmds.c b/src/via_tmds.c
index d9f4169..752dcbb 100644
--- a/src/via_tmds.c
+++ b/src/via_tmds.c
@@ -302,7 +302,8 @@ viaExtTMDSSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
+ CARD8 sr12, sr13;
+ CARD8 sr5a = 0x00;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaExtTMDSSetDisplaySource.\n"));
@@ -434,7 +435,8 @@ viaExtTMDSEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState)
vgaHWPtr hwp = VGAHWPTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
+ CARD8 sr12, sr13;
+ CARD8 sr5a = 0x00;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaExtTMDSEnableIOPads.\n"));
@@ -565,7 +567,8 @@ viaExtTMDSSetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
+ CARD8 sr12, sr13;
+ CARD8 sr5a = 0x00;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaExtTMDSSetClockDriveStrength.\n"));
@@ -656,7 +659,8 @@ viaExtTMDSSetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
+ CARD8 sr12, sr13;
+ CARD8 sr5a = 0x00;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaExtTMDSSetDataDriveStrength.\n"));
diff --git a/src/via_tv.c b/src/via_tv.c
index c5d1bcf..d70b810 100644
--- a/src/via_tv.c
+++ b/src/via_tv.c
@@ -46,7 +46,8 @@ viaTVSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
vgaHWPtr hwp = VGAHWPTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
+ CARD8 sr12, sr13;
+ CARD8 sr5a = 0x00;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaTVSetDisplaySource.\n"));
@@ -180,7 +181,8 @@ viaTVEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
+ CARD8 sr12, sr13;
+ CARD8 sr5a = 0x00;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaTVEnableIOPads.\n"));
@@ -314,7 +316,8 @@ viaTVSetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
+ CARD8 sr12, sr13;
+ CARD8 sr5a = 0x00;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaTVSetClockDriveStrength.\n"));
@@ -418,7 +421,8 @@ viaTVSetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
VIAPtr pVia = VIAPTR(pScrn);
- CARD8 sr12, sr13, sr5a;
+ CARD8 sr12, sr13;
+ CARD8 sr5a = 0x00;
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaTVSetDataDriveStrength.\n"));
commit d15ebd1d7093858c2e319f87d8d9d174a1a54a91
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Dec 12 15:55:56 2019 -0600
Stop checking for device support inside viaTMDSIOPadSetting()
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_tmds.c b/src/via_tmds.c
index 59994a2..d9f4169 100644
--- a/src/via_tmds.c
+++ b/src/via_tmds.c
@@ -214,18 +214,12 @@ viaTMDSIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaTMDSIOPadSetting.\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);
- }
+ 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,
@@ -234,38 +228,23 @@ viaTMDSIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"SR13: 0x%02X\n", sr13));
- switch (pVia->Chipset) {
- 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)))
- || (pVIADisplay->isVIANanoBook)) {
-
- viaLVDS1SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
- }
-
- break;
- default:
- break;
+ /*
+ * 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 & BIT(7))) && (sr13 & BIT(6))) ||
+ ((sr13 & BIT(7)) && (sr13 & BIT(6)))) ||
+ (pVIADisplay->isVIANanoBook)) {
+ viaLVDS1SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00);
}
- 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"));
- }
+ hwp->writeSeq(hwp, 0x5A, sr5a);
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Restoring 3C5.5A[0].\n"));
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Exiting viaTMDSIOPadSetting.\n"));
More information about the openchrome-devel
mailing list