CHROMIUM: drm/bridge: analogix: Reorder plat_data->power_off to happen sooner

The current user of the analogix power_off is "analogix_dp-rockchip".
That driver does this:
- deactivate PSR
- turn off a clock

Both of these things (especially deactive PSR) should be done before
we turn the PHY power off and turn off analog power.  Let's move the
callback up.

Note that without this patch (and with http://crosreview.com/436410),
I experienced an error in reboot testing where one thread was at:

  rockchip_drm_psr_deactivate
  rockchip_dp_powerdown
  analogix_dp_bridge_disable
  drm_bridge_disable

...and the other thread was at:

  analogix_dp_send_psr_spd
  analogix_dp_enable_psr
  analogix_dp_psr_set
  psr_flush_handler

The flush handler thread was finding AUX channel errors (seen with
http://crosreview.com/433453) and eventually reported "Failed to apply
PSR", where I had a kgdb breakpoint.  Presumably the device would have
eventually given up and shut down anyway, but it seems better to fix
the order to be more correct.

NOTE: for now marking this as a CHROMIUM patch because:
- We have a local commit 9b91d645f35d ("CHROMIUM: drm:
  bridge/analogix: ensure edp is disabled when shutting down the
  panel") that could be affecting this, so it's unclear if upstream
  would face the exact same problem.
- Upstream doesn't have PSR and only has a simple clock disable in the
  Rockchip code, so the bug doesn't actually exist upstream.
...when upstream gets PSR code, this should all get resolved.

BUG=chrome-os-partner:59631
TEST=Reboot tests w/ panel timing patch no longer show errors

Change-Id: I4ec75fcf6730da64e9595c1026e4feb3f3ad4a2a
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/437524
Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org>
(cherry picked from commit 4f059455c33e63d3ddb32318145622951f791ceb)
Reviewed-on: https://chromium-review.googlesource.com/441314
1 file changed