[Intel-gfx] [PATCH] drm/i915: Prefer to pageflip on the active ring on IvyBridge

Chris Wilson chris at chris-wilson.co.uk
Mon Apr 16 16:29:41 CEST 2012


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




More information about the Intel-gfx mailing list