summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-08-04 12:56:09 +1000
committerDave Airlie <airlied@redhat.com>2020-08-06 12:32:03 +1000
commit9eca33f4a13919bb17b8a02809a32f8299f5c9bf (patch)
tree532646c8e5704268614ba08f92953356f15a329e /include/drm
parent0cf0a7984268c64e906b63a96df3e331ca61f989 (diff)
drm/ttm: add wrapper to get manager from bdev.
This will allow different abstractions later. Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-37-airlied@gmail.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 c76301a808ae..c8ea5eab719d 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -444,6 +444,12 @@ struct ttm_bo_device {
bool no_retry;
};
+static inline struct ttm_mem_type_manager *ttm_manager_type(struct ttm_bo_device *bdev,
+ int mem_type)
+{
+ return &bdev->man[mem_type];
+}
+
/**
* struct ttm_lru_bulk_move_pos
*