]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/i915: Move tasklet kicking to __i915_request_queue caller
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Aug 2019 04:20:30 +0000 (05:20 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 15 Aug 2019 12:27:44 +0000 (13:27 +0100)
Since __i915_request_queue() may be called from hardirq (timer) context,
we cannot use local_bh_disable/enable at the lower level. As we do want
to kick the tasklet to speed up initial submission or preemption for
normal client submission, lift it to the normal process context
callpath.

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/20190815042031.27750-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_request.c

index 4703aab3ae21e7e733b8439e51294467c2938abe..2b7645fd22d7463dc94a83b09203ba99b5b3dd0b 100644 (file)
@@ -1203,12 +1203,10 @@ void __i915_request_queue(struct i915_request *rq,
         * decide whether to preempt the entire chain so that it is ready to
         * run at the earliest possible convenience.
         */
-       local_bh_disable();
        i915_sw_fence_commit(&rq->semaphore);
        if (attr && rq->engine->schedule)
                rq->engine->schedule(rq, attr);
        i915_sw_fence_commit(&rq->submit);
-       local_bh_enable(); /* Kick the execlists tasklet if just scheduled */
 }
 
 void i915_request_add(struct i915_request *rq)
@@ -1247,7 +1245,9 @@ void i915_request_add(struct i915_request *rq)
        if (list_empty(&rq->sched.signalers_list))
                attr.priority |= I915_PRIORITY_WAIT;
 
+       local_bh_disable();
        __i915_request_queue(rq, &attr);
+       local_bh_enable(); /* Kick the execlists tasklet if just scheduled */
 
        /*
         * In typical scenarios, we do not expect the previous request on