aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2170-drm-amd-amdgpu-if-visible-VRAM-allocation-fail-fall-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2170-drm-amd-amdgpu-if-visible-VRAM-allocation-fail-fall-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2170-drm-amd-amdgpu-if-visible-VRAM-allocation-fail-fall-.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2170-drm-amd-amdgpu-if-visible-VRAM-allocation-fail-fall-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2170-drm-amd-amdgpu-if-visible-VRAM-allocation-fail-fall-.patch
new file mode 100644
index 00000000..0be4c683
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2170-drm-amd-amdgpu-if-visible-VRAM-allocation-fail-fall-.patch
@@ -0,0 +1,35 @@
+From 5df7636f46d008fa5d9f2e46b2578edc09908164 Mon Sep 17 00:00:00 2001
+From: Roger He <Hongbo.He@amd.com>
+Date: Fri, 10 Nov 2017 20:00:30 +0800
+Subject: [PATCH 2170/4131] drm/amd/amdgpu: if visible VRAM allocation fail,
+ fall back to invisible try again
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Change-Id: Ie3d55f49dd6dfbde5e94474a3c3f7960d59874dc
+Reviewed-by: Christian König <christian.koenig@amd.com>
+Signed-off-by: Roger He <Hongbo.He@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+index a2c518c..97c25a7 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+@@ -89,6 +89,11 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
+ flags, NULL, resv, 0, &robj);
+ if (r) {
+ if (r != -ERESTARTSYS) {
++ if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) {
++ flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
++ goto retry;
++ }
++
+ if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) {
+ initial_domain |= AMDGPU_GEM_DOMAIN_GTT;
+ goto retry;
+--
+2.7.4
+