From: Chris Wilson Date: Wed, 3 Jul 2019 09:17:20 +0000 (+0100) Subject: drm/i915/execlists: Hesitate before slicing X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ad9e3792b0c0a63d4416d6d7da8320d11110b61e;p=android-x86%2Fkernel.git drm/i915/execlists: Hesitate before slicing Be a little more hesitant before injecting a timeslice, and try to take into account any change in priority that is due for the running task before switching to another task. This will allow us to arbitrarily prevent switching away from a request if we deem it necessarily to disable preemption, for instance. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Lionel Landwerlin Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20190703091726.11690-9-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c index 953b3938a85f..1e85e04c58c4 100644 --- a/drivers/gpu/drm/i915/gt/intel_lrc.c +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c @@ -899,7 +899,7 @@ need_timeslice(struct intel_engine_cs *engine, const struct i915_request *rq) hint = max(rq_prio(list_next_entry(rq, sched.link)), engine->execlists.queue_priority_hint); - return hint >= rq_prio(rq); + return hint >= effective_prio(rq); } static bool