Sriov guest side doesn't init ras feature hence the poison irq shouldn't
be put during hw fini

Signed-off-by: Mangesh Gadre <mangesh.ga...@amd.com>
Reviewed-by: Hawking Zhang <hawking.zh...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c 
b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
index a2d781898767..47bde62b3909 100644
--- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_1.c
@@ -315,7 +315,7 @@ static int jpeg_v5_0_1_hw_fini(struct amdgpu_ip_block 
*ip_block)
                        ret = jpeg_v5_0_1_set_powergating_state(ip_block, 
AMD_PG_STATE_GATE);
        }
 
-       if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__JPEG))
+       if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__JPEG) && 
!amdgpu_sriov_vf(adev))
                amdgpu_irq_put(adev, &adev->jpeg.inst->ras_poison_irq, 0);
 
        return ret;
-- 
2.34.1

Reply via email to