All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH] drm/i915/cnl: WaDisableGatherAtSetShaderCommonSlice
Date: Thu, 05 Oct 2017 21:38:55 +0100	[thread overview]
Message-ID: <150723593594.12843.12325250936714797236@mail.alporthouse.com> (raw)
In-Reply-To: <20171005202232.8358-1-rodrigo.vivi@intel.com>

Quoting Rodrigo Vivi (2017-10-05 21:22:32)
> Purely empirical. I don't have a better description of the need
> of this workaround. It is not on BSpec and it is not on wa_database.
> 
> However it brings a huge stability to CNL and fix many issues that
> Mesa was facing.
> 
> Empirical history: when Rafael and I were trying to understand
> the misterious WaSendPushConstantsFromMMIO we just had a description
> of it that was "If not using RS, we must send two MMIO registers at
> context create to trigger push constants at 3D primitive"
> 
> And in another place we just saw that WaSendPushConstantsFromMMIO
> was only adding COMMON_SLICE_CHICKEN2 in a white list.
> 
> So we looked to the programmin notes of COMMON_SLICE_CHICKEN2
> and we notice that this bit 12 is marked in association with
> 2 other MMIO registers for SKL+. Apparently for SKL+ we should
> check few MMIOs to decide for set or reset of this bit 12.
> 
> Also "gather" is related to gather and packing of consntant elements
> into "push constants".
> 
> So we give a shot with this workaround in place and achieved
> a good stability.
> 
> Cc: Rafael Antognolli <rafael.antognolli@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 7d6da130b184..aa1705319d71 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1231,6 +1231,23 @@ static u32 *gen9_init_indirectctx_bb(struct intel_engine_cs *engine, u32 *batch)
>         return batch;
>  }
>  
> +static u32 *gen10_init_indirectctx_bb(struct intel_engine_cs *engine,
> +                                     u32 *batch)
> +{
> +       /* WaDisableGatherAtSetShaderCommonSlice:cnl */
> +       *batch++ = MI_LOAD_REGISTER_IMM(1);
> +       *batch++ = i915_mmio_reg_offset(COMMON_SLICE_CHICKEN2);
> +       *batch++ = _MASKED_BIT_DISABLE(
> +                       GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE);
> +       *batch++ = MI_NOOP;

These are context registers, so why not just set them in the context
image? If user space chooses to fiddle with them (first they must be in
the nonpriv section) it will do so with good reason (one presumes).

You should get the same effect by combining this with the other
COMMON_SLICE_CHICKEN2 setup we do in cnl_init_workarounds().
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-05 20:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 20:22 [PATCH] drm/i915/cnl: WaDisableGatherAtSetShaderCommonSlice Rodrigo Vivi
2017-10-05 20:38 ` Chris Wilson [this message]
2017-10-05 22:26   ` [PATCH] drm/i915/cnl: WaSendPushConstantsFromMMIO / WaDisableGatherAtSetShaderCommonSlice Rodrigo Vivi
2017-10-05 22:45     ` Rafael Antognolli
2017-10-06 11:06 ` ✗ Fi.CI.BAT: warning for drm/i915/cnl: WaDisableGatherAtSetShaderCommonSlice (rev2) Patchwork
2017-10-06 13:10   ` Rodrigo Vivi
2017-10-06 13:18     ` Chris Wilson
2017-10-06 14:45     ` Saarinen, Jani
2017-10-09  6:34     ` Lofstedt, Marta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=150723593594.12843.12325250936714797236@mail.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.