diff options
author | anholt <anholt> | 2003-02-20 07:58:05 +0000 |
---|---|---|
committer | anholt <anholt> | 2003-02-20 07:58:05 +0000 |
commit | aa4cc690a2a394bcdb14d0e406dd2def7e7389e4 (patch) | |
tree | 8f7bafc13c44825e1cf6972e249dab2f97746539 | |
parent | 1de44730b26e5b7b6f50a675d96a4c0635656866 (diff) |
Make the allocation for the ATI PCI GART contiguous. It worked in the past
because we happened to only use one page of the table.
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/ati_pcigart.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/ati_pcigart.h b/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/ati_pcigart.h index bfb8ab25d..ba0b81a75 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/ati_pcigart.h +++ b/xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/ati_pcigart.h @@ -57,7 +57,8 @@ int DRM(ati_pcigart_init)( drm_device_t *dev, goto done; } - address = malloc( (1 << ATI_PCIGART_TABLE_ORDER) * PAGE_SIZE, DRM(M_DRM), M_WAITOK ); + address = (long)contigmalloc((1 << ATI_PCIGART_TABLE_ORDER) * PAGE_SIZE, + DRM(M_DRM), M_WAITOK, 0ul, 0xfffffffful, PAGE_SIZE, 0); if ( !address ) { DRM_ERROR( "cannot allocate PCI GART page!\n" ); goto done; @@ -103,7 +104,8 @@ int DRM(ati_pcigart_cleanup)( drm_device_t *dev, return 0; } - free( (void *)addr, DRM(M_DRM)); - +#if __FreeBSD_version > 500000 + contigfree( (void *)addr, (1 << ATI_PCIGART_TABLE_ORDER) * PAGE_SIZE, DRM(M_DRM)); /* Not available on 4.x */ +#endif return 1; } |