Split out the fixup functions

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>