summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorSamuel Zhang <guoqing.zhang@amd.com>2025-07-10 14:23:09 +0800
committerMario Limonciello <mario.limonciello@amd.com>2025-07-10 10:49:44 -0500
commit40b6a946d21ee7b2b6d394bb2f1cdd3973aa9da5 (patch)
tree07132ce21a22465ae8349660fdecda59ba019785 /include/drm
parentbead8800222768dab1a421206350d530b0c45254 (diff)
drm/ttm: add new api ttm_device_prepare_hibernation()
This new api is used for hibernation to move GTT BOs to shmem after VRAM eviction. shmem will be flushed to swap disk later to reduce the system memory usage for hibernation. Signed-off-by: Samuel Zhang <guoqing.zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://lore.kernel.org/r/20250710062313.3226149-2-guoqing.zhang@amd.com Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/ttm/ttm_device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_device.h b/include/drm/ttm/ttm_device.h
index 39b8636b1845..592b5f802859 100644
--- a/include/drm/ttm/ttm_device.h
+++ b/include/drm/ttm/ttm_device.h
@@ -272,6 +272,7 @@ struct ttm_device {
int ttm_global_swapout(struct ttm_operation_ctx *ctx, gfp_t gfp_flags);
int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
gfp_t gfp_flags);
+int ttm_device_prepare_hibernation(struct ttm_device *bdev);
static inline struct ttm_resource_manager *
ttm_manager_type(struct ttm_device *bdev, int mem_type)