All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] drm/i915: add Ivy Bridge page flip support
Date: Thu, 16 Jun 2011 09:19:14 -0700	[thread overview]
Message-ID: <1308241154-6830-3-git-send-email-jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <1308241154-6830-1-git-send-email-jbarnes@virtuousgeek.org>

Use the blit ring for submitting flips since the render ring doesn't
generate flip complete interrupts.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_display.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 37e74e9..e842ed9 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6412,6 +6412,33 @@ out:
 	return ret;
 }
 
+static int intel_gen7_queue_flip(struct drm_device *dev,
+				 struct drm_crtc *crtc,
+				 struct drm_framebuffer *fb,
+				 struct drm_i915_gem_object *obj)
+{
+	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];
+	int ret;
+
+	ret = intel_pin_and_fence_fb_obj(dev, obj, ring);
+	if (ret)
+		goto out;
+
+	ret = intel_ring_begin(ring, 4);
+	if (ret)
+		goto out;
+
+	intel_ring_emit(ring, MI_DISPLAY_FLIP_I915 | (intel_crtc->plane << 19));
+	intel_ring_emit(ring, (fb->pitch | obj->tiling_mode));
+	intel_ring_emit(ring, (obj->gtt_offset));
+	intel_ring_emit(ring, (MI_NOOP));
+	intel_ring_advance(ring);
+out:
+	return ret;
+}
+
 static int intel_default_queue_flip(struct drm_device *dev,
 				    struct drm_crtc *crtc,
 				    struct drm_framebuffer *fb,
@@ -7759,6 +7786,9 @@ static void intel_init_display(struct drm_device *dev)
 	case 6:
 		dev_priv->display.queue_flip = intel_gen6_queue_flip;
 		break;
+	case 7:
+		dev_priv->display.queue_flip = intel_gen7_queue_flip;
+		break;
 	}
 }
 
-- 
1.7.4.1

  parent reply	other threads:[~2011-06-16 16:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16 16:19 IVB page flipping fixes (hopefully final) Jesse Barnes
2011-06-16 16:19 ` [PATCH 1/2] drm/i915: split page flip queueing into per-chipset functions Jesse Barnes
2011-06-16 18:53   ` Ben Widawsky
2011-06-16 16:19 ` Jesse Barnes [this message]
2011-06-16 18:54   ` [PATCH 2/2] drm/i915: add Ivy Bridge page flip support Ben Widawsky
2011-06-16 19:17     ` Jesse Barnes
2011-06-16 19:18     ` Jesse Barnes
2011-06-16 21:20       ` Paul Menzel
2011-06-16 19:32 ` IVB page flipping fixes (hopefully final) Daniel Vetter
2011-06-17 19:42 ` Kenneth Graunke
2011-06-20 15:15 ` Zhao, Jian J
2011-06-23 10:36   ` Zhao, Jian J
  -- strict thread matches above, loose matches on Subject: below --
2011-06-14 19:34 [PATCH 1/2] drm/i915: split page flip queueing into per-chipset functions Jesse Barnes
2011-06-14 19:34 ` [PATCH 2/2] drm/i915: add Ivy Bridge page flip support Jesse Barnes
2011-06-15 17:50   ` Jesse Barnes
2011-06-14 18:13 [PATCH 1/2] drm/i915: split page flip queueing into per-chipset functions Jesse Barnes
2011-06-14 18:13 ` [PATCH 2/2] drm/i915: add Ivy Bridge page flip support Jesse Barnes
2011-06-14 18:22   ` Chris Wilson
2011-06-14 19:35     ` Jesse Barnes

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=1308241154-6830-3-git-send-email-jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --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 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.