From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: sourab.gupta@intel.com
Cc: Akash Goel <akash.goel@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3] drm/i915: Replaced Blitter ring based flips with MMIO flips for VLV
Date: Fri, 9 May 2014 20:18:49 +0300 [thread overview]
Message-ID: <20140509171848.GA18465@intel.com> (raw)
In-Reply-To: <20140509115942.GV18465@intel.com>
On Fri, May 09, 2014 at 02:59:42PM +0300, Ville Syrjälä wrote:
> On Sun, Mar 23, 2014 at 02:31:05PM +0530, sourab.gupta@intel.com wrote:
> > + intel_do_mmio_flip(dev, crtc);
> > + mmio_flip_data->seqno = 0;
> > + ring->irq_put(ring);
> > + }
> > + }
> > +
> > + spin_unlock_irqrestore(&dev_priv->mmio_flip_lock, irq_flags);
> > +}
> > +
> > +/* Using MMIO based flips starting from VLV, for Media power well
> > + * residency optimization. The other alternative of having Render
> > + * ring based flip calls is not being used, as the performance
> > + * (FPS) of certain 3D Apps was getting severly affected.
> > + */
> > +static int intel_gen7_queue_mmio_flip(struct drm_device *dev,
> > + struct drm_crtc *crtc,
> > + struct drm_framebuffer *fb,
> > + struct drm_i915_gem_object *obj,
> > + uint32_t flags)
>
> There's nothing gen7 specific here. So you could just rename the
> function to eg. intel_queue_mmio_flip(). Maybe also move the
> comment about VLV to where you set up the function pointer.
Actually this code isn't entirely gen agnostic. It should work on gen5+
since all of those have a flip done interrupt. For older platforms we
use some clever tricks involving the flip_pending status bits and vblank
irqs. That code won't work for mmio flips. We'd need to add another way
to complete the flips based. That would involve using the frame counter
to make it accurate. To avoid races there we'd definitely need to use
the vblank evade mechanism to make sure we sample the frame counter
within the same frame as when we write the registers. Also gen2 has
the extra complication that it lacks a hardware frame counter.
So I think we can start off with limiting this to gen5+, and later we
can extend it to cover the older platforms since we anyway need to do
that work to get the nuclear flips working.
BTW I gave this code a whirl on my IVB and everything seems to work
fine.
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-05-09 17:18 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 11:26 [PATCH 0/2] Using MMIO based flips on VLV akash.goel
2014-01-09 11:26 ` [PATCH 1/2] drm/i915: Creating a new workqueue to handle MMIO flip work items akash.goel
2014-01-09 11:26 ` [PATCH 2/2] drm/i915/vlv: Replaced Blitter ring based flips with MMIO Flips for VLV akash.goel
2014-01-09 11:31 ` Chris Wilson
2014-01-13 9:47 ` Goel, Akash
2014-02-07 11:59 ` Goel, Akash
2014-02-07 14:47 ` Daniel Vetter
2014-02-07 17:17 ` Goel, Akash
[not found] ` <8BF5CF93467D8C498F250C96583BC09CC718E3@BGSMSX103.gar.corp.intel.com>
2014-03-07 13:17 ` Gupta, Sourab
2014-03-07 13:30 ` Ville Syrjälä
2014-03-13 7:21 ` [PATCH] drm/i915: Replaced Blitter ring based flips with MMIO flips " sourab.gupta
2014-03-13 9:01 ` [PATCH v2] " sourab.gupta
2014-03-17 4:33 ` Gupta, Sourab
2014-03-21 17:10 ` Gupta, Sourab
2014-03-21 18:15 ` Damien Lespiau
2014-03-23 9:01 ` [PATCH v3] " sourab.gupta
2014-03-26 7:49 ` Gupta, Sourab
2014-04-03 8:40 ` Gupta, Sourab
2014-04-07 11:19 ` Gupta, Sourab
2014-05-09 11:59 ` Ville Syrjälä
2014-05-09 13:28 ` Ville Syrjälä
2014-05-09 17:18 ` Ville Syrjälä [this message]
2014-05-15 6:17 ` [PATCH v4] " sourab.gupta
2014-05-15 12:27 ` Ville Syrjälä
2014-05-16 12:34 ` Gupta, Sourab
2014-05-16 12:51 ` Ville Syrjälä
2014-05-19 9:19 ` Gupta, Sourab
2014-05-19 10:58 ` [PATCH v5] " sourab.gupta
2014-05-19 11:47 ` Ville Syrjälä
2014-05-19 12:29 ` Daniel Vetter
2014-05-19 13:06 ` Ville Syrjälä
2014-05-19 13:41 ` Daniel Vetter
2014-05-20 10:49 ` [PATCH 0/3] Replace Blitter ring based flips with MMIO flips sourab.gupta
2014-05-20 10:49 ` [PATCH v6 1/3] drm/i915: Replaced " sourab.gupta
2014-05-20 11:59 ` Chris Wilson
2014-05-20 18:01 ` Gupta, Sourab
2014-05-22 14:36 ` [PATCH v2 0/3] Replace " sourab.gupta
2014-05-22 14:36 ` [PATCH v7 1/3] drm/i915: Replaced " sourab.gupta
2014-05-27 12:52 ` Ville Syrjälä
2014-05-27 13:09 ` Daniel Vetter
2014-05-28 7:12 ` [PATCH v3 0/2] Replace " sourab.gupta
2014-05-28 7:12 ` [PATCH 1/2] drm/i915: Replaced " sourab.gupta
2014-05-28 7:30 ` Chris Wilson
2014-05-28 9:42 ` Gupta, Sourab
2014-05-28 7:31 ` Chris Wilson
2014-05-28 8:12 ` Ville Syrjälä
2014-05-28 7:12 ` [PATCH 2/2] drm/i915: Default to mmio flips on VLV sourab.gupta
2014-05-28 9:56 ` Chris Wilson
2014-05-29 9:40 ` [PATCH v4 0/3] Replace Blitter ring based flips with MMIO flips sourab.gupta
2014-05-29 9:40 ` [PATCH v9 1/3] drm/i915: Replaced " sourab.gupta
2014-05-30 10:31 ` Chris Wilson
2014-05-29 9:40 ` [PATCH 2/3] drm/i915: Selection of MMIO vs CS flip at page flip time sourab.gupta
2014-05-29 9:40 ` [PATCH 3/3] drm/i915: Make module param for MMIO flip selection as tristate sourab.gupta
2014-05-30 10:49 ` Chris Wilson
2014-06-01 11:13 ` [PATCH v10] drm/i915: Replaced Blitter ring based flips with MMIO flips sourab.gupta
2014-06-02 6:56 ` Chris Wilson
2014-06-02 10:38 ` Gupta, Sourab
2014-06-02 10:56 ` Chris Wilson
2014-06-02 11:17 ` [PATCH v11] " sourab.gupta
2014-06-17 14:14 ` Daniel Vetter
2014-06-17 14:17 ` Chris Wilson
2014-05-22 14:36 ` [PATCH 2/3] drm/i915: Default to mmio flips on VLV sourab.gupta
2014-05-22 14:36 ` [PATCH 3/3] drm/i915: Fix mmio page flip vs mmio set base race sourab.gupta
2014-05-26 8:51 ` [PATCH v2 0/3] Replace Blitter ring based flips with MMIO flips Gupta, Sourab
2014-05-20 10:49 ` [PATCH 2/3] drm/i915: Default to mmio flips on VLV sourab.gupta
2014-05-20 10:49 ` [PATCH 3/3] drm/i915: Fix mmio page flip vs mmio set base race sourab.gupta
2014-01-09 11:29 ` [PATCH 0/2] Using MMIO based flips on VLV Chris Wilson
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=20140509171848.GA18465@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=akash.goel@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sourab.gupta@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox