gfx: display: ospm_power_using_hw_begin() rewrite
authorJani Nikula <jani.nikula@intel.com>
Tue, 7 Feb 2012 13:08:26 +0000 (15:08 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:29:45 +0000 (12:29 +0300)
commit5d4eb37abc31cbef7f2ba17cbf4d773ab424e941
tree71fff0ac0c3edbab500b5021995dff9fbc82167a
parent57be80150d13b144f9f80afaeef96d3f751b0296
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>
drivers/staging/mrst/drv/psb_irq.c
drivers/staging/mrst/drv/psb_powermgmt.c
drivers/staging/mrst/drv/psb_powermgmt.h