configure.ac | 2 src/Makefile.am | 1 src/via_fp.c | 183 +++++++++++++++++++------------------------------------- src/via_id.c | 57 ----------------- src/via_ums.h | 60 ++++++++++++++++++ 5 files changed, 124 insertions(+), 179 deletions(-)
New commits: commit e4a144c4965c8992465be0f79b7254c11f8a5696 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 11 10:55:08 2017 -0700 Version bumped to 0.6.135 Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/configure.ac b/configure.ac index 4a4f080..7955e7e 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ(2.57) AC_INIT([xf86-video-openchrome], - [0.6.134], + [0.6.135], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome], [xf86-video-openchrome]) commit 5fd7c30ef74691b99ce2b0943ee260afffcaecab Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 11 10:52:57 2017 -0700 Changed the order of viaFPDisplaySource input parameters Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_fp.c b/src/via_fp.c index 8cf9ac0..6cf40fd 100644 --- a/src/via_fp.c +++ b/src/via_fp.c @@ -328,7 +328,7 @@ viaFPDithering(ScrnInfoPtr pScrn, CARD8 diPort, Bool dithering) } static void -viaFPDisplaySource(ScrnInfoPtr pScrn, int index, CARD8 diPort) +viaFPDisplaySource(ScrnInfoPtr pScrn, CARD8 diPort, int index) { CARD8 displaySource = index & 0x01; @@ -1002,8 +1002,6 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode, break; } - viaFPDisplaySource(pScrn, iga->index, pVIAFP->diPort); - switch (pVia->Chipset) { case VIA_CX700: case VIA_VX800: @@ -1020,6 +1018,8 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode, default: break; } + + viaFPDisplaySource(pScrn, pVIAFP->diPort, iga->index); } } commit e1e512ee0418e3ab4f643dc55c298860a75c80c8 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 11 10:47:22 2017 -0700 Converted viaLVDS2SetOutputFormat to an inline function Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_fp.c b/src/via_fp.c index 399c2cf..8cf9ac0 100644 --- a/src/via_fp.c +++ b/src/via_fp.c @@ -198,31 +198,6 @@ viaDFPHighSetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap) "Exiting viaDFPHighSetDelayTap.\n")); } -/* - * Sets output format of LVDS2 to rotation or sequential mode. - */ -static void -viaLVDS2SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaLVDS2SetOutputFormat.\n")); - - /* Set LVDS2 output format. */ - /* 3X5.D4[7] - LVDS Channel 2 Output Format - * 0: Rotation - * 1: Sequential */ - ViaCrtcMask(hwp, 0xD4, outputFormat ? 0x80 : 0x00, 0x80); - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "LVDS2 Output Format: %s\n", - outputFormat ? "Sequential" : "Rotation"); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaLVDS2SetOutputFormat.\n")); -} - static void viaFPIOPadState(ScrnInfoPtr pScrn, CARD8 diPort, Bool ioPadOn) { diff --git a/src/via_ums.h b/src/via_ums.h index 4d3036e..85656b1 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -778,6 +778,21 @@ viaLVDS2SetFormat(ScrnInfoPtr pScrn, CARD8 format) } /* + * Sets LVDS2 output format (rotation or sequential mode). + */ +static inline void +viaLVDS2SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat) +{ + /* 3X5.D4[7] - LVDS Channel 2 Output Format + * 0: Rotation + * 1: Sequential */ + ViaCrtcMask(VGAHWPTR(pScrn), 0xD4, outputFormat << 7, BIT(7)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 Output Format: %s\n", + (outputFormat & BIT(0)) ? "Sequential" : "Rotation")); +} + +/* * Sets CX700 or later single chipset's LVDS2 display source. */ static inline void commit 53ef30c9040702efd60441749fb00b0b4f2c7f17 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 11 10:40:25 2017 -0700 Converted viaLVDS1SetOutputFormat to an inline function Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_fp.c b/src/via_fp.c index fa46f39..399c2cf 100644 --- a/src/via_fp.c +++ b/src/via_fp.c @@ -106,31 +106,6 @@ static DisplayModeRec OLPCMode = { #define TD3 25 /* - * Sets output format of LVDS1 to rotation or sequential mode. - */ -static void -viaLVDS1SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaLVDS1SetOutputFormat.\n")); - - /* Set LVDS1 output format. */ - /* 3X5.88[6] - LVDS Channel 1 Output Format - * 0: Rotation - * 1: Sequential */ - ViaCrtcMask(hwp, 0x88, outputFormat ? 0x40 : 0x00, 0x40); - - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "LVDS1 Output Format: %s\n", - outputFormat ? "Sequential" : "Rotation"); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaLVDS1SetOutputFormat.\n")); -} - -/* * Sets LVDS2 (LVDS Channel 2) integrated LVDS transmitter delay tap. */ static void diff --git a/src/via_ums.h b/src/via_ums.h index c3c2c05..4d3036e 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -687,6 +687,21 @@ viaLVDS1SetFormat(ScrnInfoPtr pScrn, CARD8 format) (format & BIT(0)) ? "OPENLDI" : "SPWG")); } +/* + * Sets LVDS1 output format (rotation or sequential mode). + */ +static inline void +viaLVDS1SetOutputFormat(ScrnInfoPtr pScrn, CARD8 outputFormat) +{ + /* 3X5.88[6] - LVDS Channel 1 Output Format + * 0: Rotation + * 1: Sequential */ + ViaCrtcMask(VGAHWPTR(pScrn), 0x88, outputFormat << 6, BIT(6)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 Output Format: %s\n", + (outputFormat & BIT(0)) ? "Sequential" : "Rotation")); +} + /* Sets CX700 or later single chipset's LVDS1 display source. */ static inline void viaLVDS1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) commit 1515335b9fa19b5dc27fbaf2b81edcd73f37e182 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 11 10:31:40 2017 -0700 Added viaFPOutputFormat Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_fp.c b/src/via_fp.c index b71e34d..fa46f39 100644 --- a/src/via_fp.c +++ b/src/via_fp.c @@ -324,6 +324,34 @@ viaFPFormat(ScrnInfoPtr pScrn, CARD8 diPort, CARD8 format) } static void +viaFPOutputFormat(ScrnInfoPtr pScrn, CARD8 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, CARD8 diPort, Bool dithering) { DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, @@ -1029,26 +1057,14 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode, switch (pVia->Chipset) { case VIA_CX700: case VIA_VX800: - /* Set LVDS2 output format to sequential mode. */ - viaLVDS2SetOutputFormat(pScrn, 0x01); - break; - case VIA_VX855: - case VIA_VX900: - /* Set LVDS1 output format to sequential mode. */ - viaLVDS1SetOutputFormat(pScrn, 0x01); - break; - default: - break; - } - - switch (pVia->Chipset) { - case VIA_CX700: - case VIA_VX800: case VIA_VX855: case VIA_VX900: /* OPENLDI Mode */ viaFPFormat(pScrn, pVIAFP->diPort, 0x01); + /* Sequential Mode */ + viaFPOutputFormat(pScrn, pVIAFP->diPort, 0x01); + viaFPDithering(pScrn, pVIAFP->diPort, pVIAFP->useDithering); break; default: commit 2aeadb4f30c65ba866d5396cba148bf277b48df6 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 11 10:21:15 2017 -0700 Converted viaLVDS2SetFormat to an inline function Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_fp.c b/src/via_fp.c index 8be6ce4..b71e34d 100644 --- a/src/via_fp.c +++ b/src/via_fp.c @@ -154,30 +154,6 @@ viaLVDS2SetDelayTap(ScrnInfoPtr pScrn, CARD8 delayTap) } /* - * Sets LVDS2 (LVDS Channel 2) integrated LVDS transmitter format. - */ -static void -viaLVDS2SetFormat(ScrnInfoPtr pScrn, CARD8 format) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaLVDS2SetFormat.\n")); - - /* Set LVDS2 format. */ - /* 3X5.D2[0] - LVDS Channel 2 Format Selection - * 0: SPWG Mode - * 1: OPENLDI Mode */ - ViaCrtcMask(hwp, 0xD2, format, 0x01); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "LVDS2 Format: %s\n", - (format & 0x01) ? "OPENLDI" : "SPWG"); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaLVDS2SetFormat.\n")); -} - -/* * Sets IGA1 or IGA2 as the display output source for VIA Technologies * Chrome IGP DFP (Digital Flat Panel) High interface. */ diff --git a/src/via_ums.h b/src/via_ums.h index 4747912..c3c2c05 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -748,6 +748,21 @@ viaLVDS2SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState) } /* + * Sets LVDS2 format. + */ +static inline void +viaLVDS2SetFormat(ScrnInfoPtr pScrn, CARD8 format) +{ + /* 3X5.D2[0] - LVDS Channel 2 Format Selection + * 0: SPWG Mode + * 1: OPENLDI Mode */ + ViaCrtcMask(VGAHWPTR(pScrn), 0xD2, format, BIT(0)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 Format: %s\n", + (format & BIT(0)) ? "OPENLDI" : "SPWG")); +} + +/* * Sets CX700 or later single chipset's LVDS2 display source. */ static inline void commit 9776bffd345ba06810b02b38d5d815e3ca313ee2 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 11 10:12:58 2017 -0700 Converted viaLVDS1SetFormat to an inline function Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_fp.c b/src/via_fp.c index 21a0076..8be6ce4 100644 --- a/src/via_fp.c +++ b/src/via_fp.c @@ -106,30 +106,6 @@ static DisplayModeRec OLPCMode = { #define TD3 25 /* - * Sets LVDS1 (LVDS Channel 1) integrated LVDS transmitter format. - */ -static void -viaLVDS1SetFormat(ScrnInfoPtr pScrn, CARD8 format) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Entered viaLVDS1SetFormat.\n")); - - /* Set LVDS1 format. */ - /* 3X5.D2[1] - LVDS Channel 1 Format Selection - * 0: SPWG Mode - * 1: OPENLDI Mode */ - ViaCrtcMask(hwp, 0xD2, format << 1, 0x02); - xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "LVDS1 Format: %s\n", - (format & 0x01) ? "OPENLDI" : "SPWG"); - - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Exiting viaLVDS1SetFormat.\n")); -} - -/* * Sets output format of LVDS1 to rotation or sequential mode. */ static void diff --git a/src/via_ums.h b/src/via_ums.h index 28e9641..4747912 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -672,6 +672,21 @@ viaLVDS1SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState) (ioPadState & (BIT(1) | BIT(0))))); } +/* + * Sets LVDS1 format. + */ +static inline void +viaLVDS1SetFormat(ScrnInfoPtr pScrn, CARD8 format) +{ + /* 3X5.D2[1] - LVDS Channel 1 Format Selection + * 0: SPWG Mode + * 1: OPENLDI Mode */ + ViaCrtcMask(VGAHWPTR(pScrn), 0xD2, format << 1, BIT(1)); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 Format: %s\n", + (format & BIT(0)) ? "OPENLDI" : "SPWG")); +} + /* Sets CX700 or later single chipset's LVDS1 display source. */ static inline void viaLVDS1SetDisplaySource(ScrnInfoPtr pScrn, CARD8 displaySource) commit 605385510f5d136719958da7d9f7bf522c405029 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sun Jun 11 09:59:44 2017 -0700 Added viaFPFormat Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/via_fp.c b/src/via_fp.c index b45d54e..21a0076 100644 --- a/src/via_fp.c +++ b/src/via_fp.c @@ -344,6 +344,34 @@ viaFPIOPadState(ScrnInfoPtr pScrn, CARD8 diPort, Bool ioPadOn) } static void +viaFPFormat(ScrnInfoPtr pScrn, CARD8 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 viaFPDithering(ScrnInfoPtr pScrn, CARD8 diPort, Bool dithering) { DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, @@ -1051,17 +1079,11 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode, case VIA_VX800: /* Set LVDS2 output format to sequential mode. */ viaLVDS2SetOutputFormat(pScrn, 0x01); - - /* Set LVDS2 output to OPENLDI mode. */ - viaLVDS2SetFormat(pScrn, 0x01); break; case VIA_VX855: case VIA_VX900: /* Set LVDS1 output format to sequential mode. */ viaLVDS1SetOutputFormat(pScrn, 0x01); - - /* Set LVDS1 output to OPENLDI mode. */ - viaLVDS1SetFormat(pScrn, 0x01); break; default: break; @@ -1072,6 +1094,9 @@ via_fp_mode_set(xf86OutputPtr output, DisplayModePtr mode, case VIA_VX800: case VIA_VX855: case VIA_VX900: + /* OPENLDI Mode */ + viaFPFormat(pScrn, pVIAFP->diPort, 0x01); + viaFPDithering(pScrn, pVIAFP->diPort, pVIAFP->useDithering); break; default: commit 150bd44b7f61df5ff82b1b4a4a7bfe2d169ffc53 Author: Kevin Brace <kevinbr...@gmx.com> Date: Sat Jun 10 23:35:10 2017 -0700 Removed via_id.c Signed-off-by: Kevin Brace <kevinbr...@gmx.com> diff --git a/src/Makefile.am b/src/Makefile.am index 821acf4..f0e4eca 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -53,7 +53,6 @@ openchrome_drv_la_SOURCES = \ via_driver.c \ via_driver.h \ via_i2c.c \ - via_id.c \ via_fp.c \ via_memcpy.c \ via_memmgr.h \ diff --git a/src/via_id.c b/src/via_id.c deleted file mode 100644 index 00c8720..0000000 --- a/src/via_id.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2005-2015 The Openchrome Project - * [https://www.freedesktop.org/wiki/Openchrome] - * Copyright 2004-2005 The Unichrome Project [unichrome.sf.net] - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -/* - * A big structure with card-ID information, plus some checking functions. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "via_driver.h" - -static void -ViaDoubleCheckCLE266Revision(ScrnInfoPtr pScrn) -{ - vgaHWPtr hwp = VGAHWPTR(pScrn); - VIAPtr pVia = VIAPTR(pScrn); - /* Crtc 0x4F is only defined in CLE266Cx */ - CARD8 tmp = hwp->readCrtc(hwp, 0x4F); - - hwp->writeCrtc(hwp, 0x4F, 0x55); - if (hwp->readCrtc(hwp, 0x4F) == 0x55) { - if (CLE266_REV_IS_AX(pVia->ChipRev)) - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "CLE266 Revision seems" - " to be Cx, yet %d was detected previously.\n", - pVia->ChipRev); - } else { - if (CLE266_REV_IS_CX(pVia->ChipRev)) - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "CLE266 Revision seems" - " to be Ax, yet %d was detected previously.\n", - pVia->ChipRev); - } - hwp->writeCrtc(hwp, 0x4F, tmp); -} _______________________________________________ Openchrome-devel mailing list Openchrome-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/openchrome-devel