[Intel-gfx] [PATCH 06/21] drm/i915: introduce page_size members

Chris Wilson chris at chris-wilson.co.uk
Sat Sep 23 08:42:36 UTC 2017


Quoting Matthew Auld (2017-09-22 18:32:37)
> In preparation for supporting huge gtt pages for the ppgtt, we introduce
> page size members for gem objects.  We fill in the page sizes by
> scanning the sg table.
> 
> v2: pass the sg_mask to set_pages
> 
> v3: calculate the sg_mask inline with populating the sg_table where
> possible, and pass to set_pages along with the pages.
> 
> v4: bunch of improvements from Joonas
> 
> 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: Daniel Vetter <daniel at ffwll.ch>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

> @@ -2475,6 +2488,24 @@ void __i915_gem_object_set_pages(struct drm_i915_gem_object *obj,
>                 __i915_gem_object_pin_pages(obj);
>                 obj->mm.quirked = true;
>         }
> +
> +       GEM_BUG_ON(!sg_mask);
> +       obj->mm.page_sizes.phys = sg_mask;
> +
> +       /* Calculate the supported page-sizes which fit into the given sg_mask.

The preferred style is
/*
 * Calculate....

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list