drm/i915: use intel_uncore in fw get/put internal paths

Get/put functions used outside of uncore.c are updated in the next
patch for a nicer split.

v2: use dev_priv where we still have it (Paulo)

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190319183543.13679-3-daniele.ceraolospurio@intel.com
This commit is contained in:
Daniele Ceraolo Spurio
2019-03-19 11:35:35 -07:00
committed by Chris Wilson
parent 159367bb9e
commit f568eeee53
6 changed files with 121 additions and 108 deletions

View File

@@ -140,6 +140,7 @@ static int live_forcewake_ops(void *arg)
const struct reg *r;
struct drm_i915_private *i915 = arg;
struct intel_uncore_forcewake_domain *domain;
struct intel_uncore *uncore = &i915->uncore;
struct intel_engine_cs *engine;
enum intel_engine_id id;
intel_wakeref_t wakeref;
@@ -166,7 +167,7 @@ static int live_forcewake_ops(void *arg)
wakeref = intel_runtime_pm_get(i915);
for_each_fw_domain(domain, i915, tmp) {
for_each_fw_domain(domain, uncore, tmp) {
smp_store_mb(domain->active, false);
if (!hrtimer_cancel(&domain->timer))
continue;
@@ -188,7 +189,7 @@ static int live_forcewake_ops(void *arg)
if (!fw_domains)
continue;
for_each_fw_domain_masked(domain, fw_domains, i915, tmp) {
for_each_fw_domain_masked(domain, fw_domains, uncore, tmp) {
if (!domain->wake_count)
continue;
@@ -203,7 +204,7 @@ static int live_forcewake_ops(void *arg)
intel_uncore_forcewake_put(i915, fw_domains);
/* Flush the forcewake release (delayed onto a timer) */
for_each_fw_domain_masked(domain, fw_domains, i915, tmp) {
for_each_fw_domain_masked(domain, fw_domains, uncore, tmp) {
smp_store_mb(domain->active, false);
if (hrtimer_cancel(&domain->timer))
intel_uncore_fw_release_timer(&domain->timer);
@@ -280,7 +281,7 @@ static int live_forcewake_domains(void *arg)
i915_reg_t reg = { offset };
iosf_mbi_punit_acquire();
intel_uncore_forcewake_reset(dev_priv);
intel_uncore_forcewake_reset(&dev_priv->uncore);
iosf_mbi_punit_release();
check_for_unclaimed_mmio(dev_priv);