aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3721-drm-amdgpu-initial-validate-the-prime-BOs-into-the-C.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3721-drm-amdgpu-initial-validate-the-prime-BOs-into-the-C.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3721-drm-amdgpu-initial-validate-the-prime-BOs-into-the-C.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3721-drm-amdgpu-initial-validate-the-prime-BOs-into-the-C.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3721-drm-amdgpu-initial-validate-the-prime-BOs-into-the-C.patch
new file mode 100644
index 00000000..b70cc505
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3721-drm-amdgpu-initial-validate-the-prime-BOs-into-the-C.patch
@@ -0,0 +1,46 @@
+From 4cd6cb9871ef3e0f46ae163741b8112143828209 Mon Sep 17 00:00:00 2001
+From: Christian Koenig <christian.koenig@amd.com>
+Date: Tue, 20 Feb 2018 19:42:40 +0100
+Subject: [PATCH 3721/4131] drm/amdgpu: initial validate the prime BOs into the
+ CPU domain
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Just set the GTT domain as mandatory, so that the BO is validated into
+it on first use. This allows us to setup the sg table later on.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Acked-by: Roger He <Hongbo.He@amd.com>
+
+Conflicts:
+ drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+
+Change-Id: I57cd74dc56c8ca2c9748ad40ee2f07453318efc2
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+index 3af671b..46e8898 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
+@@ -104,11 +104,12 @@ amdgpu_gem_prime_import_sg_table(struct drm_device *dev,
+
+ ww_mutex_lock(&resv->lock, NULL);
+ ret = amdgpu_bo_create(adev, attach->dmabuf->size, PAGE_SIZE, false,
+- AMDGPU_GEM_DOMAIN_GTT, 0, sg, resv, &bo);
++ AMDGPU_GEM_DOMAIN_CPU, 0, sg, resv, &bo);
+ if (ret)
+ goto error;
+-
+- bo->prime_shared_count = 1;
++
++ bo->allowed_domains = AMDGPU_GEM_DOMAIN_GTT;
++ bo->preferred_domains = AMDGPU_GEM_DOMAIN_GTT;
+
+ ww_mutex_unlock(&resv->lock);
+ return &bo->gem_base;
+--
+2.7.4
+