drm/amd/display: Reset DMCUB before HW init
authorjsg <jsg@openbsd.org>
Mon, 1 Aug 2022 16:06:06 +0000 (16:06 +0000)
committerjsg <jsg@openbsd.org>
Mon, 1 Aug 2022 16:06:06 +0000 (16:06 +0000)
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

index 94149da..3f73246 100644 (file)
@@ -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 +