All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kenneth Graunke <kenneth@whitecape.org>
To: intel-gfx@lists.freedesktop.org,
	D Scott Phillips <d.scott.phillips@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/tgl: Put HDC flush pipe_control bit in the right dword
Date: Mon, 04 May 2020 17:57:05 -0700	[thread overview]
Message-ID: <2650835.mvXUDI8C0e@mizzik> (raw)
In-Reply-To: <20200505000146.2295525-1-d.scott.phillips@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 1926 bytes --]

On Monday, May 4, 2020 5:01:46 PM PDT D Scott Phillips wrote:
> Previously we set HDC_PIPELINE_FLUSH in dword 1 of gen12
> pipe_control commands. HDC Pipeline flush actually resides in
> dword 0, and the bit we were setting in dword 1 was Indirect State
> Pointers Disable, which invalidates indirect state in the render
> context. This causes failures for userspace, as things like push
> constant state gets invalidated.
> 
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: D Scott Phillips <d.scott.phillips@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_engine.h | 23 +++++++++++++++++------
>  drivers/gpu/drm/i915/gt/intel_lrc.c    | 11 ++++++-----
>  2 files changed, 23 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine.h b/drivers/gpu/drm/i915/gt/intel_engine.h
> index 19d0b8830905..8338be338ec8 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine.h
> +++ b/drivers/gpu/drm/i915/gt/intel_engine.h
> @@ -241,19 +241,24 @@ void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine);
>  void intel_engine_print_breadcrumbs(struct intel_engine_cs *engine,
>  				    struct drm_printer *p);
>  
> -static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset)
> +static inline u32 *gen12_emit_pipe_control(u32 *batch, u32 flags0, u32 flags1, u32 offset)

Great find!  It looks like HDC_PIPELINE_FLUSH moved from bit 41 to bit 9
even on Icelake / Gen11 - so it might make sense to call this
gen11_emit_pipe_control() and use it on the Icelake functions.

That said, i915 never sets HDC_PIPELINE_FLUSH until Gen12, so we don't
actually have a bug to fix on Icelake today.  But if someone started
trying to set it on Gen11, we would have a bug - hence the suggestion.

With or without any changes,

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

and thanks so much for tracking this down!

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-05-05  1:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05  0:01 [Intel-gfx] [PATCH] drm/i915/tgl: Put HDC flush pipe_control bit in the right dword D Scott Phillips
2020-05-05  0:09 ` D Scott Phillips
2020-05-05  7:27   ` Lionel Landwerlin
2020-05-05 16:32     ` D Scott Phillips
2020-05-05  0:25 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-05-05  0:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-05-05  0:57 ` Kenneth Graunke [this message]
2020-05-05 14:17 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=2650835.mvXUDI8C0e@mizzik \
    --to=kenneth@whitecape.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=d.scott.phillips@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.