configure.ac | 2 - src/via_tmds.c | 50 +++++++++---------------------- src/via_ums.h | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 107 insertions(+), 36 deletions(-)
New commits: commit 6f415917a664c25f32158bc9e3fd15df8e4f8580 Author: Kevin Brace <kevinbr...@gmx.com> Date: Wed Mar 29 01:23:14 2017 -0700 Version bumped to 0.6.101 Rewrote viaTMDSPower function with new inline functions. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/configure.ac b/configure.ac index 7a5eac3..3f27feb 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ(2.57) AC_INIT([xf86-video-openchrome], - [0.6.100], + [0.6.101], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome], [xf86-video-openchrome]) commit ccddad13c6cca0655c86b94452f06e836e97b6ac Author: Kevin Brace <kevinbr...@gmx.com> Date: Wed Mar 29 01:22:08 2017 -0700 Rewrite of viaTMDSPower Using the new inline functions. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_tmds.c b/src/via_tmds.c index 9543665..d01808f 100644 --- a/src/via_tmds.c +++ b/src/via_tmds.c @@ -210,55 +210,35 @@ viaTMDSSense(ScrnInfoPtr pScrn) return tmdsReceiverDetected; } +/* + * Sets integrated TMDS (DVI) monitor power state. + */ static void viaTMDSPower(ScrnInfoPtr pScrn, Bool powerState) { - vgaHWPtr hwp = VGAHWPTR(pScrn); - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Entered viaTMDSPower.\n")); if (powerState) { - /* 3X5.91[7] - Software Direct On / Off Display Period - in the Panel Path - 0: On - 1: Off */ - ViaCrtcMask(hwp, 0x91, 0x00, 0x80); - - /* 3X5.91[0] - Hardware or Software Control Power Sequence - 1: Software Control */ - ViaCrtcMask(hwp, 0x91, 0x01, 0x01); - + viaLVDS1SetSoftDisplayPeriod(pScrn, TRUE); + viaLVDS1SetPowerSeq(pScrn, TRUE); usleep(TD0); - - /* 3X5.91[4] - Software VDD On - 0: Off - 1: On */ - ViaCrtcMask(hwp, 0x91, 0x10, 0x10); - + viaLVDS1SetSoftVdd(pScrn, TRUE); usleep(TD1); - - /* 3X5.91[3] - Software Data On - 0: Off - 1: On */ - ViaCrtcMask(hwp, 0x91, 0x08, 0x08); - - /* 3X5.D2[3] - Power Down (Active High) for DVI - * 0: TMDS power on - * 1: TMDS power down */ - ViaCrtcMask(hwp, 0xD2, 0x00, 0x08); + viaLVDS1SetSoftData(pScrn, TRUE); + viaTMDSSetPower(pScrn, TRUE); } else { - ViaCrtcMask(hwp, 0xD2, 0x08, 0x08); - - ViaCrtcMask(hwp, 0x91, 0x00, 0x08); - + viaLVDS1SetPowerSeq(pScrn, TRUE); + viaTMDSSetPower(pScrn, FALSE); + viaLVDS1SetSoftData(pScrn, FALSE); usleep(TD1); - - ViaCrtcMask(hwp, 0x91, 0x00, 0x10); + viaLVDS1SetSoftVdd(pScrn, FALSE); + usleep(TD0); + viaLVDS1SetSoftDisplayPeriod(pScrn, FALSE); } xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Integrated TMDS (DVI) Power: %s\n", + "DVI Monitor Power: %s\n", powerState ? "On" : "Off"); DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, commit 3526fcad9ecc3a48971ce579e581481f937ed00f Author: Kevin Brace <kevinbr...@gmx.com> Date: Wed Mar 29 00:31:51 2017 -0700 Added viaTMDSSetPower This inline function was added to via_ums.h. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_ums.h b/src/via_ums.h index 6b44d01..6c4d7b2 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -280,6 +280,23 @@ viaLVDS1SetSoftDisplayPeriod(ScrnInfoPtr pScrn, Bool softOn) softOn ? "On" : "Off"); } +/* + * Sets CX700 / VX700 and VX800 chipsets' TMDS (DVI) power state. + */ +static inline void +viaTMDSSetPower(ScrnInfoPtr pScrn, Bool powerState) +{ + /* Set TMDS (DVI) power state. */ + /* 3X5.D2[3] - Power Down (Active High) for DVI + * 0: TMDS power on + * 1: TMDS power down */ + ViaCrtcMask(VGAHWPTR(pScrn), 0xD2, powerState ? 0 : BIT(3), + BIT(3)); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "TMDS (DVI) Power State: %s\n", + powerState ? "On" : "Off"); +} + /* via_ums.c */ void viaUnmapMMIO(ScrnInfoPtr pScrn); commit 7e1387ded57041a37f002334c39f38a595a32517 Author: Kevin Brace <kevinbr...@gmx.com> Date: Wed Mar 29 00:24:55 2017 -0700 Added viaLVDS1SetSoftDisplayPeriod This inline function was added to via_ums.h. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_ums.h b/src/via_ums.h index bcd1421..6b44d01 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -261,6 +261,25 @@ viaLVDS1SetSoftVdd(ScrnInfoPtr pScrn, Bool softOn) softOn ? "On" : "Off"); } +/* + * Sets CX700 or later single chipset's LVDS1 software controlled + * display period. + */ +static inline void +viaLVDS1SetSoftDisplayPeriod(ScrnInfoPtr pScrn, Bool softOn) +{ + /* Set LVDS1 software controlled display period state. */ + /* 3X5.91[7] - Software Direct On / Off Display Period + * in the Panel Path + * 0: On + * 1: Off */ + ViaCrtcMask(VGAHWPTR(pScrn), 0x91, softOn ? 0 : BIT(7), + BIT(7)); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 Software Controlled Display Period: %s\n", + softOn ? "On" : "Off"); +} + /* via_ums.c */ void viaUnmapMMIO(ScrnInfoPtr pScrn); commit 27f05a5d558ca63b758adfa549a6606856f49cf3 Author: Kevin Brace <kevinbr...@gmx.com> Date: Wed Mar 29 00:06:48 2017 -0700 Added viaLVDS1SetSoftVdd This inline function was added to via_ums.h. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_ums.h b/src/via_ums.h index f6c4681..bcd1421 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -244,6 +244,23 @@ viaLVDS1SetSoftData(ScrnInfoPtr pScrn, Bool softOn) softOn ? "On" : "Off"); } +/* + * Sets CX700 or later single chipset's LVDS1 software controlled Vdd. + */ +static inline void +viaLVDS1SetSoftVdd(ScrnInfoPtr pScrn, Bool softOn) +{ + /* Set LVDS1 software controlled Vdd. */ + /* 3X5.91[4] - Software VDD On + * 0: Off + * 1: On */ + ViaCrtcMask(VGAHWPTR(pScrn), 0x91, softOn ? BIT(4) : 0, + BIT(4)); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 Software Controlled Vdd: %s\n", + softOn ? "On" : "Off"); +} + /* via_ums.c */ void viaUnmapMMIO(ScrnInfoPtr pScrn); commit 959a66f68ecd90d83f2755410284d5f668763d26 Author: Kevin Brace <kevinbr...@gmx.com> Date: Tue Mar 28 22:58:50 2017 -0700 Added viaLVDS1SetSoftData This inline function was added to via_ums.h. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_ums.h b/src/via_ums.h index b747d66..f6c4681 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -226,6 +226,24 @@ viaLVDS1SetPowerSeq(ScrnInfoPtr pScrn, Bool ctrlType) ctrlType ? "Software" : "Hardware"); } +/* + * Sets CX700 or later single chipset's LVDS1 software controlled + * data path state. + */ +static inline void +viaLVDS1SetSoftData(ScrnInfoPtr pScrn, Bool softOn) +{ + /* Set LVDS1 software controlled data path state. */ + /* 3X5.91[3] - Software Data On + * 0: Off + * 1: On */ + ViaCrtcMask(VGAHWPTR(pScrn), 0x91, softOn ? BIT(3) : 0, + BIT(3)); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 Software Controlled Data Path: %s\n", + softOn ? "On" : "Off"); +} + /* via_ums.c */ void viaUnmapMMIO(ScrnInfoPtr pScrn); commit 582d0161293b5e7ef0e619d888e88fdec3cdf3a2 Author: Kevin Brace <kevinbr...@gmx.com> Date: Tue Mar 28 22:55:33 2017 -0700 Added viaLVDS1SetPowerSeq This inline function was added to via_ums.h. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_ums.h b/src/via_ums.h index 7fde994..b747d66 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -209,6 +209,24 @@ typedef struct } ViaExpireNumberTable; +/* + * Sets CX700 or later single chipset's LVDS1 power sequence type. + */ +static inline void +viaLVDS1SetPowerSeq(ScrnInfoPtr pScrn, Bool ctrlType) +{ + /* Set LVDS1 power sequence type. */ + /* 3X5.91[0] - LVDS1 Hardware or Software Control Power Sequence + * 0: Hardware Control + * 1: Software Control */ + ViaCrtcMask(VGAHWPTR(pScrn), 0x91, ctrlType ? BIT(0) : 0x00, + BIT(0)); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 Power Sequence: %s Control\n", + ctrlType ? "Software" : "Hardware"); +} + + /* via_ums.c */ void viaUnmapMMIO(ScrnInfoPtr pScrn); void viaDisableVQ(ScrnInfoPtr pScrn); commit 489cd232fc08a830fb24e8d115d0898c1f65af21 Author: Kevin Brace <kevinbr...@gmx.com> Date: Tue Mar 28 22:09:13 2017 -0700 Adding BIT macro Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_ums.h b/src/via_ums.h index ec2204c..7fde994 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -125,6 +125,8 @@ #define VIA_TMDS_NONE 0x0 #define VIA_TMDS_VT1632 0x1 +#define BIT(x) (1 << x) + typedef struct ViaPanelMode { int Width; _______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel