aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a2bb18914329..51fdf16181a7 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -186,7 +186,7 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,
186 pinned += obj->gtt_space->size; 186 pinned += obj->gtt_space->size;
187 mutex_unlock(&dev->struct_mutex); 187 mutex_unlock(&dev->struct_mutex);
188 188
189 args->aper_size = dev_priv->mm.gtt_total; 189 args->aper_size = dev_priv->gtt.total;
190 args->aper_available_size = args->aper_size - pinned; 190 args->aper_available_size = args->aper_size - pinned;
191 191
192 return 0; 192 return 0;
@@ -637,7 +637,7 @@ i915_gem_gtt_pwrite_fast(struct drm_device *dev,
637 * source page isn't available. Return the error and we'll 637 * source page isn't available. Return the error and we'll
638 * retry in the slow path. 638 * retry in the slow path.
639 */ 639 */
640 if (fast_user_write(dev_priv->mm.gtt_mapping, page_base, 640 if (fast_user_write(dev_priv->gtt.mappable, page_base,
641 page_offset, user_data, page_length)) { 641 page_offset, user_data, page_length)) {
642 ret = -EFAULT; 642 ret = -EFAULT;
643 goto out_unpin; 643 goto out_unpin;
@@ -1362,7 +1362,7 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
1362 1362
1363 obj->fault_mappable = true; 1363 obj->fault_mappable = true;
1364 1364
1365 pfn = ((dev_priv->mm.gtt_base_addr + obj->gtt_offset) >> PAGE_SHIFT) + 1365 pfn = ((dev_priv->gtt.mappable_base + obj->gtt_offset) >> PAGE_SHIFT) +
1366 page_offset; 1366 page_offset;
1367 1367
1368 /* Finally, remap it using the new GTT offset */ 1368 /* Finally, remap it using the new GTT offset */
@@ -1544,7 +1544,7 @@ i915_gem_mmap_gtt(struct drm_file *file,
1544 goto unlock; 1544 goto unlock;
1545 } 1545 }
1546 1546
1547 if (obj->base.size > dev_priv->mm.gtt_mappable_end) { 1547 if (obj->base.size > dev_priv->gtt.mappable_end) {
1548 ret = -E2BIG; 1548 ret = -E2BIG;
1549 goto out; 1549 goto out;
1550 } 1550 }
@@ -2910,7 +2910,7 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
2910 * before evicting everything in a vain attempt to find space. 2910 * before evicting everything in a vain attempt to find space.
2911 */ 2911 */
2912 if (obj->base.size > 2912 if (obj->base.size >
2913 (map_and_fenceable ? dev_priv->mm.gtt_mappable_end : dev_priv->mm.gtt_total)) { 2913 (map_and_fenceable ? dev_priv->gtt.mappable_end : dev_priv->gtt.total)) {
2914 DRM_ERROR("Attempting to bind an object larger than the aperture\n"); 2914 DRM_ERROR("Attempting to bind an object larger than the aperture\n");
2915 return -E2BIG; 2915 return -E2BIG;
2916 } 2916 }
@@ -2931,7 +2931,7 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
2931 if (map_and_fenceable) 2931 if (map_and_fenceable)
2932 ret = drm_mm_insert_node_in_range_generic(&dev_priv->mm.gtt_space, node, 2932 ret = drm_mm_insert_node_in_range_generic(&dev_priv->mm.gtt_space, node,
2933 size, alignment, obj->cache_level, 2933 size, alignment, obj->cache_level,
2934 0, dev_priv->mm.gtt_mappable_end); 2934 0, dev_priv->gtt.mappable_end);
2935 else 2935 else
2936 ret = drm_mm_insert_node_generic(&dev_priv->mm.gtt_space, node, 2936 ret = drm_mm_insert_node_generic(&dev_priv->mm.gtt_space, node,
2937 size, alignment, obj->cache_level); 2937 size, alignment, obj->cache_level);
@@ -2971,7 +2971,7 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
2971 (node->start & (fence_alignment - 1)) == 0; 2971 (node->start & (fence_alignment - 1)) == 0;
2972 2972
2973 mappable = 2973 mappable =
2974 obj->gtt_offset + obj->base.size <= dev_priv->mm.gtt_mappable_end; 2974 obj->gtt_offset + obj->base.size <= dev_priv->gtt.mappable_end;
2975 2975
2976 obj->map_and_fenceable = mappable && fenceable; 2976 obj->map_and_fenceable = mappable && fenceable;
2977 2977