Commit 00fc2c3c authored by Ben Widawsky's avatar Ben Widawsky Committed by Daniel Vetter

drm/i915: Remove gtt_mappable_total

With the assertion from the previous patch in place, it should be safe
to get rid gtt_mappable_total. Keeps things saner to not have to track
the same info in two places.

In order to keep the diff as simple as possible and keep with the
existing gtt_setup semantics we opt to keep gtt_mappable_end. It's not
as consistent with the 'total' used in the previous patch, but that can
be fixed later.
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
[Ben modified commit message]
Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 35451cb6
...@@ -259,7 +259,8 @@ static int i915_gem_object_info(struct seq_file *m, void* data) ...@@ -259,7 +259,8 @@ static int i915_gem_object_info(struct seq_file *m, void* data)
count, size); count, size);
seq_printf(m, "%zu [%zu] gtt total\n", seq_printf(m, "%zu [%zu] gtt total\n",
dev_priv->mm.gtt_total, dev_priv->mm.mappable_gtt_total); dev_priv->mm.gtt_total,
dev_priv->mm.gtt_mappable_end - dev_priv->mm.gtt_start);
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
......
...@@ -886,7 +886,6 @@ typedef struct drm_i915_private { ...@@ -886,7 +886,6 @@ typedef struct drm_i915_private {
/* accounting, useful for userland debugging */ /* accounting, useful for userland debugging */
size_t gtt_total; size_t gtt_total;
size_t mappable_gtt_total;
size_t object_memory; size_t object_memory;
u32 object_count; u32 object_count;
} mm; } mm;
......
...@@ -559,7 +559,6 @@ void i915_gem_setup_global_gtt(struct drm_device *dev, ...@@ -559,7 +559,6 @@ void i915_gem_setup_global_gtt(struct drm_device *dev,
dev_priv->mm.gtt_start = start; dev_priv->mm.gtt_start = start;
dev_priv->mm.gtt_mappable_end = mappable_end; dev_priv->mm.gtt_mappable_end = mappable_end;
dev_priv->mm.gtt_total = end - start; dev_priv->mm.gtt_total = end - start;
dev_priv->mm.mappable_gtt_total = mappable_end - start;
/* Clear any non-preallocated blocks */ /* Clear any non-preallocated blocks */
drm_mm_for_each_hole(entry, &dev_priv->mm.gtt_space, drm_mm_for_each_hole(entry, &dev_priv->mm.gtt_space,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment