<dec f='src/src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h' l='609' type='int ttm_bo_clean_mm(struct ttm_bo_device * bdev, unsigned int mem_type)'/>
<doc f='src/src/sys/external/bsd/drm2/dist/include/drm/ttm/ttm_bo_api.h' l='582'>/**
 * ttm_bo_clean_mm
 *
 * @bdev: Pointer to a ttm_bo_device struct.
 * @mem_type: The memory type.
 *
 * Take down a manager for a given memory type after first walking
 * the LRU list to evict any buffers left alive.
 *
 * Normally, this function is part of lastclose() or unload(), and at that
 * point there shouldn&apos;t be any buffers left created by user-space, since
 * there should&apos;ve been removed by the file descriptor release() method.
 * However, before this function is run, make sure to signal all sync objects,
 * and verify that the delayed delete queue is empty. The driver must also
 * make sure that there are no NO_EVICT buffers present in this memory type
 * when the call is made.
 *
 * If this function is part of a VT switch, the caller must make sure that
 * there are no appications currently validating buffers before this
 * function is called. The caller can do that by first taking the
 * struct ttm_bo_device::ttm_lock in write mode.
 *
 * Returns:
 * -EINVAL: invalid or uninitialized memory type.
 * -EBUSY: There are still buffers left in this memory type.
 */</doc>
<use f='src/src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c' l='474' u='c' c='nouveau_ttm_fini'/>
<use f='src/src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_ttm.c' l='475' u='c' c='nouveau_ttm_fini'/>
<use f='src/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c' l='849' u='c' c='radeon_ttm_fini'/>
<use f='src/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c' l='850' u='c' c='radeon_ttm_fini'/>
<def f='src/src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c' l='1310' ll='1344' type='int ttm_bo_clean_mm(struct ttm_bo_device * bdev, unsigned int mem_type)'/>
<use f='src/src/sys/external/bsd/drm2/dist/drm/ttm/ttm_bo.c' l='1504' u='c' c='ttm_bo_device_release'/>
