aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2036-drm-ttm-return-immediately-in-case-of-a-signal.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2036-drm-ttm-return-immediately-in-case-of-a-signal.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2036-drm-ttm-return-immediately-in-case-of-a-signal.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2036-drm-ttm-return-immediately-in-case-of-a-signal.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2036-drm-ttm-return-immediately-in-case-of-a-signal.patch
new file mode 100644
index 00000000..187d16b4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2036-drm-ttm-return-immediately-in-case-of-a-signal.patch
@@ -0,0 +1,54 @@
+From da43003be6352fe2ecdccdd1dee7886c0181cd4b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 13 May 2019 15:36:08 +0200
+Subject: [PATCH 2036/2940] drm/ttm: return immediately in case of a signal
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When a signal arrives we should return immediately for
+handling it and not try other placements first.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Acked-by: Chunming Zhou <david1.zhou@amd.com>
+Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+Signed-off-by: Chaudhary Amit Kumar <Chaudharyamit.Kumar@amd.com>
+---
+ drivers/gpu/drm/ttm/ttm_bo.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
+index 263d467d0042..6b79825705d9 100644
+--- a/drivers/gpu/drm/ttm/ttm_bo.c
++++ b/drivers/gpu/drm/ttm/ttm_bo.c
+@@ -989,7 +989,6 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
+ uint32_t cur_flags = 0;
+ bool type_found = false;
+ bool type_ok = false;
+- bool has_erestartsys = false;
+ int i, ret;
+
+ ret = reservation_object_reserve_shared(bo->resv);
+@@ -1080,8 +1079,8 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
+ mem->placement = cur_flags;
+ return 0;
+ }
+- if (ret == -ERESTARTSYS)
+- has_erestartsys = true;
++ if (ret && ret != -EBUSY)
++ return ret;
+ }
+
+ if (!type_found) {
+@@ -1089,7 +1088,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
+ return -EINVAL;
+ }
+
+- return (has_erestartsys) ? -ERESTARTSYS : -ENOMEM;
++ return -ENOMEM;
+ }
+ EXPORT_SYMBOL(ttm_bo_mem_space);
+
+--
+2.17.1
+