diff mbox

[11/15] drm/i915: Clear engine irq posted following a reset

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

Commit Message

Chris Wilson July 17, 2017, 9:11 a.m. UTC
When the GPU is reset, we want to discard all pending notifications as
either we have manually completed them, or they are no longer
applicable. Make sure we do reset the engine->irq_posted prior to
re-enabling the engine (e.g. the interrupt tasklets) in
i915_gem_reset_finish_engine().

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

Comments

Michel Thierry July 17, 2017, 10:05 p.m. UTC | #1
On 17/07/17 02:11, Chris Wilson wrote:
> When the GPU is reset, we want to discard all pending notifications as
> either we have manually completed them, or they are no longer
> applicable. Make sure we do reset the engine->irq_posted prior to
> re-enabling the engine (e.g. the interrupt tasklets) in
> i915_gem_reset_finish_engine().
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/i915_gem.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 5517373c1bea..19511020f06e 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3027,6 +3027,8 @@ static bool i915_gem_reset_request(struct drm_i915_gem_request *request)
>   void i915_gem_reset_engine(struct intel_engine_cs *engine,
>   			   struct drm_i915_gem_request *request)
>   {
> +	engine->irq_posted = 0;
> +
>   	if (request && i915_gem_reset_request(request)) {
>   		DRM_DEBUG_DRIVER("resetting %s to restart from tail of request 0x%x\n",
>   				 engine->name, request->global_seqno);
> 

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

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5517373c1bea..19511020f06e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3027,6 +3027,8 @@  static bool i915_gem_reset_request(struct drm_i915_gem_request *request)
 void i915_gem_reset_engine(struct intel_engine_cs *engine,
 			   struct drm_i915_gem_request *request)
 {
+	engine->irq_posted = 0;
+
 	if (request && i915_gem_reset_request(request)) {
 		DRM_DEBUG_DRIVER("resetting %s to restart from tail of request 0x%x\n",
 				 engine->name, request->global_seqno);