From 5fcdda4bb7f0e0fdad48643d00dd6ca9124aee21 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 17 Nov 2017 21:29:30 +0000 Subject: [PATCH] cnl --- drivers/gpu/drm/i915/intel_lrc.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index be6c39a..fb625a1 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -153,11 +153,6 @@ #define GEN8_CTX_STATUS_COMPLETE (1 << 4) #define GEN8_CTX_STATUS_LITE_RESTORE (1 << 15) -#define GEN8_CTX_STATUS_COMPLETED_MASK \ - (GEN8_CTX_STATUS_ACTIVE_IDLE | \ - GEN8_CTX_STATUS_PREEMPTED | \ - GEN8_CTX_STATUS_ELEMENT_SWITCH) - #define CTX_LRI_HEADER_0 0x01 #define CTX_CONTEXT_CONTROL 0x02 #define CTX_RING_HEAD 0x04 @@ -873,26 +868,26 @@ static void execlists_submission_tasklet(unsigned long data) GEM_TRACE("%s csb[%dd]: status=0x%08x:0x%08x\n", engine->name, head, status, buf[2*head + 1]); - if (!(status & GEN8_CTX_STATUS_COMPLETED_MASK)) - continue; - if (status & GEN8_CTX_STATUS_ACTIVE_IDLE && - buf[2*head + 1] == PREEMPT_ID) { - execlists_cancel_port_requests(execlists); - execlists_unwind_incomplete_requests(execlists); + if (status & GEN8_CTX_STATUS_ACTIVE_IDLE) { + if (buf[2*head + 1] == PREEMPT_ID) { + execlists_cancel_port_requests(execlists); + execlists_unwind_incomplete_requests(execlists); - GEM_BUG_ON(!execlists_is_active(execlists, - EXECLISTS_ACTIVE_PREEMPT)); - execlists_clear_active(execlists, - EXECLISTS_ACTIVE_PREEMPT); + GEM_BUG_ON(!execlists_is_active(execlists, + EXECLISTS_ACTIVE_PREEMPT)); + execlists_clear_active(execlists, + EXECLISTS_ACTIVE_PREEMPT); + continue; + } + } else if (status & GEN8_CTX_STATUS_PREEMPTED) { + if (execlists_is_active(execlists, + EXECLISTS_ACTIVE_PREEMPT)) + continue; + } else { continue; } - if (status & GEN8_CTX_STATUS_PREEMPTED && - execlists_is_active(execlists, - EXECLISTS_ACTIVE_PREEMPT)) - continue; - GEM_BUG_ON(!execlists_is_active(execlists, EXECLISTS_ACTIVE_USER)); -- 2.7.4