]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu/vcn: during dpc recovery will corrupt VCPU buffer
authorCe Sun <cesun102@amd.com>
Tue, 31 Dec 2024 04:53:13 +0000 (12:53 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Apr 2025 19:18:31 +0000 (15:18 -0400)
err_event_athub and dpc recovery will corrupt VCPU buffer,
so we need to restore fw data and clear buffer in amdgpu_vcn_resume()

Signed-off-by: Ce Sun <cesun102@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c

index 1991dd3d1056a16885ab4ed4b95066759d9fd790..c8885c3d54b332fc777fc3d16d40c76eee1cfeaf 100644 (file)
@@ -353,9 +353,9 @@ int amdgpu_vcn_suspend(struct amdgpu_device *adev, int i)
 
        cancel_delayed_work_sync(&adev->vcn.inst[i].idle_work);
 
-       /* err_event_athub will corrupt VCPU buffer, so we need to
+       /* err_event_athub and dpc recovery will corrupt VCPU buffer, so we need to
         * restore fw data and clear buffer in amdgpu_vcn_resume() */
-       if (in_ras_intr)
+       if (in_ras_intr || adev->pcie_reset_ctx.in_link_reset)
                return 0;
 
        return amdgpu_vcn_save_vcpu_bo_inst(adev, i);