aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0486-drm-amdgpu-fix-scheduler-thread-creation-error-check.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0486-drm-amdgpu-fix-scheduler-thread-creation-error-check.patch')
-rw-r--r--meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0486-drm-amdgpu-fix-scheduler-thread-creation-error-check.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0486-drm-amdgpu-fix-scheduler-thread-creation-error-check.patch b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0486-drm-amdgpu-fix-scheduler-thread-creation-error-check.patch
new file mode 100644
index 00000000..4653c2bc
--- /dev/null
+++ b/meta-amdfalconx86/recipes-kernel/linux/linux-yocto/0486-drm-amdgpu-fix-scheduler-thread-creation-error-check.patch
@@ -0,0 +1,44 @@
+From f49565982194d601f4f3a99892d0f3c765aec104 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Thu, 20 Aug 2015 16:59:38 +0200
+Subject: [PATCH 0486/1050] drm/amdgpu: fix scheduler thread creation error
+ checking
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
+---
+ drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+index 0133697..435d704 100644
+--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
++++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+@@ -367,15 +367,14 @@ struct amd_gpu_scheduler *amd_sched_create(void *device,
+ init_waitqueue_head(&sched->wait_queue);
+ atomic_set(&sched->hw_rq_count, 0);
+ /* Each scheduler will run on a seperate kernel thread */
+- sched->thread = kthread_create(amd_sched_main, sched, name);
+- if (sched->thread) {
+- wake_up_process(sched->thread);
+- return sched;
++ sched->thread = kthread_run(amd_sched_main, sched, name);
++ if (IS_ERR(sched->thread)) {
++ DRM_ERROR("Failed to create scheduler for id %d.\n", ring);
++ kfree(sched);
++ return NULL;
+ }
+
+- DRM_ERROR("Failed to create scheduler for id %d.\n", ring);
+- kfree(sched);
+- return NULL;
++ return sched;
+ }
+
+ /**
+--
+1.9.1
+