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

Imre Deak imre.deak at intel.com
Mon Oct 15 10:58:02 UTC 2018


On Fri, Oct 12, 2018 at 02:52:15PM -0700, José Roberto de Souza wrote:
> 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.

DC states are disabled when DMC is not loaded and we won't ever enable
them, as runtime PM as a whole is disabled. So not sure why you get a
mismatch error, but ignoring that by special casing it doesn't seem
correct.

> 
> 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
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list