From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Boost GPU frequency if we detect outstanding pageflips Date: Thu, 27 Mar 2014 14:59:36 +0100 Message-ID: <20140327135936.GD26878@phenom.ffwll.local> References: <1395921671-24697-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com [74.125.83.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 0860B6E959 for ; Thu, 27 Mar 2014 06:59:40 -0700 (PDT) Received: by mail-ee0-f46.google.com with SMTP id t10so2874046eei.5 for ; Thu, 27 Mar 2014 06:59:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1395921671-24697-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 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