intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display: Apply interactive priority to explicit flip fences
Date: Tue, 19 Jan 2021 16:53:00 +0000	[thread overview]
Message-ID: <161107518018.7548.5387427247860402232@build.alporthouse.com> (raw)
In-Reply-To: <YAcL/GQ0B3H1lJ5I@intel.com>

Quoting Ville Syrjälä (2021-01-19 16:42:36)
> On Mon, Jan 18, 2021 at 11:59:29AM +0000, Chris Wilson wrote:
> > +void i915_gem_fence_wait_priority(struct dma_fence *fence,
> > +                               const struct i915_sched_attr *attr)
> > +{
> > +     if (dma_fence_is_signaled(fence))
> > +             return;
> > +
> > +     local_bh_disable();
> > +
> >       /* Recurse once into a fence-array */
> >       if (dma_fence_is_array(fence)) {
> >               struct dma_fence_array *array = to_dma_fence_array(fence);
> >               int i;
> >  
> >               for (i = 0; i < array->num_fences; i++)
> > -                     __fence_set_priority(array->fences[i], attr);
> > +                     fence_set_priority(array->fences[i], attr);
> > +     } else if (__dma_fence_is_chain(fence)) {
> > +             struct dma_fence *iter;
> > +
> > +             dma_fence_chain_for_each(iter, fence) {
> > +                     if (!fence_set_priority(to_dma_fence_chain(iter)->fence,
> > +                                             attr))
> > +                             break;
> 
> Does this mean the fence chain is ordered in some way, ie. the
> rest of the fences in the chain will have been signalled already?
> I couldn't find any description of what a fence chain really is
> anywhere.

Yes, a fence chain is a timeline constructed by fences. It is assumed
the individual fences are in order but that's not strictly enforced,
except that the chain is broken between different fence contexts.

For our purpose, we really just need to find the last i915_request as
once we apply the priority boost to that one, everything earlier will be
boosted by priority inheritance. We keep chasing the chain as extra
boosts will be redundant and skipped. So for simplicity, I opted to bump
the chain rather than work out if the boosts are no longer needed. Or we
could just stop after the first and expect it to work as well as we can
expect.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2021-01-19 19:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18 11:59 [Intel-gfx] [PATCH] drm/i915/display: Apply interactive priority to explicit flip fences Chris Wilson
2021-01-18 12:59 ` Chris Wilson
2021-01-18 17:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Apply interactive priority to explicit flip fences (rev2) Patchwork
2021-01-18 23:07 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-01-19 16:42 ` [Intel-gfx] [PATCH] drm/i915/display: Apply interactive priority to explicit flip fences Ville Syrjälä
2021-01-19 16:53   ` Chris Wilson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161107518018.7548.5387427247860402232@build.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).