diff options
author | Christian König <christian.koenig@amd.com> | 2016-08-15 11:00:22 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-25 14:38:13 -0400 |
commit | 03f48dd5d2085b978353a804635b6d34e77a5635 (patch) | |
tree | 4f55e06c16167af6227c9a348c7e168c7346a6c8 /drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | |
parent | cfa32556e58d8a353666fb007f708a4955c6711c (diff) |
drm/amdgpu: add AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS flag v3
Add a flag noting that a BO must be created using linear VRAM
and set this flag on all in kernel users where appropriate.
Hopefully I haven't missed anything.
v2: add it in a few more places, fix CPU mapping.
v3: rename to VRAM_CONTIGUOUS, fix typo in CS code.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 71116da9e782..b2cf1290c1cf 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | |||
@@ -3391,7 +3391,8 @@ static int gfx_v7_0_rlc_init(struct amdgpu_device *adev) | |||
3391 | if (adev->gfx.rlc.save_restore_obj == NULL) { | 3391 | if (adev->gfx.rlc.save_restore_obj == NULL) { |
3392 | r = amdgpu_bo_create(adev, dws * 4, PAGE_SIZE, true, | 3392 | r = amdgpu_bo_create(adev, dws * 4, PAGE_SIZE, true, |
3393 | AMDGPU_GEM_DOMAIN_VRAM, | 3393 | AMDGPU_GEM_DOMAIN_VRAM, |
3394 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, | 3394 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | |
3395 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, | ||
3395 | NULL, NULL, | 3396 | NULL, NULL, |
3396 | &adev->gfx.rlc.save_restore_obj); | 3397 | &adev->gfx.rlc.save_restore_obj); |
3397 | if (r) { | 3398 | if (r) { |
@@ -3435,7 +3436,8 @@ static int gfx_v7_0_rlc_init(struct amdgpu_device *adev) | |||
3435 | if (adev->gfx.rlc.clear_state_obj == NULL) { | 3436 | if (adev->gfx.rlc.clear_state_obj == NULL) { |
3436 | r = amdgpu_bo_create(adev, dws * 4, PAGE_SIZE, true, | 3437 | r = amdgpu_bo_create(adev, dws * 4, PAGE_SIZE, true, |
3437 | AMDGPU_GEM_DOMAIN_VRAM, | 3438 | AMDGPU_GEM_DOMAIN_VRAM, |
3438 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, | 3439 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | |
3440 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, | ||
3439 | NULL, NULL, | 3441 | NULL, NULL, |
3440 | &adev->gfx.rlc.clear_state_obj); | 3442 | &adev->gfx.rlc.clear_state_obj); |
3441 | if (r) { | 3443 | if (r) { |
@@ -3475,7 +3477,8 @@ static int gfx_v7_0_rlc_init(struct amdgpu_device *adev) | |||
3475 | if (adev->gfx.rlc.cp_table_obj == NULL) { | 3477 | if (adev->gfx.rlc.cp_table_obj == NULL) { |
3476 | r = amdgpu_bo_create(adev, adev->gfx.rlc.cp_table_size, PAGE_SIZE, true, | 3478 | r = amdgpu_bo_create(adev, adev->gfx.rlc.cp_table_size, PAGE_SIZE, true, |
3477 | AMDGPU_GEM_DOMAIN_VRAM, | 3479 | AMDGPU_GEM_DOMAIN_VRAM, |
3478 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, | 3480 | AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | |
3481 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS, | ||
3479 | NULL, NULL, | 3482 | NULL, NULL, |
3480 | &adev->gfx.rlc.cp_table_obj); | 3483 | &adev->gfx.rlc.cp_table_obj); |
3481 | if (r) { | 3484 | if (r) { |