All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
@ 2017-05-31 19:05 Chris Wilson
  2017-05-31 19:26 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Chris Wilson @ 2017-05-31 19:05 UTC (permalink / raw)
  To: intel-gfx
  Cc: Chris Wilson, Tvrtko Ursulin, Joonas Lahtinen, Oscar Mateo,
	Daniele Ceraolo Spurio, Michal Wajdeczko, Arkadiusz Hiler,
	# v4 . 11+

Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon
insertion") added the restoration of the invalidation routine after the
GuC was disabled, but missed that the GuC was unconditionally disabled
when not used. This then overwrites the invalidate routine for the older
chipsets, causing havoc and breaking resume as the most obvious victim.

We place the guard inside i915_ggtt_disable_guc() to be backport
friendly (the bug was introduced into v4.11) but it would be preferred
to be in more control over when this was guard (i.e. do not try and
teardown the data structures before we have enabled them). That should
be true with the reorganisation of the guc loaders.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Oscar Mateo <oscar.mateo@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: <stable@vger.kernel.org> # v4.11+
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 4f581adf2fcf..6eb83684b97b 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -3282,7 +3282,8 @@ void i915_ggtt_enable_guc(struct drm_i915_private *i915)
 
 void i915_ggtt_disable_guc(struct drm_i915_private *i915)
 {
-	i915->ggtt.invalidate = gen6_ggtt_invalidate;
+	if (i915->ggtt.invalidate == guc_ggtt_invalidate)
+		i915->ggtt.invalidate = gen6_ggtt_invalidate;
 }
 
 void i915_gem_restore_gtt_mappings(struct drm_i915_private *dev_priv)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
  2017-05-31 19:05 [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally Chris Wilson
@ 2017-05-31 19:26 ` Patchwork
  2017-06-01  1:01 ` [Intel-gfx] [PATCH] " Michel Thierry
  2017-06-01 10:21   ` Joonas Lahtinen
  2 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2017-05-31 19:26 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
URL   : https://patchwork.freedesktop.org/series/25119/
State : success

== Summary ==

Series 25119v1 drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
https://patchwork.freedesktop.org/api/1.0/series/25119/revisions/1/mbox/

Test gem_exec_flush:
        Subgroup basic-batch-kernel-default-uc:
                pass       -> FAIL       (fi-snb-2600) fdo#100007

fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time:439s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time:431s
fi-bsw-n3050     total:278  pass:242  dwarn:0   dfail:0   fail:0   skip:36  time:585s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time:516s
fi-byt-j1900     total:278  pass:254  dwarn:0   dfail:0   fail:0   skip:24  time:487s
fi-byt-n2820     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:482s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:432s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:412s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time:417s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:499s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:464s
fi-kbl-7500u     total:278  pass:255  dwarn:5   dfail:0   fail:0   skip:18  time:463s
fi-kbl-7560u     total:278  pass:263  dwarn:5   dfail:0   fail:0   skip:10  time:574s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:459s
fi-skl-6700hq    total:278  pass:239  dwarn:0   dfail:1   fail:17  skip:21  time:428s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time:466s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:497s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time:434s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:537s
fi-snb-2600      total:278  pass:248  dwarn:0   dfail:0   fail:1   skip:29  time:402s

593aae9587d79f8a823a36f4e6cc12e23b547d07 drm-tip: 2017y-05m-31d-14h-36m-16s UTC integration manifest
540e762 drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4848/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
  2017-05-31 19:05 [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally Chris Wilson
  2017-05-31 19:26 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-06-01  1:01 ` Michel Thierry
  2017-06-01  6:03     ` Chris Wilson
  2017-06-01  8:56     ` Chris Wilson
  2017-06-01 10:21   ` Joonas Lahtinen
  2 siblings, 2 replies; 9+ messages in thread
From: Michel Thierry @ 2017-06-01  1:01 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: # v4 . 11+

On 5/31/2017 12:05 PM, Chris Wilson wrote:
> Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon
> insertion") added the restoration of the invalidation routine after the
> GuC was disabled, but missed that the GuC was unconditionally disabled
> when not used. This then overwrites the invalidate routine for the older
> chipsets, causing havoc and breaking resume as the most obvious victim.
>
> We place the guard inside i915_ggtt_disable_guc() to be backport
> friendly (the bug was introduced into v4.11) but it would be preferred
> to be in more control over when this was guard (i.e. do not try and
> teardown the data structures before we have enabled them). That should
> be true with the reorganisation of the guc loaders.
>
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Oscar Mateo <oscar.mateo@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: <stable@vger.kernel.org> # v4.11+
> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 4f581adf2fcf..6eb83684b97b 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3282,7 +3282,8 @@ void i915_ggtt_enable_guc(struct drm_i915_private *i915)
>
>  void i915_ggtt_disable_guc(struct drm_i915_private *i915)
>  {
> -       i915->ggtt.invalidate = gen6_ggtt_invalidate;
> +       if (i915->ggtt.invalidate == guc_ggtt_invalidate)
> +               i915->ggtt.invalidate = gen6_ggtt_invalidate;
>  }
>
>  void i915_gem_restore_gtt_mappings(struct drm_i915_private *dev_priv)

Reviewed-by: Michel Thierry <michel.thierry@intel.com>

btw the bug can only happen in 4.11; in 4.12+ this safeguard is already 
redundant since enable_guc_loading should be zero and ggtt_disable_guc 
is never called.

-Michel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
  2017-06-01  1:01 ` [Intel-gfx] [PATCH] " Michel Thierry
@ 2017-06-01  6:03     ` Chris Wilson
  2017-06-01  8:56     ` Chris Wilson
  1 sibling, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-06-01  6:03 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx, # v4 . 11+

On Wed, May 31, 2017 at 06:01:10PM -0700, Michel Thierry wrote:
> On 5/31/2017 12:05 PM, Chris Wilson wrote:
> >Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon
> >insertion") added the restoration of the invalidation routine after the
> >GuC was disabled, but missed that the GuC was unconditionally disabled
> >when not used. This then overwrites the invalidate routine for the older
> >chipsets, causing havoc and breaking resume as the most obvious victim.
> >
> >We place the guard inside i915_ggtt_disable_guc() to be backport
> >friendly (the bug was introduced into v4.11) but it would be preferred
> >to be in more control over when this was guard (i.e. do not try and
> >teardown the data structures before we have enabled them). That should
> >be true with the reorganisation of the guc loaders.
> >
> >Reported-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
> >Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> >Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >Cc: Oscar Mateo <oscar.mateo@intel.com>
> >Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> >Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> >Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> >Cc: <stable@vger.kernel.org> # v4.11+
> >---
> > drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> >index 4f581adf2fcf..6eb83684b97b 100644
> >--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> >+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> >@@ -3282,7 +3282,8 @@ void i915_ggtt_enable_guc(struct drm_i915_private *i915)
> >
> > void i915_ggtt_disable_guc(struct drm_i915_private *i915)
> > {
> >-       i915->ggtt.invalidate = gen6_ggtt_invalidate;
> >+       if (i915->ggtt.invalidate == guc_ggtt_invalidate)
> >+               i915->ggtt.invalidate = gen6_ggtt_invalidate;
> > }
> >
> > void i915_gem_restore_gtt_mappings(struct drm_i915_private *dev_priv)
> 
> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
> 
> btw the bug can only happen in 4.11; in 4.12+ this safeguard is
> already redundant since enable_guc_loading should be zero and
> ggtt_disable_guc is never called.

That's what I wanted to hear, thanks! After landing this we can then
replace the if() with a GEM_BUG_ON.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
@ 2017-06-01  6:03     ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-06-01  6:03 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx, # v4 . 11+

On Wed, May 31, 2017 at 06:01:10PM -0700, Michel Thierry wrote:
> On 5/31/2017 12:05 PM, Chris Wilson wrote:
> >Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon
> >insertion") added the restoration of the invalidation routine after the
> >GuC was disabled, but missed that the GuC was unconditionally disabled
> >when not used. This then overwrites the invalidate routine for the older
> >chipsets, causing havoc and breaking resume as the most obvious victim.
> >
> >We place the guard inside i915_ggtt_disable_guc() to be backport
> >friendly (the bug was introduced into v4.11) but it would be preferred
> >to be in more control over when this was guard (i.e. do not try and
> >teardown the data structures before we have enabled them). That should
> >be true with the reorganisation of the guc loaders.
> >
> >Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
> >Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> >Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >Cc: Oscar Mateo <oscar.mateo@intel.com>
> >Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> >Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> >Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> >Cc: <stable@vger.kernel.org> # v4.11+
> >---
> > drivers/gpu/drm/i915/i915_gem_gtt.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> >index 4f581adf2fcf..6eb83684b97b 100644
> >--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> >+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> >@@ -3282,7 +3282,8 @@ void i915_ggtt_enable_guc(struct drm_i915_private *i915)
> >
> > void i915_ggtt_disable_guc(struct drm_i915_private *i915)
> > {
> >-       i915->ggtt.invalidate = gen6_ggtt_invalidate;
> >+       if (i915->ggtt.invalidate == guc_ggtt_invalidate)
> >+               i915->ggtt.invalidate = gen6_ggtt_invalidate;
> > }
> >
> > void i915_gem_restore_gtt_mappings(struct drm_i915_private *dev_priv)
> 
> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
> 
> btw the bug can only happen in 4.11; in 4.12+ this safeguard is
> already redundant since enable_guc_loading should be zero and
> ggtt_disable_guc is never called.

That's what I wanted to hear, thanks! After landing this we can then
replace the if() with a GEM_BUG_ON.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
  2017-06-01  1:01 ` [Intel-gfx] [PATCH] " Michel Thierry
@ 2017-06-01  8:56     ` Chris Wilson
  2017-06-01  8:56     ` Chris Wilson
  1 sibling, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-06-01  8:56 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx, # v4 . 11+

On Wed, May 31, 2017 at 06:01:10PM -0700, Michel Thierry wrote:
> On 5/31/2017 12:05 PM, Chris Wilson wrote:
> >Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon
> >insertion") added the restoration of the invalidation routine after the
> >GuC was disabled, but missed that the GuC was unconditionally disabled
> >when not used. This then overwrites the invalidate routine for the older
> >chipsets, causing havoc and breaking resume as the most obvious victim.
> >
> >We place the guard inside i915_ggtt_disable_guc() to be backport
> >friendly (the bug was introduced into v4.11) but it would be preferred
> >to be in more control over when this was guard (i.e. do not try and
> >teardown the data structures before we have enabled them). That should
> >be true with the reorganisation of the guc loaders.
> >
> >Reported-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
> >Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> >Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >Cc: Oscar Mateo <oscar.mateo@intel.com>
> >Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> >Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> >Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> >Cc: <stable@vger.kernel.org> # v4.11+

> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
> 
> btw the bug can only happen in 4.11; in 4.12+ this safeguard is
> already redundant since enable_guc_loading should be zero and
> ggtt_disable_guc is never called.

Thanks for the review, pushed so we can get it back to where it needs to
go. I'll send a patch to convert this to an assert in a moment.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
@ 2017-06-01  8:56     ` Chris Wilson
  0 siblings, 0 replies; 9+ messages in thread
From: Chris Wilson @ 2017-06-01  8:56 UTC (permalink / raw)
  To: Michel Thierry; +Cc: intel-gfx, # v4 . 11+

On Wed, May 31, 2017 at 06:01:10PM -0700, Michel Thierry wrote:
> On 5/31/2017 12:05 PM, Chris Wilson wrote:
> >Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon
> >insertion") added the restoration of the invalidation routine after the
> >GuC was disabled, but missed that the GuC was unconditionally disabled
> >when not used. This then overwrites the invalidate routine for the older
> >chipsets, causing havoc and breaking resume as the most obvious victim.
> >
> >We place the guard inside i915_ggtt_disable_guc() to be backport
> >friendly (the bug was introduced into v4.11) but it would be preferred
> >to be in more control over when this was guard (i.e. do not try and
> >teardown the data structures before we have enabled them). That should
> >be true with the reorganisation of the guc loaders.
> >
> >Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> >Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
> >Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> >Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >Cc: Oscar Mateo <oscar.mateo@intel.com>
> >Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> >Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> >Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> >Cc: <stable@vger.kernel.org> # v4.11+

> Reviewed-by: Michel Thierry <michel.thierry@intel.com>
> 
> btw the bug can only happen in 4.11; in 4.12+ this safeguard is
> already redundant since enable_guc_loading should be zero and
> ggtt_disable_guc is never called.

Thanks for the review, pushed so we can get it back to where it needs to
go. I'll send a patch to convert this to an assert in a moment.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
  2017-05-31 19:05 [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally Chris Wilson
@ 2017-06-01 10:21   ` Joonas Lahtinen
  2017-06-01  1:01 ` [Intel-gfx] [PATCH] " Michel Thierry
  2017-06-01 10:21   ` Joonas Lahtinen
  2 siblings, 0 replies; 9+ messages in thread
From: Joonas Lahtinen @ 2017-06-01 10:21 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx
  Cc: Tvrtko Ursulin, Oscar Mateo, Daniele Ceraolo Spurio,
	Michal Wajdeczko, Arkadiusz Hiler, # v4 . 11+

On ke, 2017-05-31 at 20:05 +0100, Chris Wilson wrote:
> Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon
> insertion") added the restoration of the invalidation routine after the
> GuC was disabled, but missed that the GuC was unconditionally disabled
> when not used. This then overwrites the invalidate routine for the older
> chipsets, causing havoc and breaking resume as the most obvious victim.
> 
> We place the guard inside i915_ggtt_disable_guc() to be backport
> friendly (the bug was introduced into v4.11) but it would be preferred
> to be in more control over when this was guard (i.e. do not try and
> teardown the data structures before we have enabled them). That should
> be true with the reorganisation of the guc loaders.
> 
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Oscar Mateo <oscar.mateo@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: <stable@vger.kernel.org> # v4.11+

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally
@ 2017-06-01 10:21   ` Joonas Lahtinen
  0 siblings, 0 replies; 9+ messages in thread
From: Joonas Lahtinen @ 2017-06-01 10:21 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: # v4 . 11+

On ke, 2017-05-31 at 20:05 +0100, Chris Wilson wrote:
> Commit 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon
> insertion") added the restoration of the invalidation routine after the
> GuC was disabled, but missed that the GuC was unconditionally disabled
> when not used. This then overwrites the invalidate routine for the older
> chipsets, causing havoc and breaking resume as the most obvious victim.
> 
> We place the guard inside i915_ggtt_disable_guc() to be backport
> friendly (the bug was introduced into v4.11) but it would be preferred
> to be in more control over when this was guard (i.e. do not try and
> teardown the data structures before we have enabled them). That should
> be true with the reorganisation of the guc loaders.
> 
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Fixes: 7c3f86b6dc51 ("drm/i915: Invalidate the guc ggtt TLB upon insertion")
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Oscar Mateo <oscar.mateo@intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: <stable@vger.kernel.org> # v4.11+

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-06-01 10:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 19:05 [PATCH] drm/i915: Guard against i915_ggtt_disable_guc() being invoked unconditionally Chris Wilson
2017-05-31 19:26 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-06-01  1:01 ` [Intel-gfx] [PATCH] " Michel Thierry
2017-06-01  6:03   ` Chris Wilson
2017-06-01  6:03     ` Chris Wilson
2017-06-01  8:56   ` Chris Wilson
2017-06-01  8:56     ` Chris Wilson
2017-06-01 10:21 ` Joonas Lahtinen
2017-06-01 10:21   ` Joonas Lahtinen

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.