]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Pass up errors for reset GPU that fails to init HW
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 15 May 2025 20:16:17 +0000 (15:16 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Jul 2025 20:28:41 +0000 (16:28 -0400)
[Why]
If a GPU is in reset and the hardware fails to initialize the rest of the
resume sequence shouldn't be run.

[How]
Pass error code up to caller of dm_resume().

Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 5db0df2b0ecb30b9df9652e6beb10fabfa80dd86..2a175fc0399c264839274e9b9318e0469c37188a 100644 (file)
@@ -3398,8 +3398,10 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
                link_enc_cfg_copy(adev->dm.dc->current_state, dc_state);
 
                r = dm_dmub_hw_init(adev);
-               if (r)
+               if (r) {
                        drm_err(adev_to_drm(adev), "DMUB interface failed to initialize: status=%d\n", r);
+                       return r;
+               }
 
                dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
                dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0);