The ATI GART has a fixed size of 4096 bytes. So using the system page size here is wrong.
Signed-off-by: David S. Miller <[email protected]> --- src/radeon_dri.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/radeon_dri.c b/src/radeon_dri.c index 44b3eb6..7cf4d39 100644 --- a/src/radeon_dri.c +++ b/src/radeon_dri.c @@ -2295,11 +2295,10 @@ void RADEONDRIAllocatePCIGARTTable(ScreenPtr pScreen) int RADEONDRIGetPciAperTableSize(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); - int page_size = getpagesize(); int ret_size; int num_pages; - num_pages = (info->dri->pciAperSize * 1024 * 1024) / page_size; + num_pages = (info->dri->pciAperSize * 1024 * 1024) / 4096; ret_size = num_pages * sizeof(unsigned int); -- 1.6.1.2.350.g88cc _______________________________________________ xorg-driver-ati mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-driver-ati
