From 973537b16f4c4d245e465e3ec742e9306dd2f716 Mon Sep 17 00:00:00 2001 From: Kevin Brace Date: Wed, 20 Jan 2016 18:35:06 -0600 Subject: [PATCH 8/9] Reducing the use of a display output table This update will be a major one for OpenChrome. The use of an internal predefined display output table for known devices previously used to initialize display outputs will be reduced. What this means is that OpenChrome will go through scanning each I2C bus to determine which display output type is connected before initializing the display. In practice, the predefined display output table is still used, but OpenChrome is far less dependent on it. This is a highly risky update that will likely break OpenChrome for some users. However, the general trend of computing industry has been going in the direction of automatically detecting and configuring connected displays. It is author's view that OpenChrome needs to stop relying on an outdated concept like the use of a predefined table to figure out which display output should be initialized. The compiled device driver was tested on the following computer. - Epic 1314 laptop (MSI VR321 laptop equivalent, VN896 chipset) with Lubuntu 12.04 i386 --- src/via_outputs.c | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/src/via_outputs.c b/src/via_outputs.c index 0343a54..d5169a2 100644 --- a/src/via_outputs.c +++ b/src/via_outputs.c @@ -1161,38 +1161,36 @@ ViaOutputsDetect(ScrnInfoPtr pScrn) VIAPtr pVia = VIAPTR(pScrn); VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo; - DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ViaOutputsDetect\n")); + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Entered ViaOutputsDetect.\n")); pBIOSInfo->analog = NULL; - /* LVDS */ - via_lvds_init(pScrn); - /* VGA */ via_analog_init(pScrn); - /* - * FIXME: xf86I2CProbeAddress(pVia->pI2CBus3, 0x40) - * disables the panel on P4M900 - */ - /* TV encoder */ - if ((pVia->Chipset != VIA_P4M900) || (pVia->ActiveDevice & VIA_DEVICE_TV)) - via_tv_init(pScrn); + /* External LVDS transmitter for FP (Flat Panel)*/ + via_lvds_init(pScrn); - if (pVia->Chipset == VIA_P4M800PRO) { - via_dvi_init(pScrn); - } + /* External TMDS transmitter for DVI */ + via_dvi_init(pScrn); - if (pVia->ActiveDevice & VIA_DEVICE_DFP) { - switch (pVia->Chipset) { - case VIA_CX700: - case VIA_VX800: - case VIA_VX855: - case VIA_VX900: - via_dp_init(pScrn); - break; - } + /* External TV encoder */ + via_tv_init(pScrn); + + switch (pVia->Chipset) { + case VIA_CX700: + case VIA_VX800: + case VIA_VX855: + case VIA_VX900: + /* Integrated LVDS and TMDS transmitters + * for FP and DVI, respectively */ + via_dp_init(pScrn); + break; } + + DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Exiting ViaOutputsDetect.\n")); } #ifdef HAVE_DEBUG -- 1.7.9.5