[2/4] drm/i915/execlists: Pause CS flow before reset
diff mbox series

Message ID 20200331091459.29179-2-chris@chris-wilson.co.uk
State New
Headers show
Series
  • [1/4] drm/i915/selftests: Tidy up an error message for live_error_interrupt
Related show

Commit Message

Chris Wilson March 31, 2020, 9:14 a.m. UTC
Since we may be attempting to reset an active engine, we try to freeze
it in place before resetting -- to be on the safe side. We can go one
step further if we are using the CS flow semaphore to prevent the
context switching into the next.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mika Kuoppala March 31, 2020, 1:08 p.m. UTC | #1
Chris Wilson <chris@chris-wilson.co.uk> writes:

> Since we may be attempting to reset an active engine, we try to freeze
> it in place before resetting -- to be on the safe side. We can go one
> step further if we are using the CS flow semaphore to prevent the
> context switching into the next.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_lrc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 9fff4e02cee6..9e18c0896a83 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -3669,6 +3669,7 @@ static void execlists_reset_prepare(struct intel_engine_cs *engine)
>  	 *
>  	 * FIXME: Wa for more modern gens needs to be validated
>  	 */
> +	ring_set_paused(engine, 1);
>  	intel_engine_stop_cs(engine);
>  }
>  
> -- 
> 2.20.1

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 9fff4e02cee6..9e18c0896a83 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -3669,6 +3669,7 @@  static void execlists_reset_prepare(struct intel_engine_cs *engine)
 	 *
 	 * FIXME: Wa for more modern gens needs to be validated
 	 */
+	ring_set_paused(engine, 1);
 	intel_engine_stop_cs(engine);
 }