Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73cfa865 authored by John Harrison's avatar John Harrison Committed by Daniel Vetter
Browse files

drm/i915: Update i915_gpu_idle() to manage its own request



Added explicit request creation and submission to the GPU idle code path.

For: VIZ-5115
Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Reviewed-by: default avatarTomas Elf <tomas.elf@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 5b4a60c2
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -3305,11 +3305,23 @@ int i915_gpu_idle(struct drm_device *dev)
	/* Flush everything onto the inactive list. */
	for_each_ring(ring, dev_priv, i) {
		if (!i915.enable_execlists) {
			ret = i915_switch_context(ring, ring->default_context);
			struct drm_i915_gem_request *req;

			ret = i915_gem_request_alloc(ring, ring->default_context, &req);
			if (ret)
				return ret;

			ret = i915_switch_context(req->ring, ring->default_context);
			if (ret) {
				i915_gem_request_cancel(req);
				return ret;
			}

			i915_add_request_no_flush(req->ring);
		}

		WARN_ON(ring->outstanding_lazy_request);

		ret = intel_ring_idle(ring);
		if (ret)
			return ret;