summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dc.h
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2023-09-21 09:50:04 -0500
committerAlex Deucher <alexander.deucher@amd.com>2023-09-26 17:00:22 -0400
commit7441ef0b3ebe11ee46db82f7f7eee0f68b35e192 (patch)
tree947fe9e7524e82c053dce6757f3938b0e6680614 /drivers/gpu/drm/amd/display/dc/dc.h
parent41801c6b3042e2813365ee4def3f2804fd77776a (diff)
drm/amd: Propagate failures in dc_set_power_state()
During the suspend process dc_set_power_state() will use kzalloc to allocate memory, but this potentially fails with memory pressure. If it fails, the suspend should be aborted. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2362 Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: Harry.Wentland@amd.com Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 0e0978561804..eec4592c9328 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -2283,7 +2283,7 @@ void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bo
/* Power Interfaces */
-void dc_set_power_state(
+int dc_set_power_state(
struct dc *dc,
enum dc_acpi_cm_power_state power_state);
void dc_resume(struct dc *dc);