summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2019-01-22 15:44:54 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-02-01 00:33:00 -0500
commitfe57085a36de5813ab63a8d178ccfb5f257f028e (patch)
treea33d93e816327e2344ca02715ee25f2bf88efd19 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parenta5c8e0524dbbe1107d81a1604da3d191b66ead6b (diff)
downloadlinux-fe57085a36de5813ab63a8d178ccfb5f257f028e.tar.gz
linux-fe57085a36de5813ab63a8d178ccfb5f257f028e.tar.bz2
linux-fe57085a36de5813ab63a8d178ccfb5f257f028e.zip
drm/amdgpu: clean up memory/GDS/GWS/OA alignment code
- move all adjustments into one place - specify GDS/GWS/OA alignment in basic units of the heaps - it looks like GDS alignment was 1 instead of 4 Signed-off-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index f4f00217546e..d21dd2f369da 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -54,10 +54,6 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
memset(&bp, 0, sizeof(bp));
*obj = NULL;
- /* At least align on page size */
- if (alignment < PAGE_SIZE) {
- alignment = PAGE_SIZE;
- }
bp.size = size;
bp.byte_align = alignment;
@@ -244,9 +240,6 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
return -EINVAL;
}
flags |= AMDGPU_GEM_CREATE_NO_CPU_ACCESS;
- /* GDS allocations must be DW aligned */
- if (args->in.domains & AMDGPU_GEM_DOMAIN_GDS)
- size = ALIGN(size, 4);
}
if (flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) {