From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Boost GPU frequency if we detect outstanding pageflips
Date: Thu, 27 Mar 2014 14:59:36 +0100 [thread overview]
Message-ID: <20140327135936.GD26878@phenom.ffwll.local> (raw)
In-Reply-To: <1395921671-24697-1-git-send-email-chris@chris-wilson.co.uk>
On Thu, Mar 27, 2014 at 12:01:11PM +0000, Chris Wilson wrote:
> If we hit a vblank and see that have a pageflip queue but not yet
> processed, ensure that the GPU is running at maximum in order to clear
> the backlog. Pageflips are only queued for the following vblank, if we
> miss it, there will be a visible stutter. Boosting the GPU frequency
> doesn't prevent us from missing the target vblank, but it should help
> the subsequent frames hitting theirs.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Does kms_flip already have a synthetic subtest which reliably hits this?
One of the dummy load things should be good enough.
I just want to make sure we exercise this code, actual functional testing
is a bit too tricky I think.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_display.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index e15b3ab..215526f 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8960,6 +8960,7 @@ void intel_check_page_flip(struct drm_device *dev, int pipe)
> struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> unsigned long flags;
> + bool outstanding;
>
> if (crtc == NULL)
> return;
> @@ -8972,7 +8973,11 @@ void intel_check_page_flip(struct drm_device *dev, int pipe)
> page_flip_completed(dev_priv, intel_crtc, intel_crtc->unpin_work);
> intel_crtc->unpin_work = NULL;
> }
> + outstanding = intel_crtc->unpin_work != NULL;
> spin_unlock_irqrestore(&dev->event_lock, flags);
> +
> + if (outstanding && INTEL_INFO(dev)->gen >= 6)
> + gen6_rps_boost(dev_priv);
> }
>
> static int intel_crtc_page_flip(struct drm_crtc *crtc,
> --
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2014-03-27 13:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 12:01 [PATCH] drm/i915: Boost GPU frequency if we detect outstanding pageflips Chris Wilson
2014-03-27 13:59 ` Daniel Vetter [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=20140327135936.GD26878@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox