Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Rodrigo Vivi <rodrigo.vivi@gmail.com>
[Ben modified commit message]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

authored by

Ben Widawsky and committed by
Daniel Vetter
00fc2c3c 35451cb6

+2 -3
+2 -1
drivers/gpu/drm/i915/i915_debugfs.c
··· 259 259 count, size); 260 260 261 261 seq_printf(m, "%zu [%zu] gtt total\n", 262 - dev_priv->mm.gtt_total, dev_priv->mm.mappable_gtt_total); 262 + dev_priv->mm.gtt_total, 263 + dev_priv->mm.gtt_mappable_end - dev_priv->mm.gtt_start); 263 264 264 265 mutex_unlock(&dev->struct_mutex); 265 266
-1
drivers/gpu/drm/i915/i915_drv.h
··· 886 886 887 887 /* accounting, useful for userland debugging */ 888 888 size_t gtt_total; 889 - size_t mappable_gtt_total; 890 889 size_t object_memory; 891 890 u32 object_count; 892 891 } mm;
-1
drivers/gpu/drm/i915/i915_gem_gtt.c
··· 559 559 dev_priv->mm.gtt_start = start; 560 560 dev_priv->mm.gtt_mappable_end = mappable_end; 561 561 dev_priv->mm.gtt_total = end - start; 562 - dev_priv->mm.mappable_gtt_total = mappable_end - start; 563 562 564 563 /* Clear any non-preallocated blocks */ 565 564 drm_mm_for_each_hole(entry, &dev_priv->mm.gtt_space,