aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0651-drm-amd-scheduler-don-t-oops-on-failure-to-load.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0651-drm-amd-scheduler-don-t-oops-on-failure-to-load.patch')
-rw-r--r--common/recipes-kernel/linux/files/0651-drm-amd-scheduler-don-t-oops-on-failure-to-load.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0651-drm-amd-scheduler-don-t-oops-on-failure-to-load.patch b/common/recipes-kernel/linux/files/0651-drm-amd-scheduler-don-t-oops-on-failure-to-load.patch
new file mode 100644
index 00000000..78086444
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0651-drm-amd-scheduler-don-t-oops-on-failure-to-load.patch
@@ -0,0 +1,42 @@
+From 0c8cb2e95b31ea63d2ef819403a48436cbd3504a Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Tue, 3 Nov 2015 11:10:03 -0500
+Subject: [PATCH 0651/1050] drm/amd/scheduler: don't oops on failure to load
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In two places amdgpu tries to tear down something it hasn't
+initalised when failing. This is what happens when you
+enable experimental support on topaz which then fails in
+ring init.
+
+This patch allows it to fail cleanly.
+
+agd: Split out from from the original patch since the
+scheduler is a driver independent.
+
+Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Cc: stable@vger.kernel.org
+---
+ drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+index 8dd7316..b3e84d0 100644
+--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
++++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+@@ -468,5 +468,6 @@ int amd_sched_init(struct amd_gpu_scheduler *sched,
+ */
+ void amd_sched_fini(struct amd_gpu_scheduler *sched)
+ {
+- kthread_stop(sched->thread);
++ if (sched->thread)
++ kthread_stop(sched->thread);
+ }
+--
+1.9.1
+