public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 2/8] drm/i915: kill uncore_sanitize
Date: Fri, 07 Jun 2019 16:32:02 +0300	[thread overview]
Message-ID: <87h891zfl9.fsf@intel.com> (raw)
In-Reply-To: <20190606215218.34486-3-daniele.ceraolospurio@intel.com>

On Thu, 06 Jun 2019, Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> wrote:
> uncore_sanitize performs no action on the uncore structure and just
> calls intel_sanitize_gt_powersave, so we can just call the latter
> directly.
>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_drv.c     | 12 ++++++++++--
>  drivers/gpu/drm/i915/intel_uncore.c |  9 ---------
>  drivers/gpu/drm/i915/intel_uncore.h |  1 -
>  3 files changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 1af6751e1b36..05ee328e3f66 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1622,7 +1622,8 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
>  	pm_qos_add_request(&dev_priv->pm_qos, PM_QOS_CPU_DMA_LATENCY,
>  			   PM_QOS_DEFAULT_VALUE);
>  
> -	intel_uncore_sanitize(dev_priv);
> +	/* BIOS often leaves RC6 enabled, but disable it for hw init */
> +	intel_sanitize_gt_powersave(dev_priv);
>  
>  	intel_gt_init_workarounds(dev_priv);
>  	i915_gem_load_init_fences(dev_priv);
> @@ -1915,6 +1916,9 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
>  out_cleanup_hw:
>  	i915_driver_cleanup_hw(dev_priv);
>  	i915_ggtt_cleanup_hw(dev_priv);
> +
> +	/* Paranoia: make sure we have disabled everything before we exit. */
> +	intel_sanitize_gt_powersave(dev_priv);
>  out_cleanup_mmio:
>  	i915_driver_cleanup_mmio(dev_priv);
>  out_runtime_pm_put:
> @@ -1984,6 +1988,10 @@ static void i915_driver_release(struct drm_device *dev)
>  	i915_gem_fini(dev_priv);
>  
>  	i915_ggtt_cleanup_hw(dev_priv);
> +
> +	/* Paranoia: make sure we have disabled everything before we exit. */
> +	intel_sanitize_gt_powersave(dev_priv);
> +
>  	i915_driver_cleanup_mmio(dev_priv);
>  
>  	enable_rpm_wakeref_asserts(dev_priv);
> @@ -2349,7 +2357,7 @@ static int i915_drm_resume_early(struct drm_device *dev)
>  		hsw_disable_pc8(dev_priv);
>  	}
>  
> -	intel_uncore_sanitize(dev_priv);
> +	intel_sanitize_gt_powersave(dev_priv);
>  
>  	intel_power_domains_resume(dev_priv);
>  
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index c3be79c4957b..ef7eed9237a0 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -537,12 +537,6 @@ void intel_uncore_runtime_resume(struct intel_uncore *uncore)
>  	iosf_mbi_register_pmic_bus_access_notifier(&uncore->pmic_bus_access_nb);
>  }
>  
> -void intel_uncore_sanitize(struct drm_i915_private *dev_priv)
> -{
> -	/* BIOS often leaves RC6 enabled, but disable it for hw init */
> -	intel_sanitize_gt_powersave(dev_priv);
> -}
> -
>  static void __intel_uncore_forcewake_get(struct intel_uncore *uncore,
>  					 enum forcewake_domains fw_domains)
>  {
> @@ -1664,9 +1658,6 @@ void intel_uncore_prune_mmio_domains(struct intel_uncore *uncore)
>  
>  void intel_uncore_fini_mmio(struct intel_uncore *uncore)
>  {
> -	/* Paranoia: make sure we have disabled everything before we exit. */
> -	intel_uncore_sanitize(uncore_to_i915(uncore));
> -
>  	iosf_mbi_punit_acquire();
>  	iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(
>  		&uncore->pmic_bus_access_nb);
> diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h
> index 72ef8b262930..bf06b6b16892 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.h
> +++ b/drivers/gpu/drm/i915/intel_uncore.h
> @@ -182,7 +182,6 @@ intel_uncore_has_fifo(const struct intel_uncore *uncore)
>  	return uncore->flags & UNCORE_HAS_FIFO;
>  }
>  
> -void intel_uncore_sanitize(struct drm_i915_private *dev_priv);
>  void intel_uncore_init_early(struct intel_uncore *uncore);
>  int intel_uncore_init_mmio(struct intel_uncore *uncore);
>  void intel_uncore_prune_mmio_domains(struct intel_uncore *uncore);

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-06-07 13:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 21:52 [RFC 0/8] Display uncore Daniele Ceraolo Spurio
2019-06-06 21:52 ` [RFC 1/8] drm/i915: use vfuncs for reg_read/write_fw_domains Daniele Ceraolo Spurio
2019-06-07  8:54   ` Tvrtko Ursulin
2019-06-06 21:52 ` [RFC 2/8] drm/i915: kill uncore_sanitize Daniele Ceraolo Spurio
2019-06-07 13:32   ` Jani Nikula [this message]
2019-06-06 21:52 ` [RFC 3/8] drm/i915: dynamically allocate forcewake domains Daniele Ceraolo Spurio
2019-06-06 21:52 ` [RFC 4/8] drm/i915: explicitly prune forcewake domain Daniele Ceraolo Spurio
2019-06-06 21:52 ` [RFC 5/8] drm/i915: split out uncore_mmio_debug Daniele Ceraolo Spurio
2019-06-06 21:58   ` Daniele Ceraolo Spurio
2019-06-06 21:52 ` [RFC 6/8] drm/i915: drop forcewake_user_get/put Daniele Ceraolo Spurio
2019-06-06 21:52 ` [RFC 7/8] drm/i915: introduce display_uncore Daniele Ceraolo Spurio
2019-06-07  8:58   ` Tvrtko Ursulin
2019-06-11 20:04     ` Daniele Ceraolo Spurio
2019-06-06 21:52 ` [RFC 8/8] drm/i915: move intel_hdmi to de_uncore Daniele Ceraolo Spurio
2019-06-06 22:37 ` ✗ Fi.CI.CHECKPATCH: warning for Display uncore Patchwork
2019-06-06 22:42 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-06-06 23:15 ` ✗ Fi.CI.BAT: failure " Patchwork

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=87h891zfl9.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-gfx@lists.freedesktop.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