[Intel-gfx] [PATCH] drm/i915: Invalidate the guc ggtt TLB upon insertion
Chris Wilson
chris at chris-wilson.co.uk
Tue Nov 15 11:28:29 UTC 2016
On Tue, Nov 15, 2016 at 11:16:50AM +0000, Chris Wilson wrote:
> Move the GuC invalidation of its ggtt TLB to where we perform the ggtt
> modification rather than proliferate it into all the callers of the
> insert (which may or may not in fact have to do the insertion).
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 15 +++++++++++----
> drivers/gpu/drm/i915/i915_guc_submission.c | 3 ---
> drivers/gpu/drm/i915/intel_guc_loader.c | 3 ---
> drivers/gpu/drm/i915/intel_lrc.c | 6 ------
> 4 files changed, 11 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 98420ba87b0d..6aaffcf529c8 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -2389,6 +2389,15 @@ static void gen8_set_pte(void __iomem *addr, gen8_pte_t pte)
> writeq(pte, addr);
> }
>
> +static void gen8_ggtt_invalidate(struct drm_i915_private *dev_priv)
> +{
> + I915_WRITE(GFX_FLSH_CNTL_GEN6, GFX_FLSH_CNTL_EN);
> + POSTING_READ(GFX_FLSH_CNTL_GEN6);
> +
> + if (i915.enable_guc_submission)
> + I915_WRITE(GEN8_GTCR, GEN8_GTCR_INVALIDATE);
Can we just make it unconditional?
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list