Skip to content

Commit

Permalink
drm/i915/ringbuffer: EMIT_INVALIDATE after switch context
Browse files Browse the repository at this point in the history
The recommend procedure was to switch contexts (and mm) then invalidate
the TLBs. Make it so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181207090213.14352-2-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Dec 7, 2018
1 parent 5f5800a commit f2253bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/intel_ringbuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1827,12 +1827,12 @@ static int ring_request_alloc(struct i915_request *request)
*/
request->reserved_space += LEGACY_REQUEST_SIZE;

/* Unconditionally invalidate GPU caches and TLBs. */
ret = request->engine->emit_flush(request, EMIT_INVALIDATE);
ret = switch_context(request);
if (ret)
return ret;

ret = switch_context(request);
/* Unconditionally invalidate GPU caches and TLBs. */
ret = request->engine->emit_flush(request, EMIT_INVALIDATE);
if (ret)
return ret;

Expand Down

0 comments on commit f2253bd

Please sign in to comment.