Skip to content

Commit

Permalink
drm/amd/display: Reset DMCUB before HW init
Browse files Browse the repository at this point in the history
[Why]
If the firmware wasn't reset by PSP or HW and is currently running
then the firmware will hang or perform underfined behavior when we
modify its firmware state underneath it.

[How]
Reset DMCUB before setting up cache windows and performing HW init.

Reviewed-by: Aurabindo Jayamohanan Pillai <[email protected]>
Acked-by: Pavle Kotarac <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
Nicholas Kazlauskas authored and alexdeucher committed Dec 14, 2021
1 parent 7e4d2f3 commit 791255c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,11 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
return 0;
}

/* Reset DMCUB if it was previously running - before we overwrite its memory. */
status = dmub_srv_hw_reset(dmub_srv);
if (status != DMUB_STATUS_OK)
DRM_WARN("Error resetting DMUB HW: %d\n", status);

hdr = (const struct dmcub_firmware_header_v1_0 *)dmub_fw->data;

fw_inst_const = dmub_fw->data +
Expand Down

0 comments on commit 791255c

Please sign in to comment.