• Chris Wilson's avatar
    drm/i915/execlists: Avoid kicking priority on the current context · a2bf92e8
    Chris Wilson authored
    If the request is currently on the HW (in port 0), then we do not need
    to kick the submission tasklet to evaluate whether we should be
    preempting itself in order to execute it again.
    
    In the case that was annoying me:
    
       execlists_schedule: rq(18:211173).prio=0 -> 2
       need_preempt: last(18:211174).prio=0, queue.prio=2
    
    We are bumping the priority of the first of a pair of requests running
    in the current context. Then when evaluating preempt, we would see that
    that our priority request is higher than the last executing request in
    ELSP0 and so trigger preemption, not realising that our intended request
    was already executing.
    
    v2: As we assume state of the execlists->port[] that is only valid while
    we hold the timeline lock we have to repeat some earlier tests that on
    the validity of the node.
    v3: Wrap guc submission under the timeline.lock as is now the way of all
    things.
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20180925083205.2229-2-chris@chris-wilson.co.uk
    a2bf92e8
intel_guc_submission.c 38.8 KB