drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega
authorjsg <jsg@openbsd.org>
Mon, 3 Oct 2022 10:16:12 +0000 (10:16 +0000)
committerjsg <jsg@openbsd.org>
Mon, 3 Oct 2022 10:16:12 +0000 (10:16 +0000)
From Alex Deucher
0a7d86f156fad2a4420404c1f71c9ee79970ab0c in linux 5.15.y/5.15.70
dc1d85cb790f2091eea074cee24a704b2d6c4a06 in mainline linux

sys/dev/pci/drm/amd/amdgpu/soc15.c
sys/dev/pci/drm/amd/amdgpu/vega10_ih.c
sys/dev/pci/drm/amd/amdgpu/vega20_ih.c

index 355e5b6..f31f318 100644 (file)
@@ -1429,9 +1429,6 @@ static void soc15_doorbell_range_init(struct amdgpu_device *adev)
                                ring->use_doorbell, ring->doorbell_index,
                                adev->doorbell_index.sdma_doorbell_range);
                }
-
-               adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell,
-                                               adev->irq.ih.doorbell_index);
        }
 }
 
index a9ca698..73728fa 100644 (file)
@@ -289,6 +289,10 @@ static int vega10_ih_irq_init(struct amdgpu_device *adev)
                }
        }
 
+       if (!amdgpu_sriov_vf(adev))
+               adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell,
+                                                   adev->irq.ih.doorbell_index);
+
        pci_set_master(adev->pdev);
 
        /* enable interrupts */
index f51dfc3..ac34af4 100644 (file)
@@ -340,6 +340,10 @@ static int vega20_ih_irq_init(struct amdgpu_device *adev)
                }
        }
 
+       if (!amdgpu_sriov_vf(adev))
+               adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell,
+                                                   adev->irq.ih.doorbell_index);
+
        pci_set_master(adev->pdev);
 
        /* enable interrupts */