diff mbox

drm/i915: Suppress assertion for i915_ggtt_disable_guc

Message ID 20180720095144.5885-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 20, 2018, 9:51 a.m. UTC
Another step in the drv_module_reload fault-injection saga, is that we
try to disable the guc twice. Probably. It's a little unclear exactly
what is going on in the unload sequence that catches us out, so for the
time being suppress the assertion to get the test re-enabled.

Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Michał Winiarski July 20, 2018, 2:57 p.m. UTC | #1
On Fri, Jul 20, 2018 at 10:51:44AM +0100, Chris Wilson wrote:
> Another step in the drv_module_reload fault-injection saga, is that we
> try to disable the guc twice. Probably. It's a little unclear exactly
> what is going on in the unload sequence that catches us out, so for the
> time being suppress the assertion to get the test re-enabled.
> 
> Testcase: igt/drv_module_reload/basic-reload-inject
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>

Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

-Michał

> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index cff0e6430994..1b476423bfab 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -3654,6 +3654,10 @@ void i915_ggtt_enable_guc(struct drm_i915_private *i915)
>  
>  void i915_ggtt_disable_guc(struct drm_i915_private *i915)
>  {
> +	/* XXX Temporary pardon for error unload */
> +	if (i915->ggtt.invalidate == gen6_ggtt_invalidate)
> +		return;
> +
>  	/* We should only be called after i915_ggtt_enable_guc() */
>  	GEM_BUG_ON(i915->ggtt.invalidate != guc_ggtt_invalidate);
>  
> -- 
> 2.18.0
>
Chris Wilson July 20, 2018, 2:59 p.m. UTC | #2
Quoting Michał Winiarski (2018-07-20 15:57:49)
> On Fri, Jul 20, 2018 at 10:51:44AM +0100, Chris Wilson wrote:
> > Another step in the drv_module_reload fault-injection saga, is that we
> > try to disable the guc twice. Probably. It's a little unclear exactly
> > what is going on in the unload sequence that catches us out, so for the
> > time being suppress the assertion to get the test re-enabled.
> > 
> > Testcase: igt/drv_module_reload/basic-reload-inject
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Michał Winiarski <michal.winiarski@intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> 
> Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

Out of respect, I'll say this was actually an Acked-by. :)
Hacks like this don't deserve r-b.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index cff0e6430994..1b476423bfab 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -3654,6 +3654,10 @@  void i915_ggtt_enable_guc(struct drm_i915_private *i915)
 
 void i915_ggtt_disable_guc(struct drm_i915_private *i915)
 {
+	/* XXX Temporary pardon for error unload */
+	if (i915->ggtt.invalidate == gen6_ggtt_invalidate)
+		return;
+
 	/* We should only be called after i915_ggtt_enable_guc() */
 	GEM_BUG_ON(i915->ggtt.invalidate != guc_ggtt_invalidate);