aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-08-07 14:22:40 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-08-17 16:51:11 -0400
commitc548b345d15092bf46469a0339d41ae3e106987d (patch)
tree58f78757f8d6194f770458df329a2610f7e74171 /drivers/gpu
parent00d2a2b21dbd6010247d44cd0cd05e5bc40af8e6 (diff)
drm/amdgpu: remove VI hw bug workaround v3
The workaround simply doesn't work because VM mappings are controlled by userspace not the kernel. Additional to that this is just a performance problem which happens if you have holes in your VM mapping. v2: adjust virtual addr alignment as well. v3: fix trivial warning Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> (v1) Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> (v2)
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c12
2 files changed, 1 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 7226def4e8fb..87da6b1848fd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -455,7 +455,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
455 dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION; 455 dev_info.ids_flags |= AMDGPU_IDS_FLAGS_FUSION;
456 dev_info.virtual_address_offset = AMDGPU_VA_RESERVED_SIZE; 456 dev_info.virtual_address_offset = AMDGPU_VA_RESERVED_SIZE;
457 dev_info.virtual_address_max = (uint64_t)adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE; 457 dev_info.virtual_address_max = (uint64_t)adev->vm_manager.max_pfn * AMDGPU_GPU_PAGE_SIZE;
458 dev_info.virtual_address_alignment = max(PAGE_SIZE, 0x10000UL); 458 dev_info.virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
459 dev_info.pte_fragment_size = (1 << AMDGPU_LOG2_PAGES_PER_FRAG) * 459 dev_info.pte_fragment_size = (1 << AMDGPU_LOG2_PAGES_PER_FRAG) *
460 AMDGPU_GPU_PAGE_SIZE; 460 AMDGPU_GPU_PAGE_SIZE;
461 dev_info.gart_page_size = AMDGPU_GPU_PAGE_SIZE; 461 dev_info.gart_page_size = AMDGPU_GPU_PAGE_SIZE;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 87d67f8c85c9..f1f1b6796669 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -223,18 +223,6 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,
223 size_t acc_size; 223 size_t acc_size;
224 int r; 224 int r;
225 225
226 /* VI has a hw bug where VM PTEs have to be allocated in groups of 8.
227 * do this as a temporary workaround
228 */
229 if (!(domain & (AMDGPU_GEM_DOMAIN_GDS | AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA))) {
230 if ((adev->asic_type >= CHIP_TOPAZ) && (adev->asic_type != CHIP_FIJI)) {
231 if (byte_align & 0x7fff)
232 byte_align = ALIGN(byte_align, 0x8000);
233 if (size & 0x7fff)
234 size = ALIGN(size, 0x8000);
235 }
236 }
237
238 page_align = roundup(byte_align, PAGE_SIZE) >> PAGE_SHIFT; 226 page_align = roundup(byte_align, PAGE_SIZE) >> PAGE_SHIFT;
239 size = ALIGN(size, PAGE_SIZE); 227 size = ALIGN(size, PAGE_SIZE);
240 228