From ca00035eccb6e3495b27f8e64f2d016d8d2a9ce2 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Thu, 2 Mar 2006 02:05:17 +0000 Subject: Fix the fix ... I didn't interpret PciInfo->size properly and forgot that the function works in Kb not bytes... Ooops. --- ChangeLog | 6 ++++++ src/radeon_driver.c | 13 +++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f118a0b..2015433e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-03-02 Benjamin Herrenschmidt + + * src/radeon_driver.c: (RADEONPreInitConfig): + Fix the fix ... I didn't interpret PciInfo->size properly and forgot + that the function works in Kb not bytes... Ooops. + 2006-03-02 Benjamin Herrenschmidt * src/radeon_driver.c: (RADEONInitMemoryMap), diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 68cda919..4a078e8c 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -1,5 +1,5 @@ /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v 1.117 2004/02/19 22:38:12 tsi Exp $ */ -/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.89 2006/02/28 23:34:03 benh Exp $ */ +/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.90 2006/03/01 21:35:14 benh Exp $ */ /* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. @@ -2776,15 +2776,16 @@ static Bool RADEONPreInitConfig(ScrnInfoPtr pScrn) accessible = RADEONGetAccessibleVRAM(pScrn); /* Crop it to the size of the PCI BAR */ - bar_size = info->PciInfo->size[0]; + bar_size = (1ul << info->PciInfo->size[0]) / 1024; if (bar_size == 0) - bar_size = 0x08000000; + bar_size = 0x20000; if (accessible > bar_size) accessible = bar_size; xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Detected total video RAM: %dl, max accessible: %dK\n", - pScrn->videoRam, accessible); + "Detected total video RAM=%dK, accessible=%dK " + "(PCI BAR=%dK)\n", + pScrn->videoRam, accessible, bar_size); if (pScrn->videoRam > accessible) pScrn->videoRam = accessible; } @@ -2821,7 +2822,7 @@ static Bool RADEONPreInitConfig(ScrnInfoPtr pScrn) } xf86DrvMsg(pScrn->scrnIndex, from, - "VideoRAM: %d kByte (%d bit %s SDRAM)\n", pScrn->videoRam, info->RamWidth, info->IsDDR?"DDR":"SDR"); + "Mapped VideoRAM: %d kByte (%d bit %s SDRAM)\n", pScrn->videoRam, info->RamWidth, info->IsDDR?"DDR":"SDR"); /* FIXME: For now, split FB into two equal sections. This should * be able to be adjusted by user with a config option. */ -- cgit v1.2.3