[PATCH 1/9] cnl
Chris Wilson
chris at chris-wilson.co.uk
Fri Nov 17 22:02:49 UTC 2017
---
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 be6c39adebdf..fb625a184228 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.15.0
More information about the Intel-gfx-trybot
mailing list