aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0215-drm-amdgpu-remove-redundant-memset.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0215-drm-amdgpu-remove-redundant-memset.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0215-drm-amdgpu-remove-redundant-memset.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0215-drm-amdgpu-remove-redundant-memset.patch b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0215-drm-amdgpu-remove-redundant-memset.patch
new file mode 100644
index 00000000..e69f9d8b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/0215-drm-amdgpu-remove-redundant-memset.patch
@@ -0,0 +1,37 @@
+From 1c4921babce891f392076b2b52b9103964f13c40 Mon Sep 17 00:00:00 2001
+From: Philip Yang <Philip.Yang@amd.com>
+Date: Wed, 29 Aug 2018 10:53:23 -0400
+Subject: [PATCH 0215/2940] drm/amdgpu: remove redundant memset
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+kvmalloc_array uses __GFP_ZERO flag ensures that the returned address
+is zeroed already, memset it to zero again afterwards is unnecessary,
+and in this case buggy because we only clear the first entry.
+
+Change-Id: I45ec0934143e2eab62b4d6c6aa8cbd7b998ee30a
+Signed-off-by: Philip Yang <Philip.Yang@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Kalyan Alle <kalyan.alle@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+index 114fdae3867f..3d5e8933d555 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+@@ -541,7 +541,6 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
+ GFP_KERNEL | __GFP_ZERO);
+ if (!parent->entries)
+ return -ENOMEM;
+- memset(parent->entries, 0 , sizeof(struct amdgpu_vm_pt));
+ }
+
+ from = saddr >> shift;
+--
+2.17.1
+