From 6bc1535ec64d0baa644db4e0aa8e3e8632033858 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 3 Oct 2022 10:16:12 +0000 Subject: [PATCH] drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega From Alex Deucher 0a7d86f156fad2a4420404c1f71c9ee79970ab0c in linux 5.15.y/5.15.70 dc1d85cb790f2091eea074cee24a704b2d6c4a06 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/soc15.c | 3 --- sys/dev/pci/drm/amd/amdgpu/vega10_ih.c | 4 ++++ sys/dev/pci/drm/amd/amdgpu/vega20_ih.c | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/soc15.c b/sys/dev/pci/drm/amd/amdgpu/soc15.c index 355e5b617f3..f31f318204e 100644 --- a/sys/dev/pci/drm/amd/amdgpu/soc15.c +++ b/sys/dev/pci/drm/amd/amdgpu/soc15.c @@ -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); } } diff --git a/sys/dev/pci/drm/amd/amdgpu/vega10_ih.c b/sys/dev/pci/drm/amd/amdgpu/vega10_ih.c index a9ca6988009..73728fa8599 100644 --- a/sys/dev/pci/drm/amd/amdgpu/vega10_ih.c +++ b/sys/dev/pci/drm/amd/amdgpu/vega10_ih.c @@ -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 */ diff --git a/sys/dev/pci/drm/amd/amdgpu/vega20_ih.c b/sys/dev/pci/drm/amd/amdgpu/vega20_ih.c index f51dfc38ac6..ac34af4cb17 100644 --- a/sys/dev/pci/drm/amd/amdgpu/vega20_ih.c +++ b/sys/dev/pci/drm/amd/amdgpu/vega20_ih.c @@ -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 */ -- 2.20.1