drm/i915: Use intel_dp->DP in eDP PLL setup
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 10 Nov 2015 14:16:17 +0000 (16:16 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 10 Nov 2015 14:50:15 +0000 (16:50 +0200)
commit6fec766283333f1a29066ceddab0d2c18410a71e
tree53b9fa30b976126eecf109d35793cd043b9554b2
parent64e1077a1f93d1f90e096e75232f7284a2b62ca6
drm/i915: Use intel_dp->DP in eDP PLL setup

Use intel_dp->DP in the eDP PLL setup, instead of doing RMWs.

To do this we need to move DP_AUDIO_OUTPUT_ENABLE setup to happen later,
so that we don't enable audio accidentally while configuring the PLL.

Note that actually we already enabled audio before the port due to
the double port register write magic required by VLV/CHV from
7b713f50d78b6 ("drm/i915: Fix eDP link training when switching pipes on VLV/CHV")
So that gets changed now to keep audio off as long as the port is off.

Also intel_dp_link_down() must be made to update intel_dp->DP so that we
don't re-enable the port by accident when turning off the PLL. This is
safe now that we don't call intel_dp_link_down() during link retraining.

v2: Add a note about the audio vs. port enable (Daniel)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1447164977-32315-1-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_dp.c