[Intel-gfx] [PATCH 1/4] drm/i915: export assert_device_not_suspended
Ville Syrjälä
ville.syrjala at linux.intel.com
Mon Nov 9 10:30:26 PST 2015
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 at 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?
> + "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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list