diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uncore.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_uncore.c | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 5f2cf6f43b8b..abb18b90d7c3 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -324,8 +324,9 @@ static void __gen6_gt_wait_for_thread_c0(struct intel_uncore *uncore) * w/a for a sporadic read returning 0 by waiting for the GT * thread to wake up. */ - WARN_ONCE(wait_for_atomic_us(gt_thread_status(uncore) == 0, 5000), - "GT thread status wait timed out\n"); + drm_WARN_ONCE(&uncore->i915->drm, + wait_for_atomic_us(gt_thread_status(uncore) == 0, 5000), + "GT thread status wait timed out\n"); } static void fw_domains_get_with_thread_status(struct intel_uncore *uncore, @@ -441,7 +442,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore) cond_resched(); } - WARN_ON(active_domains); + drm_WARN_ON(&uncore->i915->drm, active_domains); fw = uncore->fw_domains_active; if (fw) @@ -757,9 +758,9 @@ void assert_forcewakes_inactive(struct intel_uncore *uncore) if (!uncore->funcs.force_wake_get) return; - WARN(uncore->fw_domains_active, - "Expected all fw_domains to be inactive, but %08x are still on\n", - uncore->fw_domains_active); + drm_WARN(&uncore->i915->drm, uncore->fw_domains_active, + "Expected all fw_domains to be inactive, but %08x are still on\n", + uncore->fw_domains_active); } void assert_forcewakes_active(struct intel_uncore *uncore, @@ -779,9 +780,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore, assert_rpm_wakelock_held(uncore->rpm); fw_domains &= uncore->fw_domains; - WARN(fw_domains & ~uncore->fw_domains_active, - "Expected %08x fw_domains to be active, but %08x are off\n", - fw_domains, fw_domains & ~uncore->fw_domains_active); + drm_WARN(&uncore->i915->drm, fw_domains & ~uncore->fw_domains_active, + "Expected %08x fw_domains to be active, but %08x are off\n", + fw_domains, fw_domains & ~uncore->fw_domains_active); /* * Check that the caller has an explicit wakeref and we don't mistake @@ -794,9 +795,9 @@ void assert_forcewakes_active(struct intel_uncore *uncore, if (uncore->fw_domains_timer & domain->mask) expect++; /* pending automatic release */ - if (WARN(actual < expect, - "Expected domain %d to be held awake by caller, count=%d\n", - domain->id, actual)) + if (drm_WARN(&uncore->i915->drm, actual < expect, + "Expected domain %d to be held awake by caller, count=%d\n", + domain->id, actual)) break; } @@ -866,9 +867,9 @@ find_fw_domain(struct intel_uncore *uncore, u32 offset) if (entry->domains == FORCEWAKE_ALL) return uncore->fw_domains; - WARN(entry->domains & ~uncore->fw_domains, - "Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n", - entry->domains & ~uncore->fw_domains, offset); + drm_WARN(&uncore->i915->drm, entry->domains & ~uncore->fw_domains, + "Uninitialized forcewake domain(s) 0x%x accessed at 0x%x\n", + entry->domains & ~uncore->fw_domains, offset); return entry->domains; } @@ -1158,10 +1159,11 @@ __unclaimed_reg_debug(struct intel_uncore *uncore, const bool read, const bool before) { - if (WARN(check_for_unclaimed_mmio(uncore) && !before, - "Unclaimed %s register 0x%x\n", - read ? "read from" : "write to", - i915_mmio_reg_offset(reg))) + if (drm_WARN(&uncore->i915->drm, + check_for_unclaimed_mmio(uncore) && !before, + "Unclaimed %s register 0x%x\n", + read ? "read from" : "write to", + i915_mmio_reg_offset(reg))) /* Only report the first N failures */ i915_modparams.mmio_debug--; } @@ -1436,8 +1438,8 @@ static int __fw_domain_init(struct intel_uncore *uncore, if (!d) return -ENOMEM; - WARN_ON(!i915_mmio_reg_valid(reg_set)); - WARN_ON(!i915_mmio_reg_valid(reg_ack)); + drm_WARN_ON(&uncore->i915->drm, !i915_mmio_reg_valid(reg_set)); + drm_WARN_ON(&uncore->i915->drm, !i915_mmio_reg_valid(reg_ack)); d->uncore = uncore; d->wake_count = 0; @@ -1482,8 +1484,8 @@ static void fw_domain_fini(struct intel_uncore *uncore, return; uncore->fw_domains &= ~BIT(domain_id); - WARN_ON(d->wake_count); - WARN_ON(hrtimer_cancel(&d->timer)); + drm_WARN_ON(&uncore->i915->drm, d->wake_count); + drm_WARN_ON(&uncore->i915->drm, hrtimer_cancel(&d->timer)); kfree(d); } @@ -1613,7 +1615,7 @@ static int intel_uncore_fw_domains_init(struct intel_uncore *uncore) #undef fw_domain_init /* All future platforms are expected to require complex power gating */ - WARN_ON(!ret && uncore->fw_domains == 0); + drm_WARN_ON(&i915->drm, !ret && uncore->fw_domains == 0); out: if (ret) @@ -2108,7 +2110,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, { enum forcewake_domains fw_domains = 0; - WARN_ON(!op); + drm_WARN_ON(&uncore->i915->drm, !op); if (!intel_uncore_has_forcewake(uncore)) return 0; @@ -2119,7 +2121,7 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore, if (op & FW_REG_WRITE) fw_domains |= uncore->funcs.write_fw_domains(uncore, reg); - WARN_ON(fw_domains & ~uncore->fw_domains); + drm_WARN_ON(&uncore->i915->drm, fw_domains & ~uncore->fw_domains); return fw_domains; } |