public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: export assert_device_not_suspended
Date: Mon, 09 Nov 2015 20:43:31 +0200	[thread overview]
Message-ID: <1447094611.24533.83.camel@intel.com> (raw)
In-Reply-To: <20151109183026.GC4437@intel.com>

On ma, 2015-11-09 at 20:30 +0200, Ville Syrjälä wrote:
> On Mon, Nov 09, 2015 at 08:20:08PM +0200, Imre Deak wrote:
> > We should use the same assert in more places, so export it. Move it
> > to
> > intel_runtime_pm.c at the same time, since that's a more logical
> > place
> > for it.
> > 
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_drv.h        | 2 ++
> >  drivers/gpu/drm/i915/intel_runtime_pm.c | 6 ++++++
> >  drivers/gpu/drm/i915/intel_uncore.c     | 7 -------
> >  3 files changed, 8 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_drv.h
> > b/drivers/gpu/drm/i915/intel_drv.h
> > index f9089df..373cc07 100644
> > --- a/drivers/gpu/drm/i915/intel_drv.h
> > +++ b/drivers/gpu/drm/i915/intel_drv.h
> > @@ -1415,6 +1415,8 @@ void intel_display_power_get(struct
> > drm_i915_private *dev_priv,
> >  			     enum intel_display_power_domain
> > domain);
> >  void intel_display_power_put(struct drm_i915_private *dev_priv,
> >  			     enum intel_display_power_domain
> > domain);
> > +
> > +void assert_device_not_suspended(struct drm_i915_private
> > *dev_priv);
> >  void intel_runtime_pm_get(struct drm_i915_private *dev_priv);
> >  void intel_runtime_pm_get_noresume(struct drm_i915_private
> > *dev_priv);
> >  void intel_runtime_pm_put(struct drm_i915_private *dev_priv);
> > diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c
> > b/drivers/gpu/drm/i915/intel_runtime_pm.c
> > index b42506b..0d4a03b 100644
> > --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> > @@ -2120,6 +2120,12 @@ void intel_power_domains_init_hw(struct
> > drm_i915_private *dev_priv, bool resume)
> >  	power_domains->initializing = false;
> >  }
> >  
> > +void assert_device_not_suspended(struct drm_i915_private
> > *dev_priv)
> > +{
> > +	WARN_ONCE(HAS_RUNTIME_PM(dev_priv->dev) && dev_priv
> > ->pm.suspended,
> 
> Is there any point in the HAS_RUNTIME_PM() check?

All other platforms should have pm.suspended = false and a non-zero
refcount all the time, so I guess not. I can remove it in patch 3/4.

> 
> > +		  "Device suspended\n");
> > +}
> > +
> >  /**
> >   * intel_power_domains_suspend - suspend power domain state
> >   * @dev_priv: i915 device instance
> > diff --git a/drivers/gpu/drm/i915/intel_uncore.c
> > b/drivers/gpu/drm/i915/intel_uncore.c
> > index 5bb269c..2b93a68 100644
> > --- a/drivers/gpu/drm/i915/intel_uncore.c
> > +++ b/drivers/gpu/drm/i915/intel_uncore.c
> > @@ -50,13 +50,6 @@ intel_uncore_forcewake_domain_to_str(const enum
> > forcewake_domain_id id)
> >  	return "unknown";
> >  }
> >  
> > -static void
> > -assert_device_not_suspended(struct drm_i915_private *dev_priv)
> > -{
> > -	WARN_ONCE(HAS_RUNTIME_PM(dev_priv->dev) && dev_priv
> > ->pm.suspended,
> > -		  "Device suspended\n");
> > -}
> > -
> >  static inline void
> >  fw_domain_reset(const struct intel_uncore_forcewake_domain *d)
> >  {
> > -- 
> > 2.5.0
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-11-09 18:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 18:20 [PATCH 0/4] drm/i915: improve the RPM device suspended assert Imre Deak
2015-11-09 18:20 ` [PATCH 1/4] drm/i915: export assert_device_not_suspended Imre Deak
2015-11-09 18:30   ` Ville Syrjälä
2015-11-09 18:43     ` Imre Deak [this message]
2015-11-09 20:52   ` Chris Wilson
2015-11-09 18:20 ` [PATCH 2/4] drm/i915: use assert_device_not_suspended instead of opencoding it Imre Deak
2015-11-09 21:04   ` Chris Wilson
2015-11-09 18:20 ` [PATCH 3/4] drm/i915: make assert_device_not_suspended more precise Imre Deak
2015-11-09 19:13   ` [PATCH v2 " Imre Deak
2015-11-09 21:44     ` Chris Wilson
2015-11-10  9:47       ` Imre Deak
2015-11-18 14:37     ` Daniel Vetter
2015-11-18 14:44       ` Imre Deak
2015-11-18 14:58         ` Imre Deak
2015-11-18 15:01           ` Daniel Vetter
2015-11-18 15:11             ` Imre Deak
2015-11-18 15:47               ` Daniel Vetter
2015-11-18 16:09                 ` Imre Deak
2015-11-09 18:20 ` [PATCH 4/4] drm/i915: add assert_device_not_suspended to GGTT PTE updaters Imre Deak
2015-11-09 18:37   ` Ville Syrjälä
2015-11-09 18:48     ` Imre Deak
2015-11-09 19:14   ` [PATCH v2 " Imre Deak
2015-11-09 21:11     ` Chris Wilson
2015-11-09 21:24       ` Imre Deak
2015-11-09 21:29         ` 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=1447094611.24533.83.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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