Skip to contentSkip to conversation

drm/amdgpu: The interrupt source was not released

PATCH In review Ce Sun 2 participants 2 messages Jul 11, 2025

Subsystems (2)
lore
Share & tools
lore

Ce Sun

author
#0 lore raw

PATCH 1/1 drm/amdgpu: The interrupt source was not released

When the driver is unloaded, the interrupt source of the rma device is not released, resulting in the failure of hw_init when loading again using bad_page_threshold.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +1 -1
index cdffe4a1559f..80cb8865c02d 100644
@@ -622,7 +622,7 @@ int amdgpu_irq_put(struct amdgpu_device *adev, struct amdgpu_irq_src *src,
 		   unsigned int type)
 {
 	/* When the threshold is reached,the interrupt source may not be enabled.return -EINVAL */
-	if (amdgpu_ras_is_rma(adev))
+	if (amdgpu_ras_is_rma(adev) && !amdgpu_irq_enabled(adev, src, type))
 		return -EINVAL;
 
 	if (!adev->irq.installed)
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 34 lines

-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]>
Sent: Friday, July 11, 2025 6:16 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Sun, Ce(Overlord) <[email protected]>
Subject: [PATCH] drm/amdgpu: The interrupt source was not released

When the driver is unloaded, the interrupt source of the rma device is not released, resulting in the failure of hw_init when loading again using bad_page_threshold.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0 -0
index cdffe4a1559f..80cb8865c02d 100644
@@ -622,7 +622,7 @@ int amdgpu_irq_put(struct amdgpu_device *adev, struct
 amdgpu_irq_src *src,
                 unsigned int type)
 {
      /* When the threshold is reached,the interrupt source may not be

enabled.return -EINVAL */

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +1 -2
-     if (amdgpu_ras_is_rma(adev))
+     if (amdgpu_ras_is_rma(adev) && !amdgpu_irq_enabled(adev, src, type))
              return -EINVAL;
 
      if (!adev->irq.installed)
--

2.34.1