]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: The interrupt source was not released
authorCe Sun <cesun102@amd.com>
Fri, 11 Jul 2025 09:57:25 +0000 (17:57 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Jul 2025 18:07:51 +0000 (14:07 -0400)
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.

Signed-off-by: Ce Sun <cesun102@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

index 183fa33c243479426f932c42c27f677f02c6e4bd..8112ffc85995e38f04fa2021f07bc16de801bb8f 100644 (file)
@@ -624,7 +624,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)