[Intel-gfx] [PATCH 8/8] drm/i915: prefer resource_size_t for everything stolen

Chris Wilson chris at chris-wilson.co.uk
Fri Nov 24 16:54:56 UTC 2017


Quoting Matthew Auld (2017-11-24 16:42:57)
> Keeps things consistent now that we make use of struct resource. This
> should keep us covered in case we ever get huge amounts of stolen
> memory.
> 
> v2: bunch of missing conversions (Chris)
> 
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
> ---
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index a05e2b92c02c..248d18a255d8 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -523,7 +523,7 @@ static int i915_gem_object_info(struct seq_file *m, void *data)
>                    dpy_count, dpy_size);
>  
>         seq_printf(m, "%llu [%llu] gtt total\n",
> -                  ggtt->base.total, ggtt->mappable_size);
> +                  ggtt->base.total, (u64)ggtt->mappable_size);

resource_size_t uses %pa (same as phys_addr_t), which you used below.
Did it not work with seq_printf?
-Chris

> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 35d91cf07123..390de1c74329 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3354,7 +3354,7 @@ static int gen6_gmch_probe(struct i915_ggtt *ggtt)
>          * a coarse sanity check.
>          */
>         if (ggtt->mappable_size < (64<<20) || ggtt->mappable_size > (512<<20)) {
> -               DRM_ERROR("Unknown GMADR size (%llx)\n", ggtt->mappable_size);
> +               DRM_ERROR("Unknown GMADR size (%pa)\n", &ggtt->mappable_size);
>                 return -ENXIO;
>         }


More information about the Intel-gfx mailing list