aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/include/amd_shared.h
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-10-06 13:50:21 -0500
committerAlex Deucher <alexander.deucher@amd.com>2023-10-13 11:00:58 -0400
commitcb11ca3233aa3303dc11dca25977d2e7f24be00f (patch)
treef5db9dae24f87c141651d6e4685a045e11547665 /drivers/gpu/drm/amd/include/amd_shared.h
parent5095d5418193eb2748c7d8553c7150b8f1c44696 (diff)
drm/amd: Add concept of running prepare_suspend() sequence for IP blocks
If any IP blocks allocate memory during their hw_fini() sequence this can cause the suspend to fail under memory pressure. Introduce a new phase that IP blocks can use to allocate memory before suspend starts so that it can potentially be evicted into swap instead. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/include/amd_shared.h')
-rw-r--r--drivers/gpu/drm/amd/include/amd_shared.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
index ce75351204bb..98e60bc868dd 100644
--- a/drivers/gpu/drm/amd/include/amd_shared.h
+++ b/drivers/gpu/drm/amd/include/amd_shared.h
@@ -299,6 +299,7 @@ struct amd_ip_funcs {
int (*hw_init)(void *handle);
int (*hw_fini)(void *handle);
void (*late_fini)(void *handle);
+ int (*prepare_suspend)(void *handle);
int (*suspend)(void *handle);
int (*resume)(void *handle);
bool (*is_idle)(void *handle);