gfx: drv: clean up the save/restore of the fp/mipi/dpll regs
authorImre Deak <imre.deak@intel.com>
Tue, 6 Mar 2012 19:17:30 +0000 (21:17 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:29 +0000 (12:30 +0300)
commitf81c56c72dfa18dd3f266f9475bc43339a4db5a0
tree563016a5559f8df47039bccf822ed943ebd4316f
parent0a3dfa81d3ce7f79943f54167f9c4f915b2c407b
gfx: drv: clean up the save/restore of the fp/mipi/dpll regs

We have an fp and dpll reg for pipe A and B. Pipe C shares pipe A's fp
and dpll setting, since the two pipes use the same clock setting. Store
these regs into the pipe_regs array instead of having separate names for
them. Pipe C's storage space will be wasted.

Pipe A and C has a MIPI control reg, store these into the pipe_regs
array. Pipe B's storage space will be wasted.

There is 12 bytes wasted, we pay this for a cleaner abstraction.

The original code saved the same dpll,fp regs twice (for pipe A and C)
now avoid saving/restoring them for pipe C. This may also avoid glitches
on the screen as we momentarily disabled pipe A's clock while it was
already setup and active.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/drv/psb_drv.h
drivers/staging/mrst/drv/psb_powermgmt.c