From 91033b52b64415215cd8856bebd41ad72eb8d89f Mon Sep 17 00:00:00 2001 From: Kevin Brace Date: Wed, 20 Jan 2016 18:20:15 -0600 Subject: [PATCH 7/9] Determine the interface type for VGA detection The previous version of the code that took into consideration using I2C bus 1 and 2 to obtain EDID did not examine whether or not the monitor connected to is a digital or analog type. Since I2C bus 2 is often connected to a digital type interface, this meant that VGA monitor detection code was misdetecting the connected output type if I2C bus 1 did not detected a monitor (i.e., VGA monitor), but I2C bus 2 detected a monitor (likely a DVI monitor or LVDS flat panel). Now the code will look to see if the connected type is an analog type interface before recognizing it as a likely VGA monitor. --- src/via_outputs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/via_outputs.c b/src/via_outputs.c index b5e76e6..0343a54 100644 --- a/src/via_outputs.c +++ b/src/via_outputs.c @@ -807,7 +807,7 @@ via_analog_detect(xf86OutputPtr output) DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Probing for a VGA monitor on I2C Bus 1.\n")); mon = xf86OutputGetEDID(output, pVia->pI2CBus1); - if (mon) { + if (mon && (!mon->features.input_type)) { DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected a VGA monitor on I2C Bus 1.\n")); xf86OutputSetEDID(output, mon); @@ -818,7 +818,7 @@ via_analog_detect(xf86OutputPtr output) DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Probing for a VGA monitor on I2C Bus 2.\n")); mon = xf86OutputGetEDID(output, pVia->pI2CBus2); - if (mon) { + if (mon && (!mon->features.input_type)) { DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Detected a VGA monitor on I2C Bus 2.\n")); xf86OutputSetEDID(output, mon); -- 1.7.9.5