Op 16-06-16 om 14:54 schreef John.C.Harrison@xxxxxxxxx: > From: John Harrison <John.C.Harrison@xxxxxxxxx> > > There is a construct in the linux kernel called 'struct fence' that is > intended to keep track of work that is executed on hardware. I.e. it > solves the basic problem that the drivers 'struct > drm_i915_gem_request' is trying to address. The request structure does > quite a lot more than simply track the execution progress so is very > definitely still required. However, the basic completion status side > could be updated to use the ready made fence implementation and gain > all the advantages that provides. > > This patch makes the first step of integrating a struct fence into the > request. It replaces the explicit reference count with that of the > fence. It also replaces the 'is completed' test with the fence's > equivalent. Currently, that simply chains on to the original request > implementation. A future patch will improve this. > > v3: Updated after review comments by Tvrtko Ursulin. Added fence > context/seqno pair to the debugfs request info. Renamed fence 'driver > name' to just 'i915'. Removed BUG_ONs. > > v5: Changed seqno format in debugfs to %x rather than %u as that is > apparently the preferred appearance. Line wrapped some long lines to > keep the style checker happy. > > v6: Updated to newer nigthly and resolved conflicts. The biggest issue > was with the re-worked busy spin precursor to waiting on a request. In > particular, the addition of a 'request_started' helper function. This > has no corresponding concept within the fence framework. However, it > is only ever used in one place and the whole point of that place is to > always directly read the seqno for absolutely lowest latency possible. > So the simple solution is to just make the seqno test explicit at that > point now rather than later in the series (it was previously being > done anyway when fences become interrupt driven). > > v7: Rebased to newer nightly - lots of ring -> engine renaming and > interface change to get_seqno(). > > v8: Rebased to newer nightly - no longer needs to worry about mutex > locking in the request free code path. Moved to after fence timeline > patch so no longer needs to add a horrid hack timeline. > > Removed commented out code block. Added support for possible RCU usage > of fence object (Review comments by Maarten Lankhorst). > > v10: Removed duplicate rcu_head field from request - there is already > one in the fence structure for this exact purpose. Improved/added some > comments. [Review comments from Maarten Lankhorst & Tvrtko Ursulin] > > Updated for yet more nightly changes (u64 for fence context). Reviewed-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx