drm/i915: Update i915_switch_context() to take a request structure
Now that the request is guaranteed to specify the context, it is possible to update the context switch code to use requests rather than ring and context pairs. This patch updates i915_switch_context() accordingly. Also removed the warning that the request's context must match the last context switch's context. As the context switch now gets the context object from the request structure, there is no longer any scope for the two to become out of step. For: VIZ-5115 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Tomas Elf <tomas.elf@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:

committed by
Daniel Vetter

parent
b3dd6b9681
commit
ba01cc9346
@@ -2539,8 +2539,6 @@ void __i915_add_request(struct intel_engine_cs *ring,
|
||||
*/
|
||||
request->batch_obj = obj;
|
||||
|
||||
WARN_ON(!i915.enable_execlists && (request->ctx != ring->last_context));
|
||||
|
||||
request->emitted_jiffies = jiffies;
|
||||
list_add_tail(&request->list, &ring->request_list);
|
||||
request->file_priv = NULL;
|
||||
@@ -3311,7 +3309,7 @@ int i915_gpu_idle(struct drm_device *dev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = i915_switch_context(req->ring, ring->default_context);
|
||||
ret = i915_switch_context(req);
|
||||
if (ret) {
|
||||
i915_gem_request_cancel(req);
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user