[Intel-gfx] [PATCH 4/6] drm/i915: skip forcewake actions on forcewake-less uncore

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Wed Jun 19 22:05:56 UTC 2019


<snip>

>>>   }
>>>   void intel_uncore_fini_mmio(struct intel_uncore *uncore)
>>>   {
>>> -    iosf_mbi_punit_acquire();
>>> -    iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(
>>> -        &uncore->pmic_bus_access_nb);
>>> -    intel_uncore_forcewake_reset(uncore);
>>> -    iosf_mbi_punit_release();
>>> +    if (intel_uncore_has_forcewake(uncore)) {
>>
>> To avoid hyphotetical obnoxious diffs in the future, like the one for 
>> intel_uncore_prune_mmio_domains above in this patch, maybe invert this 
>> to early return straight away.
> 

Just realized that I hadn't done that in the first place because there 
is a call to uncore_mmio_cleanup() below that we need to always perform 
and on platforms with forcewake it has to be done after clearing that, 
so can't return early.

Daniele

> will do.
> 
> Daniele
> 
>>
>>> +        iosf_mbi_punit_acquire();
>>> +        iosf_mbi_unregister_pmic_bus_access_notifier_unlocked(
>>> +            &uncore->pmic_bus_access_nb);
>>> +        intel_uncore_forcewake_reset(uncore);
>>> +        iosf_mbi_punit_release();
>>> +    }
>>> +
>>>       uncore_mmio_cleanup(uncore);
>>>   }


More information about the Intel-gfx mailing list