From d272372a05daab083e78d79b8b84128f86c949e3 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 30 Nov 2023 02:18:37 +0000 Subject: [PATCH] drm/amdgpu: not to save bo in the case of RAS err_event_athub From David (Ming Qiang) Wu 5b978a8ce49719625c796f80ef6929312743badd in linux-6.1.y/6.1.64 fa1f1cc09d588a90c8ce3f507c47df257461d148 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_vcn.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vcn.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vcn.c index 38de4be59f4..5ad507e0f20 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vcn.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vcn.c @@ -393,8 +393,15 @@ int amdgpu_vcn_suspend(struct amdgpu_device *adev) void *ptr; int i, idx; + bool in_ras_intr = amdgpu_ras_intr_triggered(); + cancel_delayed_work_sync(&adev->vcn.idle_work); + /* err_event_athub will corrupt VCPU buffer, so we need to + * restore fw data and clear buffer in amdgpu_vcn_resume() */ + if (in_ras_intr) + return 0; + for (i = 0; i < adev->vcn.num_vcn_inst; ++i) { if (adev->vcn.harvest_config & (1 << i)) continue; -- 2.20.1