diff options
author | Christian König <christian.koenig@amd.com> | 2019-05-16 10:25:35 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-11 11:52:12 -0500 |
commit | 94de7349f78d1c598c852eef07c9f3097bad84f9 (patch) | |
tree | aee7e1b706cadbaebe7542fc09b33d10beae3cbd /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
parent | a3e7738d577162557e03176aed1594746fc2388e (diff) | |
download | lwn-94de7349f78d1c598c852eef07c9f3097bad84f9.tar.gz lwn-94de7349f78d1c598c852eef07c9f3097bad84f9.zip |
drm/amdgpu: create GDS, GWS and OA in system domain
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |