[Intel-gfx] [PATCH 5/6] drm/i915: Track vma activity per fence.context, not per engine

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 4 09:53:25 UTC 2018


Quoting Tvrtko Ursulin (2018-07-04 10:43:07)
> 
> On 03/07/2018 21:29, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2018-07-03 18:28:31)
> >>
> >> On 29/06/2018 23:54, Chris Wilson wrote:
> >>>        /*
> >>>         * Add a reference if we're newly entering the active list.
> >>>         * The order in which we add operations to the retirement queue is
> >>> @@ -896,11 +947,13 @@ int i915_vma_move_to_active(struct i915_vma *vma,
> >>>         * add the active reference first and queue for it to be dropped
> >>>         * *last*.
> >>>         */
> >>> -     if (!i915_vma_is_active(vma))
> >>> +     if (!i915_gem_active_isset(active) && !vma->active_count++) {
> >>
> >> vma->active_count (which is i915_vma_is_active) check wouldn't be
> >> enough? Can it be zero with active _set_?
> > 
> > No, in the next patch we can have active_count with vma->active unset.
> 
> Definitely then please make it so it is only what is needed for this 
> patch, and change it in the next.

It is. active_count == the number of retirement callbacks we will
receive, and so must not be incremented if we have already accounted for
this one. It is expressing the same old rule, having given up the bitmask and
knowing the state of each i915_gem_active_isset() simultaneously.
-Chris


More information about the Intel-gfx mailing list