On Fri, Nov 03, 2017 at 05:01:09PM -0700, Jackie Li wrote:
> Static WOPCM partitioning would lead to GuC loading failure
> if the GuC/HuC firmware size exceeded current static 512KB
> partition boundary.
> 
> This patch enabled the dynamical calculation of the WOPCM aperture
> used by GuC/HuC firmware. GuC WOPCM offset was set to
> HuC size + reserved WOPCM size. GuC WOPCM size was set to
> total WOPCM size - GuC WOPCM offset - RC6CTX size.
> 
> Signed-off-by: Jackie Li <yaodong...@intel.com>
> Cc: Michal Wajdeczko <michal.wajdec...@intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kam...@intel.com>
> Cc: Sujaritha Sundaresan <sujaritha.sundare...@intel.com>
> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospu...@intel.com>
> Reviewed-by: John Spotswood <john.a.spotsw...@intel.com>
> Reviewed-by: Oscar Mateo <oscar.ma...@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c         |  15 ++++
>  drivers/gpu/drm/i915/i915_drv.h         |  13 ++++
>  drivers/gpu/drm/i915/i915_gem_context.c |   4 +-
>  drivers/gpu/drm/i915/i915_guc_reg.h     |  18 ++++-
>  drivers/gpu/drm/i915/intel_guc.c        |  46 ++++++++++--
>  drivers/gpu/drm/i915/intel_guc.h        |  18 +----
>  drivers/gpu/drm/i915/intel_huc.c        |   3 +-
>  drivers/gpu/drm/i915/intel_uc.c         | 128 
> +++++++++++++++++++++++++++++++-
>  drivers/gpu/drm/i915/intel_uc_fw.c      |  12 ++-
>  9 files changed, 223 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index e7e9e06..19509fd 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -623,6 +623,15 @@ static void i915_gem_fini(struct drm_i915_private 
> *dev_priv)
>       WARN_ON(!list_empty(&dev_priv->contexts.list));
>  }
>  
> +static void i915_wopcm_init(struct drm_i915_private *dev_priv)
> +{
> +     struct intel_wopcm_info *wopcm = &dev_priv->wopcm;
> +
> +     wopcm->size = WOPCM_DEFAULT_SIZE;
> +
> +     DRM_DEBUG_DRIVER("WOPCM size: %dKB\n", wopcm->size >> 10);
> +}
> +
>  static int i915_load_modeset_init(struct drm_device *dev)
>  {
>       struct drm_i915_private *dev_priv = to_i915(dev);
> @@ -670,6 +679,12 @@ static int i915_load_modeset_init(struct drm_device *dev)
>       if (ret)
>               goto cleanup_irq;
>  
> +     /*
> +      * Get the wopcm memory info.
> +      * NOTE: this need to be called before init FW.
> +      */
> +     i915_wopcm_init(dev_priv);

Is this guc wopcm somehow related to the normal wopcm? And if so
are you planning to use the wopcm information we extract from the
hardware in stolen init? If this is just related to the guc then
it would seem better to bury this in some guc code.

> +
>       intel_uc_init_fw(dev_priv);
>  
>       ret = i915_gem_init(dev_priv);

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to