The AIE2 device firmware requires IOMMU on.

Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5319
Signed-off-by: Lizhi Hou <[email protected]>
---
 drivers/accel/amdxdna/aie2_pci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/accel/amdxdna/aie2_pci.c b/drivers/accel/amdxdna/aie2_pci.c
index c4d345d4c76b..22f66c7f534d 100644
--- a/drivers/accel/amdxdna/aie2_pci.c
+++ b/drivers/accel/amdxdna/aie2_pci.c
@@ -490,6 +490,11 @@ static int aie2_init(struct amdxdna_dev *xdna)
                return -EINVAL;
        }
 
+       if (!xdna->group) {
+               XDNA_ERR(xdna, "Running without IOMMU not supported");
+               return -EINVAL;
+       }
+
        ndev = drmm_kzalloc(&xdna->ddev, sizeof(*ndev), GFP_KERNEL);
        if (!ndev)
                return -ENOMEM;
-- 
2.34.1

Reply via email to