From 9bf020ed7abeec4c4dc379b7ef7b284c6cebe156 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 1 Aug 2022 16:06:06 +0000 Subject: [PATCH] drm/amd/display: Reset DMCUB before HW init From Nicholas Kazlauskas b3f16976b9ed7afafa2caf12ef5539fafc34d48d in linux 5.15.y/5.15.58 791255ca9fbe38042cfd55df5deb116dc11fef18 in mainline linux --- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 94149da4a4d..3f732465c08 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1030,6 +1030,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 + -- 2.20.1