Re: [PATCH v3 3/5] drm/i915/guc: Implement dynamic WOPCM partitioning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Jackie Li (2017-12-08 21:41:50)
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index 21ce374..89ecf2c 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -312,12 +312,16 @@ __create_hw_context(struct drm_i915_private *dev_priv,
>         ctx->desc_template =
>                 default_desc_template(dev_priv, dev_priv->mm.aliasing_ppgtt);
>  
> -       /* GuC requires the ring to be placed above GUC_WOPCM_TOP. If GuC is not
> -        * present or not in use we still need a small bias as ring wraparound
> -        * at offset 0 sometimes hangs. No idea why.
> +       /* GuC requires the ring to be placed above GuC WOPCM top. Since GuC
> +        * WOPCM won't be available until intel_uc_init_hw(), we will place
> +        * the context above WOPCM instead if GuC WOPCM wasn't initialized.
> +        * if GuC is not present or not in use we still need a small bias as
> +        * ring wraparound at offset 0 sometimes hangs. No idea why.

So preset it to the worstcase value in early guc init.
-Chris

>          */
>         if (USES_GUC(dev_priv))
> -               ctx->ggtt_offset_bias = GUC_WOPCM_TOP;
> +               ctx->ggtt_offset_bias = dev_priv->guc.wopcm.valid ?
> +                       dev_priv->guc.wopcm.top : WOPCM_DEFAULT_SIZE;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux