mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-05 20:38:04 +02:00
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.
This commit is contained in:
parent
3796b2c83e
commit
b528efae82
2 changed files with 10 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue