summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_perf.c
diff options
context:
space:
mode:
authorChris Wilson2017-11-20 11:20:02 +0100
committerChris Wilson2017-11-20 16:56:16 +0100
commit3fef5cda970124a15c553c1672d800e40fc08a9e (patch)
tree6ba9c24bca258c8e3bab90a01d29fdfa4fdb9fc1 /drivers/gpu/drm/i915/i915_perf.c
parentdrm/i915: Pull the unconditional GPU cache invalidation into request construc... (diff)
downloadkernel-qcow2-linux-3fef5cda970124a15c553c1672d800e40fc08a9e.tar.gz
kernel-qcow2-linux-3fef5cda970124a15c553c1672d800e40fc08a9e.tar.xz
kernel-qcow2-linux-3fef5cda970124a15c553c1672d800e40fc08a9e.zip
drm/i915: Automatic i915_switch_context for legacy
During request construction, after pinning the context we know whether or not we have to emit a context switch. So move this common operation from every caller into i915_gem_request_alloc() itself. v2: Always submit the request if we emitted some commands during request construction, as typically it also involves changes in global state. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171120102002.22254-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_perf.c')
-rw-r--r--drivers/gpu/drm/i915/i915_perf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 0f48e666098d..fd150099978c 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -1726,10 +1726,9 @@ static int gen8_switch_to_updated_kernel_context(struct drm_i915_private *dev_pr
GFP_KERNEL);
}
- ret = i915_switch_context(req);
i915_add_request(req);
- return ret;
+ return 0;
}
/*