drm/i915/psr: Remove open-coded PSR AUX transactions for SKL+
authorDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Tue, 13 Mar 2018 03:46:46 +0000 (20:46 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 21 Mar 2018 20:23:36 +0000 (13:23 -0700)
commitd544e918ff132488770ab2cb6b03e2af69497d1c
tree58250bdd1e9f1f9fdacd25a963b982ba4696735e
parentb90eed08d8d0f07f9f08074645d4470e121ff6f5
drm/i915/psr: Remove open-coded PSR AUX transactions for SKL+

HSW and BDW have SRD_AUX_{CTL, STATUS} registers that the driver needs to
setup for the HW to use whenever exiting PSR. SKL+ hardware use hardcoded
values for the same and do not need any registers to be setup. So, use
drm_dp_dpcd_writeb() for a one-time write during PSR enable and setup the
PSR aux registers on HSW and BDW for later use by HW.

We also end up writing to reserved bits in SRD_AUX_CTL by reusing
intel_dp->get_aux_send_ctl() for HSW and BDW, fix this.

Since the AUX register setup is source side programming, move the call
to enable_source() from enable_sink().

Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Jose Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180313034646.3721-2-dhinakaran.pandiyan@intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_psr.c