• Chris Wilson's avatar
    drm/i915: Track the context's seqno in its own timeline HWSP · 5013eb8c
    Chris Wilson authored
    Now that we have allocated ourselves a cacheline to store a breadcrumb,
    we can emit a write from the GPU into the timeline's HWSP of the
    per-context seqno as we complete each request. This drops the mirroring
    of the per-engine HWSP and allows each context to operate independently.
    We do not need to unwind the per-context timeline, and so requests are
    always consistent with the timeline breadcrumb, greatly simplifying the
    completion checks as we no longer need to be concerned about the
    global_seqno changing mid check.
    
    One complication though is that we have to be wary that the request may
    outlive the HWSP and so avoid touching the potentially danging pointer
    after we have retired the fence. We also have to guard our access of the
    HWSP with RCU, the release of the obj->mm.pages should already be RCU-safe.
    
    At this point, we are emitting both per-context and global seqno and
    still using the single per-engine execution timeline for resolving
    interrupts.
    
    v2: s/fake_complete/mark_complete/
    Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190128181812.22804-5-chris@chris-wilson.co.uk
    5013eb8c
i915_request.c 36.2 KB