All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RESEND] drm/i915: Interactive RPS mode
Date: Fri, 20 Jul 2018 16:07:31 +0300	[thread overview]
Message-ID: <20180720130731.GN5565@intel.com> (raw)
In-Reply-To: <153209175404.26154.14314583901681790278@skylake-alporthouse-com>

On Fri, Jul 20, 2018 at 02:02:34PM +0100, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-07-20 13:49:09)
> > 
> > On 12/07/2018 18:38, Chris Wilson wrote:
> > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > > index 7998e70a3174..5809366ff9f0 100644
> > > --- a/drivers/gpu/drm/i915/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/intel_display.c
> > > @@ -13104,6 +13104,19 @@ intel_prepare_plane_fb(struct drm_plane *plane,
> > >               add_rps_boost_after_vblank(new_state->crtc, new_state->fence);
> > >       }
> > >   
> > > +     /*
> > > +      * We declare pageflips to be interactive and so merit a small bias
> > > +      * towards upclocking to deliver the frame on time. By only changing
> > > +      * the RPS thresholds to sample more regularly and aim for higher
> > > +      * clocks we can hopefully deliver low power workloads (like kodi)
> > > +      * that are not quite steady state without resorting to forcing
> > > +      * maximum clocks following a vblank miss (see do_rps_boost()).
> > > +      */
> > > +     if (!intel_state->rps_interactive) {
> > > +             intel_rps_set_interactive(dev_priv, true);
> > > +             intel_state->rps_interactive = true;
> > > +     }
> > > +
> > >       return 0;
> > >   }
> > >   
> > > @@ -13120,8 +13133,15 @@ void
> > >   intel_cleanup_plane_fb(struct drm_plane *plane,
> > >                      struct drm_plane_state *old_state)
> > >   {
> > > +     struct intel_atomic_state *intel_state =
> > > +             to_intel_atomic_state(old_state->state);
> > >       struct drm_i915_private *dev_priv = to_i915(plane->dev);
> > >   
> > > +     if (intel_state->rps_interactive) {
> > > +             intel_rps_set_interactive(dev_priv, false);
> > > +             intel_state->rps_interactive = false;
> > > +     }
> > 
> > Why is the rps_intearctive flag needed in plane state? I wanted to 
> > assume prepare & cleanup hooks are fully symmetric, but this flags makes 
> > me unsure. A reviewer with more display knowledge will be needed here I 
> > think.
> 
> It's so that when we call intel_cleanup_plane_fb() on something that
> wasn't first prepared, we don't decrement the counter. There's a little
> bit of asymmetry at the start where we inherit the plane state.

Doing this kind of global thing from the plane hooks seems a bit
strange. How about just doing this directly from commit_tail()
etc.?

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-07-20 13:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-11 21:01 [PATCH] drm/i915: Interactive RPS mode Chris Wilson
2018-07-11 22:06 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-07-11 22:07 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-11 22:23 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-07-12  7:50 ` [PATCH v3] " Chris Wilson
2018-07-12  8:02 ` [PATCH v4] " Chris Wilson
2018-07-12 17:38   ` [RESEND] " Chris Wilson
2018-07-20 12:49     ` Tvrtko Ursulin
2018-07-20 13:02       ` Chris Wilson
2018-07-20 13:07         ` Ville Syrjälä [this message]
2018-07-20 13:14           ` Chris Wilson
2018-07-20 13:32             ` Ville Syrjälä
2018-07-20 13:38               ` Chris Wilson
2018-07-20 13:50                 ` Ville Syrjälä
2018-07-20 14:03                   ` Chris Wilson
2018-07-20 14:19                     ` Ville Syrjälä
2018-07-21  8:44                       ` Chris Wilson
2018-07-20 13:29         ` Tvrtko Ursulin
2018-07-20 13:59           ` Chris Wilson
2018-07-20 14:58             ` Tvrtko Ursulin
2018-07-20 15:01               ` Chris Wilson
2018-07-12 17:58   ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Interactive RPS mode (rev4) Patchwork
2018-07-12 17:59   ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-12 18:15   ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-23 10:01 ` [PATCH] drm/i915: Interactive RPS mode Chris Wilson
2018-07-31 13:01   ` Joonas Lahtinen

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=20180720130731.GN5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.