[Intel-gfx] [PATCH 03/13] drm/i915: Remove gtt_mappable_total

Rodrigo Vivi rodrigo.vivi at gmail.com
Wed Jan 16 21:32:28 CET 2013


for the patch itself feel free to use

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>

but at this point I just got a bit confused why not having an standard
like always using total or always using end-start...


On Tue, Jan 15, 2013 at 7:26 PM, Ben Widawsky <ben at bwidawsk.net> wrote:
> 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.
>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 3 ++-
>  drivers/gpu/drm/i915/i915_drv.h     | 1 -
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 1 -
>  3 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 882a735..2f14b6d 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -259,7 +259,8 @@ static int i915_gem_object_info(struct seq_file *m, void* data)
>                    count, size);
>
>         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);
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index f49b7be..5985ed0 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -881,7 +881,6 @@ typedef struct drm_i915_private {
>
>                 /* accounting, useful for userland debugging */
>                 size_t gtt_total;
> -               size_t mappable_gtt_total;
>                 size_t object_memory;
>                 u32 object_count;
>         } mm;
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 6c068b0..f79081e 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -559,7 +559,6 @@ void i915_gem_setup_global_gtt(struct drm_device *dev,
>         dev_priv->mm.gtt_start = start;
>         dev_priv->mm.gtt_mappable_end = mappable_end;
>         dev_priv->mm.gtt_total = end - start;
> -       dev_priv->mm.mappable_gtt_total = mappable_end - start;
>
>         /* Clear any non-preallocated blocks */
>         drm_mm_for_each_hole(entry, &dev_priv->mm.gtt_space,
> --
> 1.8.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br



More information about the Intel-gfx mailing list