drm/amd: Propagate failures in dc_set_power_state()
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 21 Sep 2023 14:50:04 +0000 (09:50 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2023 21:00:22 +0000 (17:00 -0400)
commit7441ef0b3ebe11ee46db82f7f7eee0f68b35e192
tree947fe9e7524e82c053dce6757f3938b0e6680614
parent41801c6b3042e2813365ee4def3f2804fd77776a
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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h