[Intel-gfx] [PATCH 13/16] drm/i915: Do not print DC off mismatch state when DMC firmware in not loaded

José Roberto de Souza jose.souza at intel.com
Fri Oct 12 21:52:15 UTC 2018


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.

Signed-off-by: José Roberto de Souza <jose.souza at 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 8b1c4d0db0af..629091ad8337 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -4014,11 +4014,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



More information about the Intel-gfx mailing list