aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/3626-drm-amd-amdgpu-Mask-rptr-as-well-in-ring-debugfs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/3626-drm-amd-amdgpu-Mask-rptr-as-well-in-ring-debugfs.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/3626-drm-amd-amdgpu-Mask-rptr-as-well-in-ring-debugfs.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/3626-drm-amd-amdgpu-Mask-rptr-as-well-in-ring-debugfs.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/3626-drm-amd-amdgpu-Mask-rptr-as-well-in-ring-debugfs.patch
new file mode 100644
index 00000000..f52a2392
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/3626-drm-amd-amdgpu-Mask-rptr-as-well-in-ring-debugfs.patch
@@ -0,0 +1,31 @@
+From a86d598009a6b0a4c61c272dc89ddafc2df8363d Mon Sep 17 00:00:00 2001
+From: Tom St Denis <tom.stdenis@amd.com>
+Date: Thu, 1 Mar 2018 09:39:57 -0500
+Subject: [PATCH 3626/4131] drm/amd/amdgpu: Mask rptr as well in ring debugfs
+
+The read/write pointers on sdma4 devices increment
+beyond the ring size and should be masked. Tested
+on my Ryzen 2400G.
+
+Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+index e223b0f..d5f526f 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+@@ -484,7 +484,7 @@ static ssize_t amdgpu_debugfs_ring_read(struct file *f, char __user *buf,
+ result = 0;
+
+ if (*pos < 12) {
+- early[0] = amdgpu_ring_get_rptr(ring);
++ early[0] = amdgpu_ring_get_rptr(ring) & ring->buf_mask;
+ early[1] = amdgpu_ring_get_wptr(ring) & ring->buf_mask;
+ early[2] = ring->wptr & ring->buf_mask;
+ for (i = *pos / 4; i < 3 && size; i++) {
+--
+2.7.4
+