aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2045-drm-amdgpu-create-GDS-GWS-and-OA-in-system-domain.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2045-drm-amdgpu-create-GDS-GWS-and-OA-in-system-domain.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2045-drm-amdgpu-create-GDS-GWS-and-OA-in-system-domain.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2045-drm-amdgpu-create-GDS-GWS-and-OA-in-system-domain.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2045-drm-amdgpu-create-GDS-GWS-and-OA-in-system-domain.patch
new file mode 100644
index 00000000..e3a8c227
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2045-drm-amdgpu-create-GDS-GWS-and-OA-in-system-domain.patch
@@ -0,0 +1,38 @@
+From a783a9b6c073f396b26ccd8dad796dd4a05e532f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Thu, 16 May 2019 10:25:35 +0200
+Subject: [PATCH 2045/2940] drm/amdgpu: create GDS, GWS and OA in system domain
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+And only move them in on validation. This allows for better control
+when multiple processes are fighting over those resources.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
+Tested-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+index ecec6d2ecf73..0112e601d766 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+@@ -516,7 +516,11 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
+ #endif
+
+ bo->tbo.bdev = &adev->mman.bdev;
+- amdgpu_bo_placement_from_domain(bo, bp->domain);
++ if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA |
++ AMDGPU_GEM_DOMAIN_GDS))
++ amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU);
++ else
++ amdgpu_bo_placement_from_domain(bo, bp->domain);
+ if (bp->type == ttm_bo_type_kernel)
+ bo->tbo.priority = 1;
+
+--
+2.17.1
+