[Intel-gfx] [CI 05/13] drm/i915: Automatic i915_switch_context for legacy

2017-11-19 Thread Chris Wilson
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

[Intel-gfx] [CI 05/13] drm/i915: Automatic i915_switch_context for legacy

2017-11-19 Thread Chris Wilson
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