[Intel-gfx] [CI 2/2] drm/i915/wopcm: update default size for gen11+

Summers, Stuart stuart.summers at intel.com
Fri Jun 7 14:46:08 UTC 2019


On Thu, 2019-06-06 at 15:42 -0700, Daniele Ceraolo Spurio wrote:
> The size has been increased to 2MB starting from Gen11. GuC and HuC
> FWs
> fit in 1MB so we were fine even with the legacy define, but let's
> still
> move to the correct one before the blobs grow to avoid being caught
> off
> guard in the future.
> 
> v2: return early if the platform doesn't have GuC, fix nits (Michal)
> 
> Bspec: 12690
> Signed-off-by: Daniele Ceraolo Spurio <
> daniele.ceraolospurio at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Reviewed-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_wopcm.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_wopcm.c
> b/drivers/gpu/drm/i915/intel_wopcm.c
> index f82a415ea2ba..78c8167cfd94 100644
> --- a/drivers/gpu/drm/i915/intel_wopcm.c
> +++ b/drivers/gpu/drm/i915/intel_wopcm.c
> @@ -41,8 +41,9 @@
>   * context).
>   */
>  
> -/* Default WOPCM size 1MB. */
> -#define GEN9_WOPCM_SIZE			(1024 * 1024)
> +/* Default WOPCM size is 2MB from Gen11, 1MB on previous platforms
> */
> +#define GEN11_WOPCM_SIZE		(SZ_2M)
> +#define GEN9_WOPCM_SIZE			(SZ_1M)
>  /* 16KB WOPCM (RSVD WOPCM) is reserved from HuC firmware top. */
>  #define WOPCM_RESERVED_SIZE		(16 * 1024)

If you're already changing these sizes to macros, can you align these
to the same format and apply SZ_16K here also?

Reviewed-by: Stuart Summers <stuart.summers at intel.com>

>  
> @@ -71,7 +72,15 @@
>   */
>  void intel_wopcm_init_early(struct intel_wopcm *wopcm)
>  {
> -	wopcm->size = GEN9_WOPCM_SIZE;
> +	struct drm_i915_private *i915 = wopcm_to_i915(wopcm);
> +
> +	if (!HAS_GUC(i915))
> +		return;
> +
> +	if (INTEL_GEN(i915) >= 11)
> +		wopcm->size = GEN11_WOPCM_SIZE;
> +	else
> +		wopcm->size = GEN9_WOPCM_SIZE;
>  
>  	DRM_DEBUG_DRIVER("WOPCM size: %uKiB\n", wopcm->size / 1024);
>  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3270 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190607/d8dc188c/attachment.bin>


More information about the Intel-gfx mailing list