[PATCH] drm/amdgpu: add gfx v11_0_3 fed irq handling for sriov
YiPeng Chai
YiPeng.Chai at amd.com
Tue Apr 11 08:02:10 UTC 2023
Add gfx v11_0_3 fed irq handling for sriov.
Signed-off-by: YiPeng Chai <YiPeng.Chai at amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c
index b07a72ca25d9..068b9586a223 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0_3.c
@@ -62,10 +62,18 @@ static int gfx_v11_0_3_rlc_gc_fed_irq(struct amdgpu_device *adev,
return -EINVAL;
}
- ih_data.head = *ras_if;
-
dev_warn(adev->dev, "RLC %s FED IRQ\n", ras_if->name);
- amdgpu_ras_interrupt_dispatch(adev, &ih_data);
+
+ if (!amdgpu_sriov_vf(adev)) {
+ ih_data.head = *ras_if;
+ amdgpu_ras_interrupt_dispatch(adev, &ih_data);
+ } else {
+ if (adev->virt.ops && adev->virt.ops->ras_poison_handler)
+ adev->virt.ops->ras_poison_handler(adev);
+ else
+ dev_warn(adev->dev,
+ "No ras_poison_handler interface in SRIOV for %s!\n", ras_if->name);
+ }
return 0;
}
--
2.34.1
More information about the amd-gfx
mailing list