aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-08-15 11:00:22 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-10-25 14:38:13 -0400
commit03f48dd5d2085b978353a804635b6d34e77a5635 (patch)
tree4f55e06c16167af6227c9a348c7e168c7346a6c8 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parentcfa32556e58d8a353666fb007f708a4955c6711c (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_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index ee6a48a09214..bd4d041717bf 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -1273,7 +1273,8 @@ static int gfx_v8_0_rlc_init(struct amdgpu_device *adev)
1273 if (adev->gfx.rlc.clear_state_obj == NULL) { 1273 if (adev->gfx.rlc.clear_state_obj == NULL) {
1274 r = amdgpu_bo_create(adev, dws * 4, PAGE_SIZE, true, 1274 r = amdgpu_bo_create(adev, dws * 4, PAGE_SIZE, true,
1275 AMDGPU_GEM_DOMAIN_VRAM, 1275 AMDGPU_GEM_DOMAIN_VRAM,
1276 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, 1276 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
1277 AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
1277 NULL, NULL, 1278 NULL, NULL,
1278 &adev->gfx.rlc.clear_state_obj); 1279 &adev->gfx.rlc.clear_state_obj);
1279 if (r) { 1280 if (r) {
@@ -1315,7 +1316,8 @@ static int gfx_v8_0_rlc_init(struct amdgpu_device *adev)
1315 if (adev->gfx.rlc.cp_table_obj == NULL) { 1316 if (adev->gfx.rlc.cp_table_obj == NULL) {
1316 r = amdgpu_bo_create(adev, adev->gfx.rlc.cp_table_size, PAGE_SIZE, true, 1317 r = amdgpu_bo_create(adev, adev->gfx.rlc.cp_table_size, PAGE_SIZE, true,
1317 AMDGPU_GEM_DOMAIN_VRAM, 1318 AMDGPU_GEM_DOMAIN_VRAM,
1318 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED, 1319 AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
1320 AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS,
1319 NULL, NULL, 1321 NULL, NULL,
1320 &adev->gfx.rlc.cp_table_obj); 1322 &adev->gfx.rlc.cp_table_obj);
1321 if (r) { 1323 if (r) {