From 5184c412b17e5319aefbc61ccdfd060608d1d6bd Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 13 Oct 2008 15:44:52 +1000 Subject: radeon: align up the allocations for vram The blits later on assume a 4k alignment without ever enforcing it. the kernel was producing wierd debug messages --- src/mesa/drivers/dri/r300/r300_mem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/r300/r300_mem.c b/src/mesa/drivers/dri/r300/r300_mem.c index cb5ca23f23..46dab3464e 100644 --- a/src/mesa/drivers/dri/r300/r300_mem.c +++ b/src/mesa/drivers/dri/r300/r300_mem.c @@ -591,6 +591,9 @@ static dri_bo *vram_alloc(radeon_bufmgr_classic *bufmgr, const char *name, unsigned long size, unsigned int alignment) { radeon_bo_vram* bo = (radeon_bo_vram*)calloc(1, sizeof(radeon_bo_vram)); + uint32_t pgsize = getpagesize() - 1; + + size = (size + pgsize) & ~pgsize; bo->base.functions = &vram_bo_functions; bo->base.base.virtual = malloc(size); -- cgit v1.2.3