Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2ab19fe authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

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: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 585ffd65
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1109,6 +1109,7 @@ static struct ttm_bo_driver amdgpu_bo_driver = {
	.ttm_tt_unpopulate = &amdgpu_ttm_tt_unpopulate,
	.invalidate_caches = &amdgpu_invalidate_caches,
	.init_mem_type = &amdgpu_init_mem_type,
	.eviction_valuable = ttm_bo_eviction_valuable,
	.evict_flags = &amdgpu_evict_flags,
	.move = &amdgpu_bo_move,
	.verify_access = &amdgpu_verify_access,
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ struct ttm_bo_driver ast_bo_driver = {
	.ttm_tt_populate = ast_ttm_tt_populate,
	.ttm_tt_unpopulate = ast_ttm_tt_unpopulate,
	.init_mem_type = ast_bo_init_mem_type,
	.eviction_valuable = ttm_bo_eviction_valuable,
	.evict_flags = ast_bo_evict_flags,
	.move = NULL,
	.verify_access = ast_bo_verify_access,
+1 −0
Original line number Diff line number Diff line
@@ -199,6 +199,7 @@ struct ttm_bo_driver bochs_bo_driver = {
	.ttm_tt_populate = ttm_pool_populate,
	.ttm_tt_unpopulate = ttm_pool_unpopulate,
	.init_mem_type = bochs_bo_init_mem_type,
	.eviction_valuable = ttm_bo_eviction_valuable,
	.evict_flags = bochs_bo_evict_flags,
	.move = NULL,
	.verify_access = bochs_bo_verify_access,
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ struct ttm_bo_driver cirrus_bo_driver = {
	.ttm_tt_populate = cirrus_ttm_tt_populate,
	.ttm_tt_unpopulate = cirrus_ttm_tt_unpopulate,
	.init_mem_type = cirrus_bo_init_mem_type,
	.eviction_valuable = ttm_bo_eviction_valuable,
	.evict_flags = cirrus_bo_evict_flags,
	.move = NULL,
	.verify_access = cirrus_bo_verify_access,
+1 −0
Original line number Diff line number Diff line
@@ -230,6 +230,7 @@ struct ttm_bo_driver mgag200_bo_driver = {
	.ttm_tt_populate = mgag200_ttm_tt_populate,
	.ttm_tt_unpopulate = mgag200_ttm_tt_unpopulate,
	.init_mem_type = mgag200_bo_init_mem_type,
	.eviction_valuable = ttm_bo_eviction_valuable,
	.evict_flags = mgag200_bo_evict_flags,
	.move = NULL,
	.verify_access = mgag200_bo_verify_access,
Loading