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/amdgpu_cgs.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/amdgpu_cgs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c index 7a8bfa34682f..a61f4186a7dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | |||
@@ -146,7 +146,8 @@ static int amdgpu_cgs_alloc_gpu_mem(struct cgs_device *cgs_device, | |||
146 | switch(type) { | 146 | switch(type) { |
147 | case CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB: | 147 | case CGS_GPU_MEM_TYPE__VISIBLE_CONTIG_FB: |
148 | case CGS_GPU_MEM_TYPE__VISIBLE_FB: | 148 | case CGS_GPU_MEM_TYPE__VISIBLE_FB: |
149 | flags = AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; | 149 | flags = AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED | |
150 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS; | ||
150 | domain = AMDGPU_GEM_DOMAIN_VRAM; | 151 | domain = AMDGPU_GEM_DOMAIN_VRAM; |
151 | if (max_offset > adev->mc.real_vram_size) | 152 | if (max_offset > adev->mc.real_vram_size) |
152 | return -EINVAL; | 153 | return -EINVAL; |
@@ -157,7 +158,8 @@ static int amdgpu_cgs_alloc_gpu_mem(struct cgs_device *cgs_device, | |||
157 | break; | 158 | break; |
158 | case CGS_GPU_MEM_TYPE__INVISIBLE_CONTIG_FB: | 159 | case CGS_GPU_MEM_TYPE__INVISIBLE_CONTIG_FB: |
159 | case CGS_GPU_MEM_TYPE__INVISIBLE_FB: | 160 | case CGS_GPU_MEM_TYPE__INVISIBLE_FB: |
160 | flags = AMDGPU_GEM_CREATE_NO_CPU_ACCESS; | 161 | flags = AMDGPU_GEM_CREATE_NO_CPU_ACCESS | |
162 | AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS; | ||
161 | domain = AMDGPU_GEM_DOMAIN_VRAM; | 163 | domain = AMDGPU_GEM_DOMAIN_VRAM; |
162 | if (adev->mc.visible_vram_size < adev->mc.real_vram_size) { | 164 | if (adev->mc.visible_vram_size < adev->mc.real_vram_size) { |
163 | place.fpfn = | 165 | place.fpfn = |