diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_object.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_object.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 8b27dd6e3144..b91118ccef86 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c | |||
@@ -105,7 +105,6 @@ int radeon_bo_create(struct radeon_device *rdev, | |||
105 | struct radeon_bo *bo; | 105 | struct radeon_bo *bo; |
106 | enum ttm_bo_type type; | 106 | enum ttm_bo_type type; |
107 | unsigned long page_align = roundup(byte_align, PAGE_SIZE) >> PAGE_SHIFT; | 107 | unsigned long page_align = roundup(byte_align, PAGE_SIZE) >> PAGE_SHIFT; |
108 | unsigned long max_size = 0; | ||
109 | size_t acc_size; | 108 | size_t acc_size; |
110 | int r; | 109 | int r; |
111 | 110 | ||
@@ -121,18 +120,9 @@ int radeon_bo_create(struct radeon_device *rdev, | |||
121 | } | 120 | } |
122 | *bo_ptr = NULL; | 121 | *bo_ptr = NULL; |
123 | 122 | ||
124 | /* maximun bo size is the minimun btw visible vram and gtt size */ | ||
125 | max_size = min(rdev->mc.visible_vram_size, rdev->mc.gtt_size); | ||
126 | if ((page_align << PAGE_SHIFT) >= max_size) { | ||
127 | printk(KERN_WARNING "%s:%d alloc size %ldM bigger than %ldMb limit\n", | ||
128 | __func__, __LINE__, page_align >> (20 - PAGE_SHIFT), max_size >> 20); | ||
129 | return -ENOMEM; | ||
130 | } | ||
131 | |||
132 | acc_size = ttm_bo_dma_acc_size(&rdev->mman.bdev, size, | 123 | acc_size = ttm_bo_dma_acc_size(&rdev->mman.bdev, size, |
133 | sizeof(struct radeon_bo)); | 124 | sizeof(struct radeon_bo)); |
134 | 125 | ||
135 | retry: | ||
136 | bo = kzalloc(sizeof(struct radeon_bo), GFP_KERNEL); | 126 | bo = kzalloc(sizeof(struct radeon_bo), GFP_KERNEL); |
137 | if (bo == NULL) | 127 | if (bo == NULL) |
138 | return -ENOMEM; | 128 | return -ENOMEM; |
@@ -154,15 +144,6 @@ retry: | |||
154 | acc_size, sg, &radeon_ttm_bo_destroy); | 144 | acc_size, sg, &radeon_ttm_bo_destroy); |
155 | up_read(&rdev->pm.mclk_lock); | 145 | up_read(&rdev->pm.mclk_lock); |
156 | if (unlikely(r != 0)) { | 146 | if (unlikely(r != 0)) { |
157 | if (r != -ERESTARTSYS) { | ||
158 | if (domain == RADEON_GEM_DOMAIN_VRAM) { | ||
159 | domain |= RADEON_GEM_DOMAIN_GTT; | ||
160 | goto retry; | ||
161 | } | ||
162 | dev_err(rdev->dev, | ||
163 | "object_init failed for (%lu, 0x%08X)\n", | ||
164 | size, domain); | ||
165 | } | ||
166 | return r; | 147 | return r; |
167 | } | 148 | } |
168 | *bo_ptr = bo; | 149 | *bo_ptr = bo; |