From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/2] drm/i915: Do not print DC off mismatch state when DMC firmware in not loaded
Date: Mon, 15 Oct 2018 18:29:46 -0700 [thread overview]
Message-ID: <20181016012946.20146-2-jose.souza@intel.com> (raw)
In-Reply-To: <20181016012946.20146-1-jose.souza@intel.com>
When DMC firmware is not loaded, it return earlier in
gen9_dc_off_power_well_disable() as it will have no effect without
DMC firmware loaded. But it will cause a mismatch state error when
running intel_power_domains_verify_state(), so skipping this error
in this case.
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
drivers/gpu/drm/i915/intel_runtime_pm.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 3cf8533e0834..99edfcafc106 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -3980,11 +3980,22 @@ static void intel_power_domains_verify_state(struct drm_i915_private *dev_priv)
enabled = power_well->desc->ops->is_enabled(dev_priv,
power_well);
if ((power_well->count || power_well->desc->always_on) !=
- enabled)
+ enabled) {
+ /* If DMC firmware is not loaded it could cause a
+ * mismatch state as we can't disable DC off, so let's
+ * do not print any errors in this scenario.
+ */
+
+ if (!strcmp("DC off", power_well->desc->name) &&
+ !dev_priv->csr.dmc_payload)
+ goto skip_state_mismatch_error;
+
DRM_ERROR("power well %s state mismatch (refcount %d/enabled %d)",
power_well->desc->name,
power_well->count, enabled);
+ }
+skip_state_mismatch_error:
domains_count = 0;
for_each_power_domain(domain, power_well->desc->domains)
domains_count += power_domains->domain_use_count[domain];
--
2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-10-16 1:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-16 1:29 [PATCH 1/2] drm/i915: Fix power domain reference balance when DMC firmware is not present José Roberto de Souza
2018-10-16 1:29 ` José Roberto de Souza [this message]
2018-10-16 2:04 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2018-10-16 3:00 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-16 8:16 ` [PATCH 1/2] " Chris Wilson
2018-10-16 9:22 ` Imre Deak
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=20181016012946.20146-2-jose.souza@intel.com \
--to=jose.souza@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;
as well as URLs for NNTP newsgroup(s).