]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/ttm: Convert vm callbacks to helpers
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 25 Sep 2019 13:11:23 +0000 (15:11 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 4 Nov 2019 12:02:30 +0000 (13:02 +0100)
commitcaa478af48121ea21a8a4d6fe8a1bd467016adba
treebba99c5fdb48c2ae937e1cc662b79ab2285c7bc0
parent8951000f6d713c0470b06d3043aeb55683f78fa8
drm/ttm: Convert vm callbacks to helpers

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: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/332900/?series=67217&rev=1
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/ttm_bo_vm.c
include/drm/ttm/ttm_bo_api.h