aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-06-30 06:20:45 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-07-14 11:06:22 -0400
commit935eefb312566364ef395eb29574e093686dbec8 (patch)
treee3b55983cf6f527454877a5373b5543f328d324b /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parent5e7e83963fcf7688c2a171bedd9e76e2aa4eb85a (diff)
drm/amdgpu: remove maximum BO size limitation v2
We can finally remove this now. v2: remove now unused max_size variable as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@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.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 96c4493ccf8f..917ac5e074a0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -49,7 +49,6 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
49 struct drm_gem_object **obj) 49 struct drm_gem_object **obj)
50{ 50{
51 struct amdgpu_bo *robj; 51 struct amdgpu_bo *robj;
52 unsigned long max_size;
53 int r; 52 int r;
54 53
55 *obj = NULL; 54 *obj = NULL;
@@ -58,17 +57,6 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
58 alignment = PAGE_SIZE; 57 alignment = PAGE_SIZE;
59 } 58 }
60 59
61 if (!(initial_domain & (AMDGPU_GEM_DOMAIN_GDS | AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA))) {
62 /* Maximum bo size is the unpinned gtt size since we use the gtt to
63 * handle vram to system pool migrations.
64 */
65 max_size = adev->mc.gtt_size - adev->gart_pin_size;
66 if (size > max_size) {
67 DRM_DEBUG("Allocation size %ldMb bigger than %ldMb limit\n",
68 size >> 20, max_size >> 20);
69 return -ENOMEM;
70 }
71 }
72retry: 60retry:
73 r = amdgpu_bo_create(adev, size, alignment, kernel, initial_domain, 61 r = amdgpu_bo_create(adev, size, alignment, kernel, initial_domain,
74 flags, NULL, NULL, &robj); 62 flags, NULL, NULL, &robj);