summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2009-02-15 18:24:01 +1000
committerDave Airlie <airlied@linux.ie>2009-02-15 18:24:01 +1000
commit2de90c8349409eb892edc57fd24b61b679eb7719 (patch)
tree783650b155086368b7986c4d56b69eb1a4b4cf5a
parent3ff1eb7e50fef22adb6280dd7de77c3ecafdb451 (diff)
DRI: Fix page size used in RADEONDRIGetPciAperTableSize().
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@davemloft.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
-rw-r--r--src/radeon_dri.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 44b3eb64..7cf4d399 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);