Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Boost GPU frequency if we detect outstanding pageflips
@ 2014-03-27 12:01 Chris Wilson
  2014-03-27 13:59 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2014-03-27 12:01 UTC (permalink / raw)
  To: intel-gfx

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>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-27 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox