aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1339-drm-amdkfd-Fix-dmesg-error-on-used_memory-on-fjg.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1339-drm-amdkfd-Fix-dmesg-error-on-used_memory-on-fjg.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1339-drm-amdkfd-Fix-dmesg-error-on-used_memory-on-fjg.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1339-drm-amdkfd-Fix-dmesg-error-on-used_memory-on-fjg.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1339-drm-amdkfd-Fix-dmesg-error-on-used_memory-on-fjg.patch
new file mode 100644
index 00000000..d8f7f5bc
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1339-drm-amdkfd-Fix-dmesg-error-on-used_memory-on-fjg.patch
@@ -0,0 +1,40 @@
+From d27159d40f610695fb8473eb3e18f18b8d5111ab Mon Sep 17 00:00:00 2001
+From: Kent Russell <kent.russell@amd.com>
+Date: Wed, 30 Aug 2017 14:00:42 -0400
+Subject: [PATCH 1339/4131] drm/amdkfd: Fix dmesg error on used_memory on fjg
+
+The kfd_remove_sysfs_file will remove the memory properties sysfs file,
+but also the folders above it. This removes the folder that used_memory
+is in, before it can delete the used_memory file. Delete that file first
+using the same method we use to create it (sysfs_create/remove_file) and
+do that before we remove the memory attribute location.
+
+Change-Id: I78ba340dac13a0c3c8c98b74e0185cb86c1816a4
+Signed-off-by: Kent Russell <kent.russell@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+index 2e53311..ffd8e0f 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+@@ -577,12 +577,12 @@ static void kfd_remove_sysfs_node_entry(struct kfd_topology_device *dev)
+ if (dev->kobj_mem) {
+ list_for_each_entry(mem, &dev->mem_props, list)
+ if (mem->kobj) {
+- kfd_remove_sysfs_file(mem->kobj,
+- &mem->attr_props);
+ /* TODO: Remove when CPU/APU supported */
+ if (dev->node_props.cpu_cores_count == 0)
+- kfd_remove_sysfs_file(mem->kobj,
++ sysfs_remove_file(mem->kobj,
+ &mem->attr_used);
++ kfd_remove_sysfs_file(mem->kobj,
++ &mem->attr_props);
+ mem->kobj = NULL;
+ }
+ kobject_del(dev->kobj_mem);
+--
+2.7.4
+