summaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-04-06 11:12:06 +0200
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:21:34 -0400
commitc3ea576e0583bb0537cdd66b704e49d380427721 (patch)
treeb946e4145e92273276b22450bcd590c2505f8819 /include/drm
parent00cfd664f6dc197d86051e3db95c3609ef38394f (diff)
downloadblackbird-op-linux-c3ea576e0583bb0537cdd66b704e49d380427721.tar.gz
blackbird-op-linux-c3ea576e0583bb0537cdd66b704e49d380427721.zip
drm/ttm: add optional LRU removal callback v2
Useful for driver specific LRU handling. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index d4a568eafef5..542f9212727c 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -434,6 +434,12 @@ struct ttm_bo_driver {
*/
int (*io_mem_reserve)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem);
void (*io_mem_free)(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem);
+
+ /**
+ * Optional driver callback for when BO is removed from the LRU.
+ * Called with LRU lock held immediately before the removal.
+ */
+ void (*lru_removal)(struct ttm_buffer_object *bo);
};
/**
OpenPOWER on IntegriCloud