[09/10] drm/amdgpu: create GDS, GWS and OA in system domain

Submitted by =?UTF-8?q?Christian=20K=C3=B6nig?= on May 22, 2019, 12:59 p.m.

Details

Message ID 20190522125947.4592-9-christian.koenig@amd.com
State Accepted
Commit 94de7349f78d1c598c852eef07c9f3097bad84f9
Headers show
Series "Series without cover letter" ( rev: 2 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

=?UTF-8?q?Christian=20K=C3=B6nig?= May 22, 2019, 12:59 p.m.
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>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 93b2c5a48a71..30493429851e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -495,7 +495,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;