configure.ac | 2 - src/via_outputs.c | 107 ------------------------------------------------------ src/via_tmds.c | 20 ---------- src/via_tv.c | 20 ---------- src/via_ums.h | 49 +++++++++++++++++++++--- 5 files changed, 46 insertions(+), 152 deletions(-)
New commits: commit 0723e836b47cdd633a4ba39627b015d532f1163c Author: Kevin Brace <kevinbr...@gmx.com> Date: Sat Jul 15 21:47:08 2017 -0500 Version bumped to 0.6.153 Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/configure.ac b/configure.ac index 5cfb661..d51dc4d 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ(2.57) AC_INIT([xf86-video-openchrome], - [0.6.152], + [0.6.153], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome], [xf86-video-openchrome]) commit e3f097119ee49e2148b1fa3d2952484d26e08bc9 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sat Jul 15 21:43:32 2017 -0500 Removed viaDIP0SetDataDriveStrength Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_outputs.c b/src/via_outputs.c index 713616f..b7bb871 100644 --- a/src/via_outputs.c +++ b/src/via_outputs.c @@ -40,32 +40,6 @@ #include "via_driver.h" #include <unistd.h> -/* - * Sets DIP0 (Digital Interface Port 0) data I/O pads drive strength - * for CLE266 chipset only. - */ -void -viaDIP0SetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaDIP0SetDataDriveStrength.\n")); - - /* 3C5.1B[1] - DIP0 Data Drive Strength Bit [0] */ - ViaSeqMask(hwp, 0x1B, dataDriveStrength << 1, 0x02); - - /* 3C5.2A[5] - DIP0 Data Drive Strength Bit [1] */ - ViaSeqMask(hwp, 0x2A, dataDriveStrength << 4, 0x20); - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "DIP0 Data I/O Pads Drive Strength: %u\n", - dataDriveStrength); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaDIP0SetDataDriveStrength.\n")); -} - void viaInitDisplay(ScrnInfoPtr pScrn) { diff --git a/src/via_tmds.c b/src/via_tmds.c index f51236b..886f52f 100644 --- a/src/via_tmds.c +++ b/src/via_tmds.c @@ -656,15 +656,6 @@ viaExtTMDSSetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength) "SR13: 0x%02X\n", sr13)); switch (pVia->Chipset) { case VIA_CLE266: - /* 3C5.12[5] - FPD18 pin strapping - * 0: DIP0 (Digital Interface Port 0) is used by - * a TMDS transmitter (DVI) - * 1: DIP0 (Digital Interface Port 0) is used by - * a TV encoder */ - if (!(sr12 & 0x20)) { - viaDIP0SetDataDriveStrength(pScrn, dataDriveStrength); - } - break; case VIA_KM400: case VIA_K8M800: diff --git a/src/via_tv.c b/src/via_tv.c index 3b3eb6f..c5d1bcf 100644 --- a/src/via_tv.c +++ b/src/via_tv.c @@ -444,15 +444,6 @@ viaTVSetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength) "SR13: 0x%02X\n", sr13)); switch (pVia->Chipset) { case VIA_CLE266: - /* 3C5.12[5] - FPD18 pin strapping - * 0: DIP0 (Digital Interface Port 0) is used by - * a TMDS transmitter (DVI) - * 1: DIP0 (Digital Interface Port 0) is used by - * a TV encoder */ - if (sr12 & 0x20) { - viaDIP0SetDataDriveStrength(pScrn, dataDriveStrength); - } - break; case VIA_KM400: case VIA_K8M800: diff --git a/src/via_ums.h b/src/via_ums.h index d980ae9..18803b8 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -1322,8 +1322,6 @@ Bool umsPreInit(ScrnInfoPtr pScrn); Bool umsCrtcInit(ScrnInfoPtr pScrn); /* via_output.c */ -void viaDIP0SetDataDriveStrength(ScrnInfoPtr pScrn, - CARD8 dataDriveStrength); void viaInitDisplay(ScrnInfoPtr pScrn); CARD32 ViaGetMemoryBandwidth(ScrnInfoPtr pScrn); CARD32 ViaModeDotClockTranslate(ScrnInfoPtr pScrn, DisplayModePtr mode); commit ae4b6b02561da85b8f9a7b0b3cec152c3b367acf Author: Kevin Brace <kevinbr...@gmx.com> Date: Sat Jul 15 21:24:21 2017 -0500 Removed viaDIP0SetClockDriveStrength Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_outputs.c b/src/via_outputs.c index 0c2c731..713616f 100644 --- a/src/via_outputs.c +++ b/src/via_outputs.c @@ -41,32 +41,6 @@ #include <unistd.h> /* - * Sets DIP0 (Digital Interface Port 0) clock I/O pad drive strength - * for CLE266 chipset only. - */ -void -viaDIP0SetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaDIP0SetClockDriveStrength.\n")); - - /* 3C5.1E[2] - DIP0 Clock Drive Strength Bit [0] */ - ViaSeqMask(hwp, 0x1E, clockDriveStrength << 2, 0x04); - - /* 3C5.2A[4] - DIP0 Clock Drive Strength Bit [1] */ - ViaSeqMask(hwp, 0x2A, clockDriveStrength << 3, 0x10); - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "DIP0 Clock I/O Pad Drive Strength: %u\n", - clockDriveStrength & 0x03); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaDIP0SetClockDriveStrength.\n")); -} - -/* * Sets DIP0 (Digital Interface Port 0) data I/O pads drive strength * for CLE266 chipset only. */ diff --git a/src/via_tmds.c b/src/via_tmds.c index 303c3f6..f51236b 100644 --- a/src/via_tmds.c +++ b/src/via_tmds.c @@ -565,15 +565,6 @@ viaExtTMDSSetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength) "SR13: 0x%02X\n", sr13)); switch (pVia->Chipset) { case VIA_CLE266: - /* 3C5.12[5] - FPD18 pin strapping - * 0: DIP0 (Digital Interface Port 0) is used by - * a TMDS transmitter (DVI) - * 1: DIP0 (Digital Interface Port 0) is used by - * a TV encoder */ - if (!(sr12 & 0x20)) { - viaDIP0SetClockDriveStrength(pScrn, clockDriveStrength); - } - break; case VIA_KM400: case VIA_K8M800: diff --git a/src/via_tv.c b/src/via_tv.c index 1510748..3b3eb6f 100644 --- a/src/via_tv.c +++ b/src/via_tv.c @@ -340,15 +340,6 @@ viaTVSetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength) "SR13: 0x%02X\n", sr13)); switch (pVia->Chipset) { case VIA_CLE266: - /* 3C5.12[5] - FPD18 pin strapping - * 0: DIP0 (Digital Interface Port 0) is used by - * a TMDS transmitter (DVI) - * 1: DIP0 (Digital Interface Port 0) is used by - * a TV encoder */ - if (sr12 & 0x20) { - viaDIP0SetClockDriveStrength(pScrn, clockDriveStrength); - } - break; case VIA_KM400: case VIA_K8M800: diff --git a/src/via_ums.h b/src/via_ums.h index 250c4ce..d980ae9 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -1322,8 +1322,6 @@ Bool umsPreInit(ScrnInfoPtr pScrn); Bool umsCrtcInit(ScrnInfoPtr pScrn); /* via_output.c */ -void viaDIP0SetClockDriveStrength(ScrnInfoPtr pScrn, - CARD8 clockDriveStrength); void viaDIP0SetDataDriveStrength(ScrnInfoPtr pScrn, CARD8 dataDriveStrength); void viaInitDisplay(ScrnInfoPtr pScrn); commit bdee8f6b765450e85e8a81f6e12c5e161ff2cea2 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sat Jul 15 21:07:47 2017 -0500 Rename viaDIP0EnableIOPads to viaDIP0SetIOPadState The new function is implemented as an inline function. Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_outputs.c b/src/via_outputs.c index e61bda9..0c2c731 100644 --- a/src/via_outputs.c +++ b/src/via_outputs.c @@ -41,35 +41,6 @@ #include <unistd.h> /* - * Sets DIP0 (Digital Interface Port 0) I/O pad state. - * This function is for CLE266 chipset only. - */ -void -viaDIP0EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaDIP0EnableIOPads.\n")); - - /* Set DIP0 I/O pad state. */ - /* 3C5.1E[7:6] - DIP0 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, 0x1E, ioPadState << 6, 0xC0); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "DIP0 I/O Pad State: %s\n", - (ioPadState & 0x02) ? - (ioPadState & 0x01) ? "Automatic On / Off" : "Conditional" - : "Off"); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaDIP0EnableIOPads.\n")); -} - -/* * Sets DIP0 (Digital Interface Port 0) clock I/O pad drive strength * for CLE266 chipset only. */ diff --git a/src/via_tmds.c b/src/via_tmds.c index b8c5594..303c3f6 100644 --- a/src/via_tmds.c +++ b/src/via_tmds.c @@ -440,7 +440,7 @@ viaExtTMDSEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) * 1: DIP0 (Digital Interface Port 0) is used by * a TV encoder */ if (!(sr12 & 0x20)) { - viaDIP0EnableIOPads(pScrn, ioPadState); + viaDIP0SetIOPadState(pScrn, ioPadState); } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "DIP0 was not set up for " diff --git a/src/via_tv.c b/src/via_tv.c index a3fd91a..1510748 100644 --- a/src/via_tv.c +++ b/src/via_tv.c @@ -212,7 +212,7 @@ viaTVEnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState) * 1: DIP0 (Digital Interface Port 0) is used by * a TV encoder */ if (sr12 & 0x20) { - viaDIP0EnableIOPads(pScrn, ioPadState); + viaDIP0SetIOPadState(pScrn, ioPadState); } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "DIP0 is not set up for " diff --git a/src/via_ums.h b/src/via_ums.h index 0107e93..250c4ce 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -340,6 +340,31 @@ viaIGA2SetDisplayOutput(ScrnInfoPtr pScrn, Bool outputState) } /* + * Sets DIP0 (Digital Interface Port 0) I/O pad state. + * CLE266 chipset only. + */ +static inline void +viaDIP0SetIOPadState(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + /* 3C5.1E[7:6] - DIP0 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), 0x1E, + ioPadState << 6, BIT(7) | BIT(6)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DIP0 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 the display source of DIP0 (Digital Interface Port 0) * interface. CLE266 chipset only. */ @@ -1297,7 +1322,6 @@ Bool umsPreInit(ScrnInfoPtr pScrn); Bool umsCrtcInit(ScrnInfoPtr pScrn); /* via_output.c */ -void viaDIP0EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState); void viaDIP0SetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength); void viaDIP0SetDataDriveStrength(ScrnInfoPtr pScrn, commit 89e4a5943080693638e8c6d220ac185731997f09 Author: Kevin Brace <kevinbr...@gmx.com> Date: Wed Jul 12 11:21:33 2017 -0500 Converted viaDIP0SetDisplaySource into an inline function Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_outputs.c b/src/via_outputs.c index 0d3d4ff..e61bda9 100644 --- a/src/via_outputs.c +++ b/src/via_outputs.c @@ -41,32 +41,6 @@ #include <unistd.h> /* - * Sets IGA1 or IGA2 as the display output source for DIP0 - * (Digital Interface Port 0) interface for CLE266 only. - */ -void -viaDIP0SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - CARD8 temp = displaySource; - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaDIP0SetDisplaySource.\n")); - - /* Set DIP0 display output source. */ - /* 3X5.6C[7] - DIP0 (Digital Interface Port 0) Data Source Selection - * 0: Primary Display (IGA1) - * 1: Secondary Display (IGA2) */ - ViaCrtcMask(hwp, 0x6C, temp << 7, 0x80); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "DIP0 Display Output Source: IGA%d\n", - (temp & 0x01) + 1); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaDIP0SetDisplaySource.\n")); -} - -/* * Sets DIP0 (Digital Interface Port 0) I/O pad state. * This function is for CLE266 chipset only. */ diff --git a/src/via_ums.h b/src/via_ums.h index b73d40e..0107e93 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -340,6 +340,24 @@ viaIGA2SetDisplayOutput(ScrnInfoPtr pScrn, Bool outputState) } /* + * Sets the display source of DIP0 (Digital Interface Port 0) + * interface. CLE266 chipset only. + */ +static inline void +viaDIP0SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) +{ + /* 3X5.6C[7] - DIP0 Data Source Selection + * 0: Primary Display + * 1: Secondary Display */ + ViaCrtcMask(VGAHWPTR(pScrn), 0x6C, + displaySource << 7, BIT(7)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "DIP0 Display Source: IGA%d\n", + (displaySource & 0x01) + 1)); +} + + +/* * Sets DVP0 (Digital Video Port 0) I/O pad state. */ static inline void @@ -1279,7 +1297,6 @@ Bool umsPreInit(ScrnInfoPtr pScrn); Bool umsCrtcInit(ScrnInfoPtr pScrn); /* via_output.c */ -void viaDIP0SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource); void viaDIP0EnableIOPads(ScrnInfoPtr pScrn, CARD8 ioPadState); void viaDIP0SetClockDriveStrength(ScrnInfoPtr pScrn, CARD8 clockDriveStrength); _______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel