aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4306-drm-amdkfd-bug-fix-for-out-of-bounds-mem-on-gpu-cach.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4306-drm-amdkfd-bug-fix-for-out-of-bounds-mem-on-gpu-cach.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4306-drm-amdkfd-bug-fix-for-out-of-bounds-mem-on-gpu-cach.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4306-drm-amdkfd-bug-fix-for-out-of-bounds-mem-on-gpu-cach.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4306-drm-amdkfd-bug-fix-for-out-of-bounds-mem-on-gpu-cach.patch
new file mode 100644
index 00000000..ae9ad4bf
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4306-drm-amdkfd-bug-fix-for-out-of-bounds-mem-on-gpu-cach.patch
@@ -0,0 +1,36 @@
+From 75cf0d7a899f1dfdd25b245476ea124c1db17fca Mon Sep 17 00:00:00 2001
+From: Alex Sierra <alex.sierra@amd.com>
+Date: Thu, 24 Oct 2019 13:14:31 -0500
+Subject: [PATCH 4306/4736] drm/amdkfd: bug fix for out of bounds mem on gpu
+ cache filling info
+
+The bitmap in cu_info structure is defined as a 4x4 size array. In
+Acturus, this matrix is initialized as a 4x2. Based on the 8 shaders.
+In the gpu cache filling initialization, the access to the bitmap matrix
+was done as an 8x1 instead of 4x2. Causing an out of bounds memory
+access error.
+Due to this, the number of GPU cache entries was inconsistent.
+
+Change-Id: I20fadd0a12403a8808cf074c0d7160daad6834ee
+Signed-off-by: Alex Sierra <alex.sierra@amd.com>
+Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+index 7655c6a2b184..22fe58971a62 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+@@ -710,7 +710,7 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
+ pcache_info,
+ cu_info,
+ mem_available,
+- cu_info->cu_bitmap[i][j],
++ cu_info->cu_bitmap[i % 4][j + i / 4],
+ ct,
+ cu_processor_id,
+ k);
+--
+2.17.1
+