On Thu, Jul 06, 2017 at 09:24:48PM +0200, Hans de Goede wrote:
> intel_uncore_suspend() unregisters the uncore code's PMIC bus access
> notifier and gets called on both normal and runtime suspend.
> 
> intel_uncore_resume_early() re-registers the notifier, but only on
> normal resume. Add a new intel_uncore_runtime_resume() function which
> only re-registers the notifier and call that on runtime resume.
> 
> Reported-by: Imre Deak <imre.d...@intel.com>
> Signed-off-by: Hans de Goede <hdego...@redhat.com>

Reviewed-by: Imre Deak <imre.d...@intel.com>

> ---
> Changes in v2:
> -Rebase on current (July 6th 2017) drm-next
> ---
>  drivers/gpu/drm/i915/i915_drv.c     | 2 ++
>  drivers/gpu/drm/i915/intel_uncore.c | 6 ++++++
>  drivers/gpu/drm/i915/intel_uncore.h | 1 +
>  3 files changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index ee2325b180e7..ce31d9ed23dc 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -2510,6 +2510,8 @@ static int intel_runtime_resume(struct device *kdev)
>               ret = vlv_resume_prepare(dev_priv, true);
>       }
>  
> +     intel_uncore_runtime_resume(dev_priv);
> +
>       /*
>        * No point of rolling back things in case of an error, as the best
>        * we can do is to hope that things will still work (and disable RPM).
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c 
> b/drivers/gpu/drm/i915/intel_uncore.c
> index 168b28a87f76..4a547cdfafa9 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -434,6 +434,12 @@ void intel_uncore_resume_early(struct drm_i915_private 
> *dev_priv)
>       i915_check_and_clear_faults(dev_priv);
>  }
>  
> +void intel_uncore_runtime_resume(struct drm_i915_private *dev_priv)
> +{
> +     iosf_mbi_register_pmic_bus_access_notifier(
> +             &dev_priv->uncore.pmic_bus_access_nb);
> +}
> +
>  void intel_uncore_sanitize(struct drm_i915_private *dev_priv)
>  {
>       i915.enable_rc6 = sanitize_rc6_option(dev_priv, i915.enable_rc6);
> diff --git a/drivers/gpu/drm/i915/intel_uncore.h 
> b/drivers/gpu/drm/i915/intel_uncore.h
> index 5f90278da461..0bdc3fcc0e64 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.h
> +++ b/drivers/gpu/drm/i915/intel_uncore.h
> @@ -121,6 +121,7 @@ bool intel_uncore_arm_unclaimed_mmio_detection(struct 
> drm_i915_private *dev_priv
>  void intel_uncore_fini(struct drm_i915_private *dev_priv);
>  void intel_uncore_suspend(struct drm_i915_private *dev_priv);
>  void intel_uncore_resume_early(struct drm_i915_private *dev_priv);
> +void intel_uncore_runtime_resume(struct drm_i915_private *dev_priv);
>  
>  u64 intel_uncore_edram_size(struct drm_i915_private *dev_priv);
>  void assert_forcewakes_inactive(struct drm_i915_private *dev_priv);
> -- 
> 2.13.0
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to