summaryrefslogtreecommitdiff
path: root/include/drm/ttm/ttm_resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/ttm/ttm_resource.h')
-rw-r--r--include/drm/ttm/ttm_resource.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h
index 4fd727b52da1..0f1d55262c68 100644
--- a/include/drm/ttm/ttm_resource.h
+++ b/include/drm/ttm/ttm_resource.h
@@ -130,10 +130,15 @@ struct ttm_resource_manager {
struct dma_fence *move;
/*
- * Protected by the global->lru_lock.
+ * Protected by the bdev->lru_lock.
*/
-
struct list_head lru[TTM_MAX_BO_PRIORITY];
+
+ /**
+ * @usage: How much of the resources are used, protected by the
+ * bdev->lru_lock.
+ */
+ uint64_t usage;
};
/**
@@ -278,11 +283,12 @@ void ttm_resource_set_bo(struct ttm_resource *res,
void ttm_resource_manager_init(struct ttm_resource_manager *man,
struct ttm_device *bdev,
- unsigned long p_size);
+ uint64_t size);
int ttm_resource_manager_evict_all(struct ttm_device *bdev,
struct ttm_resource_manager *man);
+uint64_t ttm_resource_manager_usage(struct ttm_resource_manager *man);
void ttm_resource_manager_debug(struct ttm_resource_manager *man,
struct drm_printer *p);