gfx: display: ospm_power_using_hw_begin() rewrite
ospm_power_using_hw_begin() had gotten overly complicated with a plethora
of variables and code paths. The code can be simplified considerably by
making the observation that the function is never called with force_on in
atomic context, i.e. if the power island is off, it will not be switched on
in atomic context.
Split the function into ospm_power_using_hw_begin() and
ospm_power_using_hw_begin_atomic(), of which only the latter may be called
in an atomic context. Clean up and simplify the code with the new
assumptions that can be made.
There is still plenty of strangeness left, but this is a big step forward
in making the code possible to understand.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>