From 9a0947c812d0d38d1bca6a91140ac210831a6cb4 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Sat, 19 Jan 2008 13:57:50 -0500 Subject: ATOM: Use LVDS edid from bios if available --- src/radeon_modes.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/radeon_modes.c b/src/radeon_modes.c index 099a5e90..2c723957 100644 --- a/src/radeon_modes.c +++ b/src/radeon_modes.c @@ -285,10 +285,22 @@ RADEONProbeOutputModes(xf86OutputPtr output) if (output->MonInfo) modes = xf86OutputGetEDIDModes (output); if (modes == NULL) { - if (radeon_output->type == OUTPUT_LVDS) - modes = RADEONFPNativeMode(output); - /* add the screen modes */ - RADEONAddScreenModes(output, &modes); + if ((radeon_output->type == OUTPUT_LVDS) && info->IsAtomBios) { + atomBiosResult = RHDAtomBiosFunc(pScrn->scrnIndex, + info->atomBIOS, + ATOMBIOS_GET_PANEL_EDID, &atomBiosArg); + if (atomBiosResult == ATOM_SUCCESS) { + output->MonInfo = xf86InterpretEDID(pScrn->scrnIndex, + atomBiosArg.EDIDBlock); + modes = xf86OutputGetEDIDModes(output); + } + } + if (modes == NULL) { + if (radeon_output->type == OUTPUT_LVDS) + modes = RADEONFPNativeMode(output); + /* add the screen modes */ + RADEONAddScreenModes(output, &modes); + } } } } -- cgit v1.2.3