[Intel-gfx] [PATCH 3/4] drm/i915/guc: s/ads_vma/addon

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Feb 28 08:04:01 UTC 2017


On pe, 2017-02-24 at 06:01 -0800, Oscar Mateo wrote:
> This vma contains much more than just the additional data struct (ads)
> and since we were already using the word "addon" as an object in
> guc_addon_create, make it the preffered one. No need for the vma suffix
> either, as that dependency is given by the type.
> 
> while at it, add an explanation of what things go inside the addon object.
> 
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>

<SNIP>

> @@ -834,9 +834,13 @@ static int guc_addon_create(struct intel_guc *guc)
>  	struct page *page;
>  	u32 size;
>  
> -	GEM_BUG_ON(guc->ads_vma);
> +	GEM_BUG_ON(guc->addon);
>  
> -	/* The ads obj includes the struct itself and buffers passed to GuC */
> +	/* The additional data struct (ADS) has pointers for different buffers
> +	 * used by the GuC. The addon object contains the ADS itself (guc_ads),
> +	 * the scheduling policies (guc_policies), a structure describing
> +	 * a collection of register sets (guc_mmio_reg_state) and some extra
> +	 * pages for the GuC to save its internal state for sleep */

Put this comment in the header and this is;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

>  	size = sizeof(struct guc_ads) + sizeof(struct guc_policies) +
>  			sizeof(struct guc_mmio_reg_state) +
>  			GUC_S3_SAVE_SPACE_PAGES * PAGE_SIZE;

-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list