aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-04-06 05:12:07 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:21:38 -0400
commit98c2872ae99bb7c9e8e4369cf48154f41dd6a109 (patch)
treefdbcd77633df61e070604aa07dcb002cefe0dfd8 /include/drm
parentc3ea576e0583bb0537cdd66b704e49d380427721 (diff)
drm/ttm: implement LRU add callbacks v2
This allows fine grained control for the driver where to add a BO into the LRU. v2: fix typo in comment Reviewed-by: Sinclair Yeh <syeh@vmware.com> 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 'include/drm')
-rw-r--r--include/drm/ttm/ttm_bo_driver.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 542f9212727c..513f7f96b80a 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -440,6 +440,12 @@ struct ttm_bo_driver {
440 * Called with LRU lock held immediately before the removal. 440 * Called with LRU lock held immediately before the removal.
441 */ 441 */
442 void (*lru_removal)(struct ttm_buffer_object *bo); 442 void (*lru_removal)(struct ttm_buffer_object *bo);
443
444 /**
445 * Return the list_head after which a BO should be inserted in the LRU.
446 */
447 struct list_head *(*lru_tail)(struct ttm_buffer_object *bo);
448 struct list_head *(*swap_lru_tail)(struct ttm_buffer_object *bo);
443}; 449};
444 450
445/** 451/**
@@ -757,6 +763,9 @@ extern void ttm_mem_io_unlock(struct ttm_mem_type_manager *man);
757extern void ttm_bo_del_sub_from_lru(struct ttm_buffer_object *bo); 763extern void ttm_bo_del_sub_from_lru(struct ttm_buffer_object *bo);
758extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo); 764extern void ttm_bo_add_to_lru(struct ttm_buffer_object *bo);
759 765
766struct list_head *ttm_bo_default_lru_tail(struct ttm_buffer_object *bo);
767struct list_head *ttm_bo_default_swap_lru_tail(struct ttm_buffer_object *bo);
768
760/** 769/**
761 * __ttm_bo_reserve: 770 * __ttm_bo_reserve:
762 * 771 *