All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Prefer to pageflip on the active ring on IvyBridge
@ 2012-04-16 14:29 Chris Wilson
  2012-04-16 14:36 ` Chris Wilson
  2012-04-26 19:42 ` Chris Wilson
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2012-04-16 14:29 UTC (permalink / raw)
  To: intel-gfx

IvyBridge has the ability to pageflip from either the Render or Blitter
rings. Scheduling the pageflip on the active ring (if the new scanout is
being rendered on either pipeline) saves inserting a semaphore (if
available) and forcing a stall on both pipelines. We presume that the
current scanout is inactive.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 984834a..ead2822 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7908,9 +7908,13 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
-	struct intel_ring_buffer *ring = &dev_priv->ring[BCS];
+	struct intel_ring_buffer *ring;
 	int ret;
 
+	ring = obj->ring;
+	if (ring == NULL || ring == &dev_priv->ring[RCS])
+		ring = &dev_priv->ring[BCS];
+
 	ret = intel_pin_and_fence_fb_obj(dev, obj, ring);
 	if (ret)
 		goto out;
-- 
1.7.10

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

end of thread, other threads:[~2012-04-26 19:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 14:29 [PATCH] drm/i915: Prefer to pageflip on the active ring on IvyBridge Chris Wilson
2012-04-16 14:36 ` Chris Wilson
2012-04-26 19:42 ` Chris Wilson

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.