diff options
author | Kevin Brace <kevinbrace@gmx.com> | 2017-02-23 13:21:14 -0800 |
---|---|---|
committer | Kevin Brace <kevinbrace@gmx.com> | 2017-02-23 13:21:14 -0800 |
commit | 41c4beb6000c154b5920c715fadd86ca2da197f0 (patch) | |
tree | 1e1a001bfbcfad1903cf1c25a5cecad09b354886 | |
parent | b84e4e61d7ba309ecac58efbb690c050ef8daeda (diff) |
Improvement in initializing FIC CE260 / CE261 netbook FP
Had to add a special handling case in order to properly handle FIC CE260 /
CE261 netbook FP LVDS interface turn on / off. In particular, this fix aids FP
reinitialization when resuming from standby. FIC CE260 / CE261 were sold as
Everex CloudBook and Sylvania g netbook.
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r-- | src/via_driver.c | 17 | ||||
-rw-r--r-- | src/via_driver.h | 6 | ||||
-rw-r--r-- | src/via_lvds.c | 62 | ||||
-rw-r--r-- | src/via_ums.h | 1 |
4 files changed, 86 insertions, 0 deletions
diff --git a/src/via_driver.c b/src/via_driver.c index ee2ee40..01090e2 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -1462,6 +1462,23 @@ viaPreInit(ScrnInfoPtr pScrn, int flags) pVia->I2CScan ? "" : "not "); #endif /* HAVE_DEBUG */ + /* Checking for VIA Technologies NanoBook reference design. + Examples include Everex CloudBook and Sylvania g netbook. + It is also called FIC CE260 and CE261 by its ODM (Original + Design Manufacturer) name. + This device has its strapping resistors set to a wrong + setting to handle DVI. As a result, we need to make special + accommodations to handle DVI properly. */ + if ((pVia->Chipset == VIA_CX700) && + (SUBVENDOR_ID(pVia->PciInfo) == 0x1509) && + (SUBSYS_ID(pVia->PciInfo) == 0x2D30)) { + + pVia->isVIANanoBook = TRUE; + } else { + pVia->isVIANanoBook = FALSE; + } + + /* Checking for OLPC XO-1.5. */ if ((pVia->Chipset == VIA_VX855) && (SUBVENDOR_ID(pVia->PciInfo) == 0x152D) && diff --git a/src/via_driver.h b/src/via_driver.h index d566187..123463c 100644 --- a/src/via_driver.h +++ b/src/via_driver.h @@ -284,6 +284,12 @@ typedef struct _VIA { /* BIOS Info Ptr */ VIABIOSInfoPtr pBIOSInfo; + /* VIA Technologies NanoBook reference design. + Examples include Everex CloudBook and Sylvania g netbook. + It is also called FIC CE260 and CE261 by its ODM (Original + Design Manufacturer) name. */ + Bool isVIANanoBook; + /* OLPC XO-1.5 */ Bool IsOLPCXO15; diff --git a/src/via_lvds.c b/src/via_lvds.c index 0605cce..3af9290 100644 --- a/src/via_lvds.c +++ b/src/via_lvds.c @@ -106,6 +106,28 @@ static DisplayModeRec OLPCMode = { #define TD3 25 /* + * Sets CX700 or later single chipset's LVDS1 I/O pad state. + */ +void +viaLVDS1SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS1SetIOPadSetting.\n")); + + /* Set LVDS1 I/O pad state. */ + /* 3C5.2A[1:0] - LVDS1 I/O Pad Control */ + ViaSeqMask(hwp, 0x2A, ioPadState, 0x03); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS1 I/O Pad State: %d\n", + (ioPadState & 0x03)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS1SetIOPadSetting.\n")); +} + +/* * Sets IGA1 or IGA2 as the display output source for VIA Technologies * Chrome IGP LVDS1 integrated LVDS transmitter. */ @@ -158,6 +180,28 @@ viaLVDS1SetFormat(ScrnInfoPtr pScrn, CARD8 format) } /* + * Sets CX700 or later single chipset's LVDS2 I/O pad state. + */ +static void +viaLVDS2SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState) +{ + vgaHWPtr hwp = VGAHWPTR(pScrn); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered viaLVDS2SetIOPadSetting.\n")); + + /* Set LVDS2 I/O pad state. */ + /* 3C5.2A[3:2] - LVDS2 I/O Pad Control */ + ViaSeqMask(hwp, 0x2A, ioPadState << 2, 0x0C); + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "LVDS2 I/O Pad State: %d\n", + (ioPadState & 0x03)); + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting viaLVDS2SetIOPadSetting.\n")); +} + +/* * Sets IGA1 or IGA2 as the display output source for VIA Technologies * Chrome IGP LVDS2 integrated LVDS transmitter. */ @@ -471,6 +515,24 @@ viaFPIOPadSetting(ScrnInfoPtr pScrn, Bool ioPadOn) case VIA_VX800: case VIA_VX855: case VIA_VX900: + /* 3C5.13[7:6] - DVP1D15 and DVP1D14 pin strappings + * 00: LVDS1 + LVDS2 + * 01: DVI + LVDS2 + * 10: Dual LVDS (LVDS1 + LVDS2 used + * simultaneously) + * 11: DVI only */ + if ((((~(sr13 & 0x80)) && (~(sr13 & 0x40))) + || ((sr13 & 0x80) && (~(sr13 & 0x40)))) + && (!pVia->isVIANanoBook)) { + + viaLVDS1SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00); + } + + if (((~(sr13 & 0x80)) || (~(sr13 & 0x40))) + || (pVia->isVIANanoBook)) { + + viaLVDS2SetIOPadSetting(pScrn, ioPadOn ? 0x03 : 0x00); + } break; default: break; diff --git a/src/via_ums.h b/src/via_ums.h index bba65a7..254686c 100644 --- a/src/via_ums.h +++ b/src/via_ums.h @@ -265,6 +265,7 @@ void ViaShadowCRTCSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode); void via_analog_init(ScrnInfoPtr pScrn); /* via_lvds.c */ +void viaLVDS1SetIOPadSetting(ScrnInfoPtr pScrn, CARD8 ioPadState); void via_lvds_init(ScrnInfoPtr pScrn); /* via_tmds.c */ |