diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-12-07 04:02:12 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-12-07 07:12:52 -0500 |
commit | f2253bd9859bab65fdbc94bf5ce1876c403a11eb (patch) | |
tree | 749019ceb06b2aecdd3c432762f2dcfbeef7ead4 /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | 5f5800a765de8414f6fb213c4ad4a1cf529e131d (diff) |
drm/i915/ringbuffer: EMIT_INVALIDATE after switch context
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
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 16084749adf5..74a4d587c312 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1827,12 +1827,12 @@ static int ring_request_alloc(struct i915_request *request) | |||
1827 | */ | 1827 | */ |
1828 | request->reserved_space += LEGACY_REQUEST_SIZE; | 1828 | request->reserved_space += LEGACY_REQUEST_SIZE; |
1829 | 1829 | ||
1830 | /* Unconditionally invalidate GPU caches and TLBs. */ | 1830 | ret = switch_context(request); |
1831 | ret = request->engine->emit_flush(request, EMIT_INVALIDATE); | ||
1832 | if (ret) | 1831 | if (ret) |
1833 | return ret; | 1832 | return ret; |
1834 | 1833 | ||
1835 | ret = switch_context(request); | 1834 | /* Unconditionally invalidate GPU caches and TLBs. */ |
1835 | ret = request->engine->emit_flush(request, EMIT_INVALIDATE); | ||
1836 | if (ret) | 1836 | if (ret) |
1837 | return ret; | 1837 | return ret; |
1838 | 1838 | ||