aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0677-drm-amdgpu-fix-sdma-v4-ring-is-disabled-accidently.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0677-drm-amdgpu-fix-sdma-v4-ring-is-disabled-accidently.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0677-drm-amdgpu-fix-sdma-v4-ring-is-disabled-accidently.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0677-drm-amdgpu-fix-sdma-v4-ring-is-disabled-accidently.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0677-drm-amdgpu-fix-sdma-v4-ring-is-disabled-accidently.patch
new file mode 100644
index 00000000..692f0968
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0677-drm-amdgpu-fix-sdma-v4-ring-is-disabled-accidently.patch
@@ -0,0 +1,50 @@
+From 24ee44688efd73d033a28d1ef51cd20bf90d2aa4 Mon Sep 17 00:00:00 2001
+From: Philip Yang <Philip.Yang@amd.com>
+Date: Fri, 19 Oct 2018 14:58:28 -0400
+Subject: [PATCH 0677/2940] drm/amdgpu: fix sdma v4 ring is disabled accidently
+
+For sdma v4, there is bug caused by
+commit d4e869b6b5d6 ("drm/amdgpu: add ring test for page queue")'
+
+local variable ring is reused and changed, so amdgpu_ttm_set_buffer_funcs_status(adev, true)
+is skipped accidently. As a result, amdgpu_fill_buffer() will fail, kernel message:
+
+[drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.
+[ 25.260444] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.
+[ 25.260627] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.
+[ 25.290119] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.
+[ 25.290370] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.
+[ 25.319971] [drm:amdgpu_fill_buffer [amdgpu]] *ERROR* Trying to clear memory with ring turned off.
+[ 25.320486] amdgpu 0000:19:00.0: [mmhub] VMC page fault (src_id:0 ring:154 vmid:8 pasid:32768, for process pid 0 thread pid 0)
+[ 25.320533] amdgpu 0000:19:00.0: in page starting at address 0x0000000000000000 from 18
+[ 25.320563] amdgpu 0000:19:00.0: VM_L2_PROTECTION_FAULT_STATUS:0x00800134
+
+Signed-off-by: Philip Yang <Philip.Yang@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+index dc0e8053a477..c0d1650d6c71 100644
+--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+@@ -1151,10 +1151,11 @@ static int sdma_v4_0_start(struct amdgpu_device *adev)
+ }
+
+ if (adev->sdma.has_page_queue) {
+- ring = &adev->sdma.instance[i].page;
+- r = amdgpu_ring_test_ring(ring);
++ struct amdgpu_ring *page = &adev->sdma.instance[i].page;
++
++ r = amdgpu_ring_test_ring(page);
+ if (r) {
+- ring->ready = false;
++ page->ready = false;
+ return r;
+ }
+ }
+--
+2.17.1
+