[PATCH]: DRI: Fix page size used in RADEONDRIGetPciAperTableSize().

David Miller davem at davemloft.net
Sat Feb 14 01:01:30 PST 2009


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 <davem at davemloft.net>
---
 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



More information about the xorg-driver-ati mailing list