• Thomas Hellstrom's avatar
    drm/ttm: Convert vm callbacks to helpers · 7aef29f4
    Thomas Hellstrom authored
    The default TTM fault handler may not be completely sufficient
    (vmwgfx needs to do some bookkeeping, control the write protectionand also
    needs to restrict the number of prefaults).
    
    Also make it possible replicate ttm_bo_vm_reserve() functionality for,
    for example, mkwrite handlers.
    
    So turn the TTM vm code into helpers: ttm_bo_vm_fault_reserved(),
    ttm_bo_vm_open(), ttm_bo_vm_close() and ttm_bo_vm_reserve(). Also provide
    a default TTM fault handler for other drivers to use.
    Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
    7aef29f4
ttm_bo_api.h 23.4 KB