]> Git Repo - linux.git/commitdiff
drm/i915/ringbuffer: EMIT_INVALIDATE after switch context
authorChris Wilson <[email protected]>
Fri, 7 Dec 2018 09:02:12 +0000 (09:02 +0000)
committerChris Wilson <[email protected]>
Fri, 7 Dec 2018 12:12:52 +0000 (12:12 +0000)
The recommend procedure was to switch contexts (and mm) then invalidate
the TLBs. Make it so.

Signed-off-by: Chris Wilson <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/intel_ringbuffer.c

index 16084749adf5438a19b92d3fceb16c72754d8362..74a4d587c3129b9d8a91d15c8ba3cc7d94927077 100644 (file)
@@ -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;
 
This page took 0.063969 seconds and 4 git commands to generate.