[Openchrome-devel] xf86-video-openchrome: 5 commits - configure.ac src/via_fp.c src/via_tmds.c src/via_ums.h src/via_vt1632.c src/via_vt1632.h
Kevin Brace
kevinbrace at kemper.freedesktop.org
Fri Oct 13 06:49:51 UTC 2017
configure.ac | 2 -
src/via_fp.c | 19 +++++++-------
src/via_tmds.c | 73 ++++++++++++++++++++++++++++++++++++++++++++-----------
src/via_ums.h | 6 +++-
src/via_vt1632.c | 25 ++++++++++++++++++
src/via_vt1632.h | 2 -
6 files changed, 100 insertions(+), 27 deletions(-)
New commits:
commit 65659e383ed79689a13fa84f3f9192ec654ae20b
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Oct 12 23:47:50 2017 -0700
Version bumped to 0.6.162
Fix for VIA Technologies VT1632(A) DVI transmitter connected to I2C
bus 3 not getting recognized. Also, fix for VT1632(A) not restoring
the display after standby resume.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index 91e9c3b..ab6b421 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- [0.6.161],
+ [0.6.162],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 9e6cc4fd4a3ab8bcf707f83a3312ddc380d08f74
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Oct 12 23:47:19 2017 -0700
Fully implement VT1632(A) prepare and commit callbacks
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_vt1632.c b/src/via_vt1632.c
index 324b036..96e3d66 100644
--- a/src/via_vt1632.c
+++ b/src/via_vt1632.c
@@ -270,11 +270,33 @@ via_vt1632_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
static void
via_vt1632_prepare(xf86OutputPtr output)
{
+ ScrnInfoPtr pScrn = output->scrn;
+ VIAVT1632Ptr pVIAVT1632 = output->driver_private;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered %s.\n", __func__));
+
+ viaVT1632Power(pScrn, pVIAVT1632->VT1632I2CDev, FALSE);
+ viaExtTMDSIOPadState(pScrn, pVIAVT1632->diPort, FALSE);
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting %s.\n", __func__));
}
static void
via_vt1632_commit(xf86OutputPtr output)
{
+ ScrnInfoPtr pScrn = output->scrn;
+ VIAVT1632Ptr pVIAVT1632 = output->driver_private;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered %s.\n", __func__));
+
+ viaVT1632Power(pScrn, pVIAVT1632->VT1632I2CDev, TRUE);
+ viaExtTMDSIOPadState(pScrn, pVIAVT1632->diPort, TRUE);
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting %s.\n", __func__));
}
static void
commit 440a9803aef3359258102150b507a40689bb6db0
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Oct 12 22:46:48 2017 -0700
Actively control the state of external DVI transmitter's I/O port
Previously, the state of external DVI transmitter's I/O port was not
actively controlled from the DPMS callback. This led to DVI display
going blank after standby resume. This issue is now fixed.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_tmds.c b/src/via_tmds.c
index cd0bb60..a429b15 100644
--- a/src/via_tmds.c
+++ b/src/via_tmds.c
@@ -272,6 +272,53 @@ viaTMDSIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn)
}
void
+viaExtTMDSIOPadState(ScrnInfoPtr pScrn, uint32_t diPort, Bool ioPadOn)
+{
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered %s.\n", __func__));
+
+ switch(diPort) {
+ case VIA_DI_PORT_DVP0:
+ viaDVP0SetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
+ break;
+ case VIA_DI_PORT_DVP1:
+ viaDVP1SetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
+ break;
+ case VIA_DI_PORT_FPDPLOW:
+ viaFPDPLowSetIOPadState(pScrn, ioPadOn ? 0x03 : 0x00);
+ break;
+ 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;
+ }
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "DVI I/O Pad: %s\n",
+ ioPadOn ? "On": "Off");
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting %s.\n", __func__));
+}
+
+void
viaExtTMDSSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource)
{
vgaHWPtr hwp = VGAHWPTR(pScrn);
diff --git a/src/via_ums.h b/src/via_ums.h
index 0c58f42..5bcaa83 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -1580,6 +1580,8 @@ void viaFPProbe(ScrnInfoPtr pScrn);
void viaFPInit(ScrnInfoPtr pScrn);
/* via_tmds.c */
+void viaExtTMDSIOPadState(ScrnInfoPtr pScrn, uint32_t diPort,
+ Bool ioPadOn);
void viaExtTMDSSetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource);
void viaExtTMDSEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState);
void viaExtTMDSSetClockDriveStrength(ScrnInfoPtr pScrn,
diff --git a/src/via_vt1632.c b/src/via_vt1632.c
index c5739d5..324b036 100644
--- a/src/via_vt1632.c
+++ b/src/via_vt1632.c
@@ -30,6 +30,7 @@
#endif
#include "via_driver.h"
+#include "via_ums.h"
#include "via_vt1632.h"
static void
@@ -206,11 +207,13 @@ via_vt1632_dpms(xf86OutputPtr output, int mode)
switch (mode) {
case DPMSModeOn:
viaVT1632Power(pScrn, pVIAVT1632->VT1632I2CDev, TRUE);
+ viaExtTMDSIOPadState(pScrn, pVIAVT1632->diPort, TRUE);
break;
case DPMSModeStandby:
case DPMSModeSuspend:
case DPMSModeOff:
viaVT1632Power(pScrn, pVIAVT1632->VT1632I2CDev, FALSE);
+ viaExtTMDSIOPadState(pScrn, pVIAVT1632->diPort, FALSE);
break;
default:
break;
commit 46cdb37b99ba095f6ee5f239251b71d6911d269c
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Oct 12 22:44:38 2017 -0700
Fix the lack of I2C Bus 3 detection of VT1632(A) DVI transmitter
Due to programming errors, it was unlikely that VIA Technologies
VT1632(A) DVI transmitter connected to I2C Bus 3 will get recognized.
The detection algorithm was tweaked so that it should have a better
chance of getting detected now. The code was tested on MSI CN700T
mainboard.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_tmds.c b/src/via_tmds.c
index 2bbfe21..cd0bb60 100644
--- a/src/via_tmds.c
+++ b/src/via_tmds.c
@@ -1065,32 +1065,30 @@ viaExtTMDSProbe(ScrnInfoPtr pScrn)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaExtTMDSProbe.\n"));
- if (pVIADisplay->pI2CBus2) {
+ pVIADisplay->extTMDSPresence = FALSE;
+ pVIADisplay->extTMDSI2CBus = VIA_I2C_NONE;
+ pVIADisplay->extTMDSTransmitter = VIA_TMDS_NONE;
+
+ if ((!(pVIADisplay->extTMDSPresence)) &&
+ ((pVIADisplay->pI2CBus2) &&
+ (~(pVIADisplay->mappedI2CBus & VIA_I2C_BUS2)))) {
if (viaVT1632Probe(pScrn, pVIADisplay->pI2CBus2)) {
pVIADisplay->extTMDSPresence = TRUE;
pVIADisplay->extTMDSI2CBus = VIA_I2C_BUS2;
pVIADisplay->extTMDSTransmitter = VIA_TMDS_VT1632;
pVIADisplay->mappedI2CBus |= VIA_I2C_BUS2;
- } else {
- pVIADisplay->extTMDSPresence = FALSE;
- pVIADisplay->extTMDSI2CBus = VIA_I2C_NONE;
- pVIADisplay->extTMDSTransmitter = VIA_TMDS_NONE;
}
- } else if (pVIADisplay->pI2CBus3) {
+ }
+
+ if ((!(pVIADisplay->extTMDSPresence)) &&
+ ((pVIADisplay->pI2CBus3) &&
+ (~(pVIADisplay->mappedI2CBus & VIA_I2C_BUS3)))) {
if (viaVT1632Probe(pScrn, pVIADisplay->pI2CBus3)) {
pVIADisplay->extTMDSPresence = TRUE;
pVIADisplay->extTMDSI2CBus = VIA_I2C_BUS3;
pVIADisplay->extTMDSTransmitter = VIA_TMDS_VT1632;
pVIADisplay->mappedI2CBus |= VIA_I2C_BUS3;
- } else {
- pVIADisplay->extTMDSPresence = FALSE;
- pVIADisplay->extTMDSI2CBus = VIA_I2C_NONE;
- pVIADisplay->extTMDSTransmitter = VIA_TMDS_NONE;
}
- } else {
- pVIADisplay->extTMDSPresence = FALSE;
- pVIADisplay->extTMDSI2CBus = VIA_I2C_NONE;
- pVIADisplay->extTMDSTransmitter = VIA_TMDS_NONE;
}
sr12 = hwp->readSeq(hwp, 0x12);
commit 2b7b0ce6cd8a151ab3c57f904f40c38326758add
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Thu Oct 12 22:44:02 2017 -0700
Widen diPort variable to 32 bits
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index f349d7d..5518b4a 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -372,7 +372,8 @@ viaFPSecondaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
}
static void
-viaFPPower(ScrnInfoPtr pScrn, int Chipset, CARD16 diPort, Bool powerState)
+viaFPPower(ScrnInfoPtr pScrn, int Chipset, uint32_t diPort,
+ Bool powerState)
{
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPPower.\n"));
@@ -421,7 +422,7 @@ viaFPPower(ScrnInfoPtr pScrn, int Chipset, CARD16 diPort, Bool powerState)
}
static void
-viaFPIOPadState(ScrnInfoPtr pScrn, CARD16 diPort, Bool ioPadOn)
+viaFPIOPadState(ScrnInfoPtr pScrn, uint32_t diPort, Bool ioPadOn)
{
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPIOPadState.\n"));
@@ -468,7 +469,7 @@ viaFPIOPadState(ScrnInfoPtr pScrn, CARD16 diPort, Bool ioPadOn)
}
static void
-viaFPFormat(ScrnInfoPtr pScrn, CARD16 diPort, CARD8 format)
+viaFPFormat(ScrnInfoPtr pScrn, uint32_t diPort, CARD8 format)
{
CARD8 temp = format & 0x01;
@@ -496,7 +497,7 @@ viaFPFormat(ScrnInfoPtr pScrn, CARD16 diPort, CARD8 format)
}
static void
-viaFPOutputFormat(ScrnInfoPtr pScrn, CARD16 diPort, CARD8 outputFormat)
+viaFPOutputFormat(ScrnInfoPtr pScrn, uint32_t diPort, CARD8 outputFormat)
{
CARD8 temp = outputFormat & 0x01;
@@ -524,7 +525,7 @@ viaFPOutputFormat(ScrnInfoPtr pScrn, CARD16 diPort, CARD8 outputFormat)
}
static void
-viaFPDithering(ScrnInfoPtr pScrn, CARD16 diPort, Bool dithering)
+viaFPDithering(ScrnInfoPtr pScrn, uint32_t diPort, Bool dithering)
{
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPDithering.\n"));
@@ -553,7 +554,7 @@ viaFPDithering(ScrnInfoPtr pScrn, CARD16 diPort, Bool dithering)
* Set FP sync polarity.
*/
static void
-viaFPSyncPolarity(ScrnInfoPtr pScrn, CARD16 diPort, unsigned int flags)
+viaFPSyncPolarity(ScrnInfoPtr pScrn, uint32_t diPort, unsigned int flags)
{
CARD8 syncPolarity = 0x00;
@@ -609,7 +610,7 @@ viaFPSyncPolarity(ScrnInfoPtr pScrn, CARD16 diPort, unsigned int flags)
}
static void
-viaFPDisplaySource(ScrnInfoPtr pScrn, CARD16 diPort, int index)
+viaFPDisplaySource(ScrnInfoPtr pScrn, uint32_t diPort, int index)
{
CARD8 displaySource = index & 0x01;
@@ -901,7 +902,7 @@ viaGetClockRangeIndex(int Clock)
}
static void
-viaLoadDPA(ScrnInfoPtr pScrn, CARD16 diPort, VIADPAPtr pVIADPA)
+viaLoadDPA(ScrnInfoPtr pScrn, uint32_t diPort, VIADPAPtr pVIADPA)
{
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaLoadDPA.\n"));
@@ -943,7 +944,7 @@ exit:
static void
viaFPIOAdjustment(ScrnInfoPtr pScrn,
- int Chipset, CARD16 diPort, int Clock)
+ int Chipset, uint32_t diPort, int Clock)
{
VIAPtr pVia = VIAPTR(pScrn);
VIADPAInfoTablePtr pVIADPAInfoTable;
diff --git a/src/via_ums.h b/src/via_ums.h
index 4c964c2..0c58f42 100644
--- a/src/via_ums.h
+++ b/src/via_ums.h
@@ -278,12 +278,12 @@ typedef struct _VIAFP {
Bool scaleY;
int resY;
- CARD16 diPort;
+ uint32_t diPort;
CARD8 i2cBus;
} VIAFPRec, *VIAFPPtr;
typedef struct _VIATMDS {
- CARD16 diPort;
+ uint32_t diPort;
CARD8 i2cBus;
} VIATMDSRec, *VIATMDSPtr;
diff --git a/src/via_vt1632.h b/src/via_vt1632.h
index 6448fb7..a7fdee6 100644
--- a/src/via_vt1632.h
+++ b/src/via_vt1632.h
@@ -35,7 +35,7 @@
typedef struct _VIAVT1632 {
I2CDevPtr VT1632I2CDev;
- CARD16 diPort;
+ uint32_t diPort;
CARD8 i2cBus;
CARD8 transmitter;
More information about the Openchrome-devel
mailing list