From: Daniel Vetter <daniel@ffwll.ch>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 20/21] drm/i915: factor out intel_set_cpu_fifo_underrun_reporting_nolock
Date: Thu, 6 Mar 2014 21:46:49 +0100 [thread overview]
Message-ID: <20140306204649.GH17001@phenom.ffwll.local> (raw)
In-Reply-To: <20140306111838.1e89ab6c@jbarnes-desktop>
On Thu, Mar 06, 2014 at 11:18:38AM -0800, Jesse Barnes wrote:
> On Tue, 4 Mar 2014 19:23:09 +0200
> Imre Deak <imre.deak@intel.com> wrote:
>
> > Needed by the next patch, wanting to set the underrun reporting as part
> > of a bigger dev_priv->irq_lock'ed sequence.
> >
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> > drivers/gpu/drm/i915/i915_irq.c | 20 +++++++++++++++-----
> > 1 file changed, 15 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > index 9d9309c..bc94cfb 100644
> > --- a/drivers/gpu/drm/i915/i915_irq.c
> > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > @@ -387,17 +387,14 @@ static void cpt_set_fifo_underrun_reporting(struct drm_device *dev,
> > *
> > * Returns the previous state of underrun reporting.
> > */
> > -bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
> > - enum pipe pipe, bool enable)
> > +bool intel_set_cpu_fifo_underrun_reporting_nolock(struct drm_device *dev,
> > + enum pipe pipe, bool enable)
In i915_irq.c we tend to use a simple __ prefix instead of a _nolock
postfix. I've frobbed this while applying (and will fix up the next
patch).
-Daniel
> > {
> > struct drm_i915_private *dev_priv = dev->dev_private;
> > struct drm_crtc *crtc = dev_priv->pipe_to_crtc_mapping[pipe];
> > struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> > - unsigned long flags;
> > bool ret;
> >
> > - spin_lock_irqsave(&dev_priv->irq_lock, flags);
> > -
> > ret = !intel_crtc->cpu_fifo_underrun_disabled;
> >
> > if (enable == ret)
> > @@ -415,7 +412,20 @@ bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
> > broadwell_set_fifo_underrun_reporting(dev, pipe, enable);
> >
> > done:
> > + return ret;
> > +}
> > +
> > +bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
> > + enum pipe pipe, bool enable)
> > +{
> > + struct drm_i915_private *dev_priv = dev->dev_private;
> > + unsigned long flags;
> > + bool ret;
> > +
> > + spin_lock_irqsave(&dev_priv->irq_lock, flags);
> > + ret = intel_set_cpu_fifo_underrun_reporting_nolock(dev, pipe, enable);
> > spin_unlock_irqrestore(&dev_priv->irq_lock, flags);
> > +
> > return ret;
> > }
> >
>
> Funky how diff left the spin_unlock line alone. :)
>
> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>
> --
> Jesse Barnes, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2014-03-06 20:46 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 17:22 [PATCH v2 00/21] drm/i915: vlv power domains support Imre Deak
2014-03-04 17:22 ` [PATCH v2 01/21] drm/i915: use drm_i915_private everywhere in the power domain api Imre Deak
2014-03-06 19:00 ` Jesse Barnes
2014-03-04 17:22 ` [PATCH v2 02/21] drm/i915: fold in __intel_power_well_get/put functions Imre Deak
2014-03-04 17:22 ` [PATCH v2 03/21] drm/i915: move modeset_update_power_wells earlier Imre Deak
2014-03-05 14:20 ` [PATCH v3 " Imre Deak
2014-03-04 17:22 ` [PATCH v2 04/21] drm/i915: move power domain macros to intel_pm.c Imre Deak
2014-03-06 19:00 ` Jesse Barnes
2014-03-04 17:22 ` [PATCH v2 05/21] drm/i915: add init power domain to always-on power wells Imre Deak
2014-03-06 19:01 ` Jesse Barnes
2014-03-04 17:22 ` [PATCH v2 06/21] drm/i915: split power well 'set' handler to separate enable/disable/sync_hw Imre Deak
2014-03-06 20:04 ` Daniel Vetter
2014-03-04 17:22 ` [PATCH v2 07/21] drm/i915: add noop power well handlers instead of NULL checking them Imre Deak
2014-03-06 19:02 ` Jesse Barnes
2014-03-04 17:22 ` [PATCH v2 08/21] drm/i915: add port power domains Imre Deak
2014-03-04 17:22 ` [PATCH v2 09/21] drm/i915: get port power domain in connector detect handlers Imre Deak
2014-03-05 14:20 ` [PATCH v3 " Imre Deak
2014-03-06 19:04 ` Jesse Barnes
2014-03-04 17:22 ` [PATCH v2 10/21] drm/i915: check port power domain when reading the encoder hw state Imre Deak
2014-03-05 14:20 ` [PATCH v3 " Imre Deak
2014-03-06 19:06 ` Jesse Barnes
2014-03-04 17:23 ` [PATCH v2 11/21] drm/i915: check pipe power domain when reading its " Imre Deak
2014-03-05 14:20 ` [PATCH v3 " Imre Deak
2014-03-06 19:06 ` Jesse Barnes
2014-03-04 17:23 ` [PATCH v2 12/21] drm/i915: vlv: keep first level vblank IRQs masked Imre Deak
2014-03-06 19:09 ` Jesse Barnes
2014-03-04 17:23 ` [PATCH v2 13/21] drm/i915: sanitize PUNIT register macro definitions Imre Deak
2014-03-04 17:23 ` [PATCH v2 14/21] drm/i915: factor out reset_vblank_counter Imre Deak
2014-03-06 19:10 ` Jesse Barnes
2014-03-04 17:23 ` [PATCH v2 15/21] drm/i915: switch order of power domain init wrt. irq install Imre Deak
2014-03-04 17:23 ` [PATCH v2 16/21] drm/i915: use power domain api to check vga power state Imre Deak
2014-03-04 17:23 ` [PATCH v2 17/21] drm/i915: sanity check power well sw state against hw state Imre Deak
2014-03-06 19:11 ` Jesse Barnes
2014-03-04 17:23 ` [PATCH v2 18/21] drm/i915: vlv: factor out valleyview_display_irq_install Imre Deak
2014-03-06 19:17 ` Jesse Barnes
2014-03-04 17:23 ` [PATCH v2 19/21] drm/i915: move hsw power domain comment to its right place Imre Deak
2014-03-06 19:17 ` Jesse Barnes
2014-03-04 17:23 ` [PATCH v2 20/21] drm/i915: factor out intel_set_cpu_fifo_underrun_reporting_nolock Imre Deak
2014-03-06 19:18 ` Jesse Barnes
2014-03-06 20:46 ` Daniel Vetter [this message]
2014-03-04 17:23 ` [PATCH v2 21/21] drm/i915: power domains: add vlv power wells Imre Deak
2014-03-05 14:20 ` [PATCH v3 " Imre Deak
2014-03-06 20:29 ` [PATCH v2 " Jesse Barnes
2014-03-06 20:52 ` Daniel Vetter
2014-03-06 21:04 ` Imre Deak
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=20140306204649.GH17001@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox