summaryrefslogtreecommitdiff
path: root/src/radeon_bios.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-03-27 14:02:51 +1000
committerDave Airlie <airlied@redhat.com>2008-03-27 14:02:51 +1000
commit1442d396b938049b83f009a78ddabe2bf85641b6 (patch)
tree7c113365ebdd83c7032a3343e1af338f575f8420 /src/radeon_bios.c
parentde2f609ff0004ef8b74727bfebc2c74fb91205ea (diff)
radeon: size bios to max of bar vs 64k.
reported by dwmw2: rhbz 438299
Diffstat (limited to 'src/radeon_bios.c')
-rw-r--r--src/radeon_bios.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index a32188d5..6bd526a5 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -75,7 +75,8 @@ Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10)
#ifdef XSERVER_LIBPCIACCESS
//info->VBIOS = xalloc(info->PciInfo->rom_size);
- info->VBIOS = xalloc(RADEON_VBIOS_SIZE);
+ int size = info->PciInfo->rom_size > RADEON_VBIOS_SIZE ? info->PciInfo->rom_size : RADEON_VBIOS_SIZE;
+ info->VBIOS = xalloc(size);
#else
info->VBIOS = xalloc(RADEON_VBIOS_SIZE);
#endif