aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_lrc.c
diff options
context:
space:
mode:
authorGravatar Chris Wilson <chris@chris-wilson.co.uk> 2016-09-09 14:11:43 +0100
committerGravatar Chris Wilson <chris@chris-wilson.co.uk> 2016-09-09 14:23:00 +0100
commita52abd2facfe8add456a075c2d9e254db071bf85 (patch)
tree63b06d7be33a4c35117fe062265aaae21d93c028 /drivers/gpu/drm/i915/intel_lrc.c
parentdrm/i915: Only queue requests during execlists submission (diff)
downloadlinux-a52abd2facfe8add456a075c2d9e254db071bf85.tar.gz
linux-a52abd2facfe8add456a075c2d9e254db071bf85.tar.bz2
linux-a52abd2facfe8add456a075c2d9e254db071bf85.zip
drm/i915: Record the position of the workarounds in the tail of the request
Rather than blindly assuming we need to advance the tail for resubmitting the request via the ELSP, record the position. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 9bfe304c5256..d7fa9b3a55c3 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -482,8 +482,7 @@ static void execlists_unqueue(struct intel_engine_cs *engine)
* resubmit the request. See gen8_emit_request() for where we
* prepare the padding after the end of the request.
*/
- req0->tail += 8;
- req0->tail &= req0->ring->size - 1;
+ req0->tail = req0->wa_tail;
}
execlists_elsp_submit_contexts(req0, req1);
@@ -711,6 +710,7 @@ intel_logical_ring_advance(struct drm_i915_gem_request *request)
intel_ring_emit(ring, MI_NOOP);
intel_ring_emit(ring, MI_NOOP);
intel_ring_advance(ring);
+ request->wa_tail = ring->tail;
/* We keep the previous context alive until we retire the following
* request. This ensures that any the context object is still pinned