diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2008-11-24 15:52:05 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2008-11-24 15:52:05 -0500 |
commit | d7a03e93372b17d642b42f5490464616ae7c99c1 (patch) | |
tree | 77eda62d0e45554babe9d52bdeb0c0b650c99d5f /src/radeon_bios.c | |
parent | 3858e31fa9d77d52a5cabb02f53f06385eab40f7 (diff) |
Get hardcoded edid from the bios for servers that support it
should fix bug 11300
Diffstat (limited to 'src/radeon_bios.c')
-rw-r--r-- | src/radeon_bios.c | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c index 89c816c3..1b85e8dc 100644 --- a/src/radeon_bios.c +++ b/src/radeon_bios.c @@ -1053,39 +1053,27 @@ Bool RADEONGetLVDSInfoFromBIOS (xf86OutputPtr output) return TRUE; } -Bool RADEONGetHardCodedEDIDFromBIOS (xf86OutputPtr output) +xf86MonPtr RADEONGetHardCodedEDIDFromBIOS (xf86OutputPtr output) { ScrnInfoPtr pScrn = output->scrn; - RADEONInfoPtr info = RADEONPTR(pScrn); - RADEONOutputPrivatePtr radeon_output = output->driver_private; + RADEONInfoPtr info = RADEONPTR(pScrn); unsigned long tmp; - char EDID[256]; + unsigned char edid[256]; + xf86MonPtr mon = NULL; - if (!info->VBIOS) return FALSE; + if (!info->VBIOS) + return mon; - if (info->IsAtomBios) { - /* Not yet */ - return FALSE; - } else { - if (!(tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x4c))) { - return FALSE; + if (!info->IsAtomBios) { + tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x4c); + if (tmp) { + memcpy(edid, (unsigned char*)(info->VBIOS + tmp), 256); + if (edid[1] == 0xff) + mon = xf86InterpretEDID(output->scrn->scrnIndex, edid); } - - memcpy(EDID, (char*)(info->VBIOS + tmp), 256); - - radeon_output->DotClock = (*(uint16_t*)(EDID+54)) * 10; - radeon_output->PanelXRes = (*(uint8_t*)(EDID+56)) + ((*(uint8_t*)(EDID+58))>>4)*256; - radeon_output->HBlank = (*(uint8_t*)(EDID+57)) + ((*(uint8_t*)(EDID+58)) & 0xf)*256; - radeon_output->HOverPlus = (*(uint8_t*)(EDID+62)) + ((*(uint8_t*)(EDID+65)>>6)*256); - radeon_output->HSyncWidth = (*(uint8_t*)(EDID+63)) + (((*(uint8_t*)(EDID+65)>>4) & 3)*256); - radeon_output->PanelYRes = (*(uint8_t*)(EDID+59)) + ((*(uint8_t*)(EDID+61))>>4)*256; - radeon_output->VBlank = ((*(uint8_t*)(EDID+60)) + ((*(uint8_t*)(EDID+61)) & 0xf)*256); - radeon_output->VOverPlus = (((*(uint8_t*)(EDID+64))>>4) + (((*(uint8_t*)(EDID+65)>>2) & 3)*16)); - radeon_output->VSyncWidth = (((*(uint8_t*)(EDID+64)) & 0xf) + ((*(uint8_t*)(EDID+65)) & 3)*256); - radeon_output->Flags = V_NHSYNC | V_NVSYNC; /**(uint8_t*)(EDID+71);*/ - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Hardcoded EDID data will be used for TMDS panel\n"); } - return TRUE; + + return mon; } Bool RADEONGetTMDSInfoFromBIOS (xf86OutputPtr output) |