aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4519-drm-amdgpu-fix-bad-DMA-from-INTERRUPT_CNTL2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4519-drm-amdgpu-fix-bad-DMA-from-INTERRUPT_CNTL2.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4519-drm-amdgpu-fix-bad-DMA-from-INTERRUPT_CNTL2.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4519-drm-amdgpu-fix-bad-DMA-from-INTERRUPT_CNTL2.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4519-drm-amdgpu-fix-bad-DMA-from-INTERRUPT_CNTL2.patch
new file mode 100644
index 00000000..1dec60b5
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4519-drm-amdgpu-fix-bad-DMA-from-INTERRUPT_CNTL2.patch
@@ -0,0 +1,37 @@
+From f7dfb5fae746cff572f21503242b9004792d9790 Mon Sep 17 00:00:00 2001
+From: Sam Bobroff <sbobroff@linux.ibm.com>
+Date: Mon, 18 Nov 2019 10:53:54 +1100
+Subject: [PATCH 4519/4736] drm/amdgpu: fix bad DMA from INTERRUPT_CNTL2
+
+The INTERRUPT_CNTL2 register expects a valid DMA address, but is
+currently set with a GPU MC address. This can cause problems on
+systems that detect the resulting DMA read from an invalid address
+(found on a Power8 guest).
+
+Instead, use the DMA address of the dummy page because it will always
+be safe.
+
+Fixes: 27ae10641e9c ("drm/amdgpu: add interupt handler implementation for si v3")
+Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/si_ih.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c
+index 8c50c9cab455..28e04fe0ed33 100644
+--- a/drivers/gpu/drm/amd/amdgpu/si_ih.c
++++ b/drivers/gpu/drm/amd/amdgpu/si_ih.c
+@@ -62,7 +62,8 @@ static int si_ih_irq_init(struct amdgpu_device *adev)
+ u32 interrupt_cntl, ih_cntl, ih_rb_cntl;
+
+ si_ih_disable_interrupts(adev);
+- WREG32(INTERRUPT_CNTL2, adev->irq.ih.gpu_addr >> 8);
++ /* set dummy read address to dummy page address */
++ WREG32(INTERRUPT_CNTL2, adev->dummy_page_addr >> 8);
+ interrupt_cntl = RREG32(INTERRUPT_CNTL);
+ interrupt_cntl &= ~IH_DUMMY_RD_OVERRIDE;
+ interrupt_cntl &= ~IH_REQ_NONSNOOP_EN;
+--
+2.17.1
+