summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-10-03 10:16:13 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-10-03 10:16:13 +0000
commite6d4a0cf4d94efed758e5fe128146b41e9b77f8c (patch)
tree5d7df97b642a575b20bec1e6f384a56048e91c40 /sys/dev/pci/drm
parent87220bbec68a25f213116e43da9479f345cf3552 (diff)
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
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/soc15.c3
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/vega10_ih.c4
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/vega20_ih.c4
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 */