[Openchrome-devel] xf86-video-openchrome: 11 commits - configure.ac src/via_fp.c
Kevin Brace
kevinbrace at kemper.freedesktop.org
Wed Jul 12 15:43:19 UTC 2017
configure.ac | 2
src/via_fp.c | 484 ++++++++++++++++++++++++++++++++---------------------------
2 files changed, 265 insertions(+), 221 deletions(-)
New commits:
commit 7bb76f09c5d84a3a53956149ac6b9c03ee505d24
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Jul 12 10:42:46 2017 -0500
Version bumped to 0.6.152
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index ace0b17..5cfb661 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ(2.57)
AC_INIT([xf86-video-openchrome],
- [0.6.151],
+ [0.6.152],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 6a90548c3f0bdc8b6fd037f76aa311b6fd573cf0
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Jul 12 10:38:41 2017 -0500
Rewrote viaFPCastleRockSoftPowerSeq
This function is untested since the developer does not own a
CLE266 chipset based computer with FP support.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 6e5603f..f36e42a 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -115,33 +115,51 @@ static DisplayModeRec OLPCMode = {
static void
viaFPCastleRockSoftPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPCastleRockSoftPowerSeq.\n"));
if (powerState) {
- ViaCrtcMask(hwp, 0x6A, BIT(3), BIT(3));
-
- ViaCrtcMask(hwp, 0x91, BIT(4), BIT(4));
+ /* Wait for 25 ms. */
usleep(25);
- ViaCrtcMask(hwp, 0x91, BIT(3), BIT(3));
+ /* Turn on FP VDD rail. */
+ viaFPSetPrimarySoftVDD(pScrn, TRUE);
+
+ /* Wait for 510 ms. */
usleep(510);
- ViaCrtcMask(hwp, 0x91, BIT(2) | BIT(1), BIT(2) | BIT(1));
+ /* Turn on FP data transmission. */
+ viaFPSetPrimarySoftData(pScrn, TRUE);
+
+ /* Wait for 1 ms. */
usleep(1);
+
+ /* Turn on FP VEE rail. */
+ viaFPSetPrimarySoftVEE(pScrn, TRUE);
+
+ /* Turn on FP back light. */
+ viaFPSetPrimarySoftBackLight(pScrn, TRUE);
} else {
- ViaCrtcMask(hwp, 0x6A, 0x00, BIT(3));
+ /* Wait for 1 ms. */
+ usleep(1);
+
+ /* Turn off FP back light. */
+ viaFPSetPrimarySoftBackLight(pScrn, FALSE);
+
+ /* Turn off FP VEE rail. */
+ viaFPSetPrimarySoftVEE(pScrn, FALSE);
- ViaCrtcMask(hwp, 0x91, 0x00, BIT(2) | BIT(1));
- usleep(210);
+ /* Wait for 510 ms. */
+ usleep(510);
+
+ /* Turn off FP data transmission. */
+ viaFPSetPrimarySoftData(pScrn, FALSE);
- ViaCrtcMask(hwp, 0x91, 0x00, BIT(3));
+ /* Wait for 25 ms. */
usleep(25);
- ViaCrtcMask(hwp, 0x91, 0x00, BIT(4));
- usleep(1);
+ /* Turn off FP VDD rail. */
+ viaFPSetPrimarySoftVDD(pScrn, FALSE);
}
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
commit 1aee6d7f56072db483296f1874ed599909757e71
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Jul 10 15:47:44 2017 -0500
Made minor comment related adjustments to via_fp.c
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 0d69c49..6e5603f 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -230,7 +230,7 @@ viaFPSecondarySoftPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
viaFPSetSecondaryPowerSeqType(pScrn, FALSE);
if (powerState) {
- /* Turn on FP Display Period. */
+ /* Turn on FP display period. */
viaFPSetSecondaryDirectDisplayPeriod(pScrn, TRUE);
/* Wait for TD0 ms. */
@@ -278,7 +278,7 @@ viaFPSecondarySoftPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
/* Turn off FP VDD rail. */
viaFPSetSecondarySoftVDD(pScrn, FALSE);
- /* Turn off FP Display Period. */
+ /* Turn off FP display period. */
viaFPSetSecondaryDirectDisplayPeriod(pScrn, FALSE);
}
@@ -296,7 +296,7 @@ viaFPPrimaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
viaFPSetPrimaryPowerSeqType(pScrn, TRUE);
if (powerState) {
- /* Turn on FP Display Period. */
+ /* Turn on FP display period. */
viaFPSetPrimaryDirectDisplayPeriod(pScrn, TRUE);
/* Turn on FP hardware power sequence. */
@@ -312,7 +312,7 @@ viaFPPrimaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
/* Turn off FP hardware power sequence. */
viaFPSetPrimaryHardPower(pScrn, FALSE);
- /* Turn on FP Display Period. */
+ /* Turn on FP display period. */
viaFPSetPrimaryDirectDisplayPeriod(pScrn, FALSE);
}
commit 822324baf92081b5197f2ccea7829cc00054fa70
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Jul 10 15:26:13 2017 -0500
Made adjustments to viaFPSecondaryHardPowerSeq
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 4f0cac7..0d69c49 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -330,23 +330,23 @@ viaFPSecondaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
viaFPSetSecondaryPowerSeqType(pScrn, TRUE);
if (powerState) {
- /* Turn on display period. */
+ /* Turn on FP display period. */
viaFPSetSecondaryDirectDisplayPeriod(pScrn, TRUE);
- /* Turn on back light. */
- viaFPSetSecondaryDirectBackLightCtrl(pScrn, TRUE);
-
- /* Turn on hardware power sequence. */
+ /* Turn on FP hardware power sequence. */
viaFPSetSecondaryHardPower(pScrn, TRUE);
- } else {
- /* Make sure display period is turned off. */
- viaFPSetSecondaryDirectDisplayPeriod(pScrn, FALSE);
- /* Make sure back light is turned off. */
+ /* Turn on FP back light. */
+ viaFPSetSecondaryDirectBackLightCtrl(pScrn, TRUE);
+ } else {
+ /* Turn off FP back light. */
viaFPSetSecondaryDirectBackLightCtrl(pScrn, FALSE);
- /* Turn off hardware power sequence. */
+ /* Turn off FP hardware power sequence. */
viaFPSetSecondaryHardPower(pScrn, FALSE);
+
+ /* Turn off FP display period. */
+ viaFPSetSecondaryDirectDisplayPeriod(pScrn, FALSE);
}
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
commit a3643b87a35ecdcd79768d93584d688e9e7f8ec8
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Jul 10 15:20:01 2017 -0500
Removing no longer necessary initialization of vgaHWPtr type pointer
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index b1e3d09..4f0cac7 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -220,8 +220,6 @@ viaFPPrimarySoftPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
static void
viaFPSecondarySoftPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPSecondarySoftPowerSeq.\n"));
@@ -325,8 +323,6 @@ viaFPPrimaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
static void
viaFPSecondaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
{
- vgaHWPtr hwp = VGAHWPTR(pScrn);
-
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPSecondaryHardPowerSeq.\n"));
commit 951e5960c52ac7caae92cc22ce24553d020c0aac
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Jul 10 14:56:59 2017 -0500
Keep FP hardware sequence off inside viaFPSecondarySoftPowerSeq
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 7c5fe6b..b1e3d09 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -225,13 +225,13 @@ viaFPSecondarySoftPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPSecondarySoftPowerSeq.\n"));
+ /* Turn off hardware power sequence. */
+ viaFPSetSecondaryHardPower(pScrn, FALSE);
+
/* Use software FP power sequence control. */
viaFPSetSecondaryPowerSeqType(pScrn, FALSE);
if (powerState) {
- /* Turn off FP hardware power sequence. */
- viaFPSetSecondaryHardPower(pScrn, FALSE);
-
/* Turn on FP Display Period. */
viaFPSetSecondaryDirectDisplayPeriod(pScrn, TRUE);
commit 9c12602f89223a4d941d785ac6ddcb1be71a457c
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Jul 10 14:24:47 2017 -0500
Keep FP hardware sequence off inside via_fp_primary_soft_power_seq
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 00f18bc..7c5fe6b 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -154,6 +154,9 @@ viaFPPrimarySoftPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Entered viaFPPrimarySoftPowerSeq.\n"));
+ /* Turn off FP hardware power sequence. */
+ viaFPSetPrimaryHardPower(pScrn, FALSE);
+
/* Use software FP power sequence control. */
viaFPSetPrimaryPowerSeqType(pScrn, FALSE);
commit 90b9124ff94b54f0d7a18ab794368a6e614a8154
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Mon Jul 10 14:07:47 2017 -0500
Made adjustments to viaFPPrimarySoftPowerSeq
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index b332ffd..00f18bc 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -158,32 +158,55 @@ viaFPPrimarySoftPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
viaFPSetPrimaryPowerSeqType(pScrn, FALSE);
if (powerState) {
+ /* Turn on FP Display Period. */
viaFPSetPrimaryDirectDisplayPeriod(pScrn, TRUE);
+
+ /* Wait for TD0 ms. */
usleep(TD0);
+ /* Turn on FP VDD rail. */
viaFPSetPrimarySoftVDD(pScrn, TRUE);
+
+ /* Wait for TD1 ms. */
usleep(TD1);
+ /* Turn on FP data transmission. */
viaFPSetPrimarySoftData(pScrn, TRUE);
+
+ /* Wait for TD2 ms. */
usleep(TD2);
- /* VEE On (unused on vt3353) */
+ /* Turn on FP VEE rail. */
viaFPSetPrimarySoftVEE(pScrn, TRUE);
+
+ /* Wait for TD3 ms. */
usleep(TD3);
+ /* Turn on FP back light. */
viaFPSetPrimarySoftBackLight(pScrn, TRUE);
} else {
+ /* Turn off FP back light. */
viaFPSetPrimarySoftBackLight(pScrn, FALSE);
+
+ /* Wait for TD3 ms. */
usleep(TD3);
- /* VEE Off (unused on vt3353) */
+ /* Turn off FP VEE rail. */
viaFPSetPrimarySoftVEE(pScrn, FALSE);
+
+ /* Wait for TD2 ms. */
usleep(TD2);
+ /* Turn off FP data transmission. */
viaFPSetPrimarySoftData(pScrn, FALSE);
+
+ /* Wait for TD1 ms. */
usleep(TD1);
+ /* Turn off FP VDD rail. */
viaFPSetPrimarySoftVDD(pScrn, FALSE);
+
+ /* Turn off FP Display Period. */
viaFPSetPrimaryDirectDisplayPeriod(pScrn, FALSE);
}
commit b4554338bd69a2ad13a74317128e4514cd11ce80
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Sun Jul 9 18:11:05 2017 -0500
Made adjustments to viaFPPrimaryHardPowerSeq
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 6605222..b332ffd 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -272,23 +272,24 @@ viaFPPrimaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
viaFPSetPrimaryPowerSeqType(pScrn, TRUE);
if (powerState) {
- /* Power on FP. */
+ /* Turn on FP Display Period. */
+ viaFPSetPrimaryDirectDisplayPeriod(pScrn, TRUE);
+
+ /* Turn on FP hardware power sequence. */
viaFPSetPrimaryHardPower(pScrn, TRUE);
- /* Make sure back light is turned on. */
+ /* Turn on FP back light. */
viaFPSetPrimaryDirectBackLightCtrl(pScrn, TRUE);
- /* Make sure display period is turned on. */
- viaFPSetPrimaryDirectDisplayPeriod(pScrn, TRUE);
} else {
- /* Make sure display period is turned off. */
- viaFPSetPrimaryDirectDisplayPeriod(pScrn, FALSE);
-
- /* Make sure back light is turned off. */
+ /* Turn off FP back light. */
viaFPSetPrimaryDirectBackLightCtrl(pScrn, FALSE);
- /* Power off FP. */
+ /* Turn off FP hardware power sequence. */
viaFPSetPrimaryHardPower(pScrn, FALSE);
+
+ /* Turn on FP Display Period. */
+ viaFPSetPrimaryDirectDisplayPeriod(pScrn, FALSE);
}
DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
commit ff409b8d4f3b19dcb7247c0762345064a0ad270c
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jul 7 13:54:43 2017 -0500
Moving functions around via_fp.c.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index 7e74298..6605222 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -105,185 +105,6 @@ static DisplayModeRec OLPCMode = {
#define TD2 0
#define TD3 25
-static void
-viaFPIOPadState(ScrnInfoPtr pScrn, CARD16 diPort, Bool ioPadOn)
-{
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaFPIOPadState.\n"));
-
- 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,
- "FP I/O Pad: %s\n",
- ioPadOn ? "On": "Off");
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaFPIOPadState.\n"));
-}
-
-static void
-viaFPFormat(ScrnInfoPtr pScrn, CARD16 diPort, CARD8 format)
-{
- CARD8 temp = format & 0x01;
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaFPFormat.\n"));
-
- switch(diPort) {
- case VIA_DI_PORT_LVDS1:
- viaLVDS1SetFormat(pScrn, temp);
- break;
- case VIA_DI_PORT_LVDS2:
- viaLVDS2SetFormat(pScrn, temp);
- break;
- case (VIA_DI_PORT_LVDS1 |
- VIA_DI_PORT_LVDS2):
- viaLVDS1SetFormat(pScrn, temp);
- viaLVDS2SetFormat(pScrn, temp);
- break;
- default:
- break;
- }
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaFPFormat.\n"));
-}
-
-static void
-viaFPOutputFormat(ScrnInfoPtr pScrn, CARD16 diPort, CARD8 outputFormat)
-{
- CARD8 temp = outputFormat & 0x01;
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaFPOutputFormat.\n"));
-
- switch(diPort) {
- case VIA_DI_PORT_LVDS1:
- viaLVDS1SetOutputFormat(pScrn, temp);
- break;
- case VIA_DI_PORT_LVDS2:
- viaLVDS2SetOutputFormat(pScrn, temp);
- break;
- case (VIA_DI_PORT_LVDS1 |
- VIA_DI_PORT_LVDS2):
- viaLVDS1SetOutputFormat(pScrn, temp);
- viaLVDS2SetOutputFormat(pScrn, temp);
- break;
- default:
- break;
- }
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaFPOutputFormat.\n"));
-}
-
-static void
-viaFPDithering(ScrnInfoPtr pScrn, CARD16 diPort, Bool dithering)
-{
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaFPDithering.\n"));
-
- switch(diPort) {
- case VIA_DI_PORT_LVDS1:
- viaLVDS1SetDithering(pScrn, dithering);
- break;
- case VIA_DI_PORT_LVDS2:
- viaLVDS2SetDithering(pScrn, dithering);
- break;
- case (VIA_DI_PORT_LVDS1 |
- VIA_DI_PORT_LVDS2):
- viaLVDS1SetDithering(pScrn, dithering);
- viaLVDS2SetDithering(pScrn, dithering);
- break;
- default:
- break;
- }
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaFPDithering.\n"));
-}
-
-static void
-viaFPDisplaySource(ScrnInfoPtr pScrn, CARD16 diPort, int index)
-{
- CARD8 displaySource = index & 0x01;
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Entered viaFPDisplaySource.\n"));
-
- switch(diPort) {
- case VIA_DI_PORT_DVP0:
- viaDVP0SetDisplaySource(pScrn, displaySource);
- break;
- case VIA_DI_PORT_DVP1:
- viaDVP1SetDisplaySource(pScrn, displaySource);
- break;
- case VIA_DI_PORT_FPDPLOW:
- viaFPDPLowSetDisplaySource(pScrn, displaySource);
- viaDVP1SetDisplaySource(pScrn, displaySource);
- break;
- case VIA_DI_PORT_FPDPHIGH:
- viaFPDPHighSetDisplaySource(pScrn, displaySource);
- viaDVP0SetDisplaySource(pScrn, displaySource);
- break;
- case (VIA_DI_PORT_FPDPLOW |
- VIA_DI_PORT_FPDPHIGH):
- viaFPDPLowSetDisplaySource(pScrn, displaySource);
- viaFPDPHighSetDisplaySource(pScrn, displaySource);
- break;
- case VIA_DI_PORT_LVDS1:
- viaLVDS1SetDisplaySource(pScrn, displaySource);
- break;
- case VIA_DI_PORT_LVDS2:
- viaLVDS2SetDisplaySource(pScrn, displaySource);
- break;
- case (VIA_DI_PORT_LVDS1 |
- VIA_DI_PORT_LVDS2):
- viaLVDS1SetDisplaySource(pScrn, displaySource);
- viaLVDS2SetDisplaySource(pScrn, displaySource);
- break;
- default:
- break;
- }
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "FP Display Source: IGA%d\n",
- displaySource + 1);
-
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Exiting viaFPDisplaySource.\n"));
-}
-
/*
* This software controlled FP power on / off sequence code is
* for CLE266's IGP which was codenamed Castle Rock. The code is
@@ -558,6 +379,185 @@ viaFPPower(ScrnInfoPtr pScrn, int Chipset, CARD16 diPort, Bool powerState)
"Exiting viaFPPower.\n"));
}
+static void
+viaFPIOPadState(ScrnInfoPtr pScrn, CARD16 diPort, Bool ioPadOn)
+{
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered viaFPIOPadState.\n"));
+
+ 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,
+ "FP I/O Pad: %s\n",
+ ioPadOn ? "On": "Off");
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting viaFPIOPadState.\n"));
+}
+
+static void
+viaFPFormat(ScrnInfoPtr pScrn, CARD16 diPort, CARD8 format)
+{
+ CARD8 temp = format & 0x01;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered viaFPFormat.\n"));
+
+ switch(diPort) {
+ case VIA_DI_PORT_LVDS1:
+ viaLVDS1SetFormat(pScrn, temp);
+ break;
+ case VIA_DI_PORT_LVDS2:
+ viaLVDS2SetFormat(pScrn, temp);
+ break;
+ case (VIA_DI_PORT_LVDS1 |
+ VIA_DI_PORT_LVDS2):
+ viaLVDS1SetFormat(pScrn, temp);
+ viaLVDS2SetFormat(pScrn, temp);
+ break;
+ default:
+ break;
+ }
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting viaFPFormat.\n"));
+}
+
+static void
+viaFPOutputFormat(ScrnInfoPtr pScrn, CARD16 diPort, CARD8 outputFormat)
+{
+ CARD8 temp = outputFormat & 0x01;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered viaFPOutputFormat.\n"));
+
+ switch(diPort) {
+ case VIA_DI_PORT_LVDS1:
+ viaLVDS1SetOutputFormat(pScrn, temp);
+ break;
+ case VIA_DI_PORT_LVDS2:
+ viaLVDS2SetOutputFormat(pScrn, temp);
+ break;
+ case (VIA_DI_PORT_LVDS1 |
+ VIA_DI_PORT_LVDS2):
+ viaLVDS1SetOutputFormat(pScrn, temp);
+ viaLVDS2SetOutputFormat(pScrn, temp);
+ break;
+ default:
+ break;
+ }
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting viaFPOutputFormat.\n"));
+}
+
+static void
+viaFPDithering(ScrnInfoPtr pScrn, CARD16 diPort, Bool dithering)
+{
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered viaFPDithering.\n"));
+
+ switch(diPort) {
+ case VIA_DI_PORT_LVDS1:
+ viaLVDS1SetDithering(pScrn, dithering);
+ break;
+ case VIA_DI_PORT_LVDS2:
+ viaLVDS2SetDithering(pScrn, dithering);
+ break;
+ case (VIA_DI_PORT_LVDS1 |
+ VIA_DI_PORT_LVDS2):
+ viaLVDS1SetDithering(pScrn, dithering);
+ viaLVDS2SetDithering(pScrn, dithering);
+ break;
+ default:
+ break;
+ }
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting viaFPDithering.\n"));
+}
+
+static void
+viaFPDisplaySource(ScrnInfoPtr pScrn, CARD16 diPort, int index)
+{
+ CARD8 displaySource = index & 0x01;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Entered viaFPDisplaySource.\n"));
+
+ switch(diPort) {
+ case VIA_DI_PORT_DVP0:
+ viaDVP0SetDisplaySource(pScrn, displaySource);
+ break;
+ case VIA_DI_PORT_DVP1:
+ viaDVP1SetDisplaySource(pScrn, displaySource);
+ break;
+ case VIA_DI_PORT_FPDPLOW:
+ viaFPDPLowSetDisplaySource(pScrn, displaySource);
+ viaDVP1SetDisplaySource(pScrn, displaySource);
+ break;
+ case VIA_DI_PORT_FPDPHIGH:
+ viaFPDPHighSetDisplaySource(pScrn, displaySource);
+ viaDVP0SetDisplaySource(pScrn, displaySource);
+ break;
+ case (VIA_DI_PORT_FPDPLOW |
+ VIA_DI_PORT_FPDPHIGH):
+ viaFPDPLowSetDisplaySource(pScrn, displaySource);
+ viaFPDPHighSetDisplaySource(pScrn, displaySource);
+ break;
+ case VIA_DI_PORT_LVDS1:
+ viaLVDS1SetDisplaySource(pScrn, displaySource);
+ break;
+ case VIA_DI_PORT_LVDS2:
+ viaLVDS2SetDisplaySource(pScrn, displaySource);
+ break;
+ case (VIA_DI_PORT_LVDS1 |
+ VIA_DI_PORT_LVDS2):
+ viaLVDS1SetDisplaySource(pScrn, displaySource);
+ viaLVDS2SetDisplaySource(pScrn, displaySource);
+ break;
+ default:
+ break;
+ }
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "FP Display Source: IGA%d\n",
+ displaySource + 1);
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Exiting viaFPDisplaySource.\n"));
+}
+
/*
* Try to interpret EDID ourselves.
*/
commit 01ab0dd74a2b237e9e687319226e9c119bdb323e
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Fri Jul 7 00:33:39 2017 -0500
Added display period control to FP secondary DPMS
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_fp.c b/src/via_fp.c
index fb14872..7e74298 100644
--- a/src/via_fp.c
+++ b/src/via_fp.c
@@ -486,6 +486,9 @@ viaFPSecondaryHardPowerSeq(ScrnInfoPtr pScrn, Bool powerState)
viaFPSetSecondaryPowerSeqType(pScrn, TRUE);
if (powerState) {
+ /* Turn on display period. */
+ viaFPSetSecondaryDirectDisplayPeriod(pScrn, TRUE);
+
/* Turn on back light. */
viaFPSetSecondaryDirectBackLightCtrl(pScrn, TRUE);
More information about the Openchrome-devel
mailing list