Skip to contentSkip to conversation

drm/amd/amdgpu: avoid to disable gfxhub interrupt when driver is unloaded

PATCH In review Kenneth Feng 2 participants 2 messages Oct 24, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: avoid to disable gfxhub interrupt when driver is unloaded

avoid to disable gfxhub interrupt when driver is unloaded on gmc 11

---
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +2 -1
index 80ca2c05b0b8..8e36a8395464 100644
@@ -73,7 +73,8 @@ gmc_v11_0_vm_fault_interrupt_state(struct amdgpu_device *adev,
 		 * fini/suspend, so the overall state doesn't
 		 * change over the course of suspend/resume.
 		 */
-		if (!adev->in_s0ix)
+		if (!adev->in_s0ix && (adev->in_runpm || adev->in_suspend ||
+							   amdgpu_in_reset(adev)))
 			amdgpu_gmc_set_vm_fault_masks(adev, AMDGPU_GFXHUB(0), false);
 		break;
 	case AMDGPU_IRQ_STATE_ENABLE:
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

[Public]

________________________________
From: Kenneth Feng <[email protected]>
Sent: Monday, October 23, 2023 11:32 PM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Feng, Kenneth <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: avoid to disable gfxhub interrupt when driver is unloaded

avoid to disable gfxhub interrupt when driver is unloaded on gmc 11

---
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c +2 -1
index 80ca2c05b0b8..8e36a8395464 100644
@@ -73,7 +73,8 @@ gmc_v11_0_vm_fault_interrupt_state(struct amdgpu_device *adev,
                  * fini/suspend, so the overall state doesn't
                  * change over the course of suspend/resume.
                  */
-               if (!adev->in_s0ix)
+               if (!adev->in_s0ix && (adev->in_runpm || adev->in_suspend ||
+                                                          amdgpu_in_reset(adev)))
                         amdgpu_gmc_set_vm_fault_masks(adev, AMDGPU_GFXHUB(0), false);
                 break;
         case AMDGPU_IRQ_STATE_ENABLE:

--
2.34.1