diff options
author | Christian König <christian.koenig@amd.com> | 2016-08-30 17:26:04 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-25 20:44:04 +0200 |
commit | a2ab19fed9d1dc5a7a2ced44f4b289885c522a8f (patch) | |
tree | b70e33cd46fa454908bd0c6cae903fe562ef9c7c /drivers/gpu/drm/virtio/virtgpu_ttm.c | |
parent | drm/ttm: fix coding style in ttm_bo_driver.h (diff) | |
download | linux-a2ab19fed9d1dc5a7a2ced44f4b289885c522a8f.tar.xz linux-a2ab19fed9d1dc5a7a2ced44f4b289885c522a8f.zip |
drm/ttm: make eviction decision a driver callback v2
This way the driver can decide if it is valuable to evict a BO or not.
The current implementation is added as default to all existing drivers.
v2: fix some typos found during internal testing
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_ttm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c b/drivers/gpu/drm/virtio/virtgpu_ttm.c index 80482ac5f95d..4a1de9f81193 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ttm.c +++ b/drivers/gpu/drm/virtio/virtgpu_ttm.c @@ -425,6 +425,7 @@ static struct ttm_bo_driver virtio_gpu_bo_driver = { .ttm_tt_unpopulate = &virtio_gpu_ttm_tt_unpopulate, .invalidate_caches = &virtio_gpu_invalidate_caches, .init_mem_type = &virtio_gpu_init_mem_type, + .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &virtio_gpu_evict_flags, .move = &virtio_gpu_bo_move, .verify_access = &virtio_gpu_verify_access, |