From e8c07270e1fc2ee455320370692aaf90abac2773 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 15 Jul 2008 17:50:32 -0400 Subject: ATOM: fix for r4xx cards with no VRAM_Usage tables fixes bug 15954 --- src/radeon_atombios.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'src/radeon_atombios.c') diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index 9d2a84f2..d6675722 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -609,17 +609,6 @@ rhdAtomInit(atomBiosHandlePtr unused1, AtomBiosRequestID unused2, #endif handle->BIOSImageSize = BIOSImageSize; -# if ATOM_BIOS_PARSER - /* Try to find out if BIOS has been posted (either by system or int10 */ - if (!rhdAtomGetFbBaseAndSize(handle, NULL, NULL)) { - /* run AsicInit */ - if (!rhdAtomASICInit(handle)) - xf86DrvMsg(scrnIndex, X_WARNING, - "%s: AsicInit failed. Won't be able to obtain in VRAM " - "FB scratch space\n",__func__); - } -# endif - data->atomhandle = handle; return ATOM_SUCCESS; @@ -654,12 +643,18 @@ rhdAtomVramInfoQuery(atomBiosHandlePtr handle, AtomBiosRequestID func, switch (func) { case GET_FW_FB_START: - *val = le32_to_cpu(atomDataPtr->VRAM_UsageByFirmware - ->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware); + if (atomDataPtr->VRAM_UsageByFirmware) + *val = le32_to_cpu(atomDataPtr->VRAM_UsageByFirmware + ->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware); + else + return ATOM_NOT_IMPLEMENTED; break; case GET_FW_FB_SIZE: - *val = le16_to_cpu(atomDataPtr->VRAM_UsageByFirmware - ->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); + if (atomDataPtr->VRAM_UsageByFirmware) + *val = le16_to_cpu(atomDataPtr->VRAM_UsageByFirmware + ->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); + else + return ATOM_NOT_IMPLEMENTED; break; default: return ATOM_NOT_IMPLEMENTED; -- cgit v1.2.3