drm/i915: kill uncore_sanitize
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> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190620010021.20637-3-daniele.ceraolospurio@intel.com
This commit is contained in:
parent
ccb2aceaaa
commit
19e0a8d454
|
@ -1629,7 +1629,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_add_request(&dev_priv->pm_qos, PM_QOS_CPU_DMA_LATENCY,
|
||||||
PM_QOS_DEFAULT_VALUE);
|
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);
|
intel_gt_init_workarounds(dev_priv);
|
||||||
|
|
||||||
|
@ -1921,6 +1922,9 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
out_cleanup_hw:
|
out_cleanup_hw:
|
||||||
i915_driver_cleanup_hw(dev_priv);
|
i915_driver_cleanup_hw(dev_priv);
|
||||||
i915_ggtt_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:
|
out_cleanup_mmio:
|
||||||
i915_driver_cleanup_mmio(dev_priv);
|
i915_driver_cleanup_mmio(dev_priv);
|
||||||
out_runtime_pm_put:
|
out_runtime_pm_put:
|
||||||
|
@ -1991,6 +1995,10 @@ static void i915_driver_release(struct drm_device *dev)
|
||||||
i915_gem_fini(dev_priv);
|
i915_gem_fini(dev_priv);
|
||||||
|
|
||||||
i915_ggtt_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);
|
||||||
|
|
||||||
i915_driver_cleanup_mmio(dev_priv);
|
i915_driver_cleanup_mmio(dev_priv);
|
||||||
|
|
||||||
enable_rpm_wakeref_asserts(rpm);
|
enable_rpm_wakeref_asserts(rpm);
|
||||||
|
@ -2357,7 +2365,7 @@ static int i915_drm_resume_early(struct drm_device *dev)
|
||||||
hsw_disable_pc8(dev_priv);
|
hsw_disable_pc8(dev_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
intel_uncore_sanitize(dev_priv);
|
intel_sanitize_gt_powersave(dev_priv);
|
||||||
|
|
||||||
intel_power_domains_resume(dev_priv);
|
intel_power_domains_resume(dev_priv);
|
||||||
|
|
||||||
|
|
|
@ -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);
|
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,
|
static void __intel_uncore_forcewake_get(struct intel_uncore *uncore,
|
||||||
enum forcewake_domains fw_domains)
|
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)
|
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_punit_acquire();
|
||||||
iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(
|
iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(
|
||||||
&uncore->pmic_bus_access_nb);
|
&uncore->pmic_bus_access_nb);
|
||||||
|
|
|
@ -182,7 +182,6 @@ intel_uncore_has_fifo(const struct intel_uncore *uncore)
|
||||||
return uncore->flags & UNCORE_HAS_FIFO;
|
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);
|
void intel_uncore_init_early(struct intel_uncore *uncore);
|
||||||
int intel_uncore_init_mmio(struct intel_uncore *uncore);
|
int intel_uncore_init_mmio(struct intel_uncore *uncore);
|
||||||
void intel_uncore_prune_mmio_domains(struct intel_uncore *uncore);
|
void intel_uncore_prune_mmio_domains(struct intel_uncore *uncore);
|
||||||
|
|
Loading…
Reference in New Issue