Skip to contentSkip to conversation

drm/amdgpu/irq: Move irq resume to the beginning

PATCH In review Emily Deng 2 participants 3 messages Aug 7, 2023 – Aug 8, 2023

Subsystems (2)
lore
Share & tools
lore

Emily Deng

author
#0 lore raw

PATCH 1/1 drm/amdgpu/irq: Move irq resume to the beginning

Need to move irq resume to the beginning of reset sriov, or if one interrupt occurs before irq resume, then the irq won't work anymore.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 1338489b0b2f..8b304fdfe6db 100644
@@ -4617,6 +4617,7 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
 		r = amdgpu_virt_reset_gpu(adev);
 	if (r)
 		return r;
+	amdgpu_irq_gpu_reset_resume_helper(adev);
 
 	/* some sw clean up VF needs to do before recover */
 	amdgpu_virt_post_reset(adev);
@@ -4646,7 +4647,6 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
 		amdgpu_put_xgmi_hive(hive);
 
 	if (!r) {
-		amdgpu_irq_gpu_reset_resume_helper(adev);
 		r = amdgpu_ib_ring_tests(adev);
 
 		amdgpu_amdkfd_post_reset(adev);
Signature · 1 line
2.36.1
#1 lore raw

[AMD Official Use Only - General]

Ping.....

Quoted 40 lines

-----Original Message-----
From: Emily Deng <[email protected]>
Sent: Monday, August 7, 2023 1:11 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu/irq: Move irq resume to the beginning

Need to move irq resume to the beginning of reset sriov, or if one interrupt occurs before irq resume, then the irq won't work anymore.

---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 1338489b0b2f..8b304fdfe6db 100644
@@ -4617,6 +4617,7 @@ static int amdgpu_device_reset_sriov(struct
 amdgpu_device *adev,
              r = amdgpu_virt_reset_gpu(adev);
      if (r)
              return r;
+      amdgpu_irq_gpu_reset_resume_helper(adev);
 
      /* some sw clean up VF needs to do before recover */
      amdgpu_virt_post_reset(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
@@ -4646,7 +4647,6 @@ static int amdgpu_device_reset_sriov(struct
 amdgpu_device *adev,
              amdgpu_put_xgmi_hive(hive);
 
      if (!r) {
-              amdgpu_irq_gpu_reset_resume_helper(adev);
              r = amdgpu_ib_ring_tests(adev);
 
              amdgpu_amdkfd_post_reset(adev);

--
2.36.1

Acked-by
#2 lore raw
Quoted 46 lines · Emily

[AMD Official Use Only - General]

Ping.....

Quoted 40 lines

-----Original Message-----
From: Emily Deng <[email protected]>
Sent: Monday, August 7, 2023 1:11 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH] drm/amdgpu/irq: Move irq resume to the beginning

Need to move irq resume to the beginning of reset sriov, or if one interrupt occurs before irq resume, then the irq won't work anymore.

---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 1338489b0b2f..8b304fdfe6db 100644
@@ -4617,6 +4617,7 @@ static int amdgpu_device_reset_sriov(struct
 amdgpu_device *adev,
              r = amdgpu_virt_reset_gpu(adev);
      if (r)
              return r;
+      amdgpu_irq_gpu_reset_resume_helper(adev);
 
      /* some sw clean up VF needs to do before recover */
      amdgpu_virt_post_reset(adev);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
@@ -4646,7 +4647,6 @@ static int amdgpu_device_reset_sriov(struct
 amdgpu_device *adev,
              amdgpu_put_xgmi_hive(hive);
 
      if (!r) {
-              amdgpu_irq_gpu_reset_resume_helper(adev);
              r = amdgpu_ib_ring_tests(adev);
 
              amdgpu_amdkfd_post_reset(adev);

--
2.36.1