Commit 982a3866 authored by Imre Deak's avatar Imre Deak Committed by Daniel Vetter

drm/i915: stop using is_cpu_edp() in intel_disable/post_disable_dp

Based on 3739850b - "drm/i915: disable the cpu edp port after the
cpu pipe" and the bspec disabling sequence for IVB and older it seems we
have to distinguish only the CPU vs. PCH port case, whether it's a DP or
eDP doesn't seem to matter. For IVB and older on the CPU side we can
only have eDP on port A, DP ports can only be on the PCH side. On VLV we
have only CPU side eDP/DP ports, no PCH. So the condition for the
disabling sequence we need for CPU ports is port == A || IS_VLV.

This allows us to remove is_cpu_edp() completely in a later patch.

v2:
- simplify (and fix) the condition for CPU side ports and adjust the
  commit message accordingly (Daniel)
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 6640aab6
...@@ -1372,6 +1372,8 @@ static void intel_dp_get_config(struct intel_encoder *encoder, ...@@ -1372,6 +1372,8 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
static void intel_disable_dp(struct intel_encoder *encoder) static void intel_disable_dp(struct intel_encoder *encoder)
{ {
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
enum port port = dp_to_dig_port(intel_dp)->port;
struct drm_device *dev = encoder->base.dev;
/* Make sure the panel is off before trying to change the mode. But also /* Make sure the panel is off before trying to change the mode. But also
* ensure that we have vdd while we switch off the panel. */ * ensure that we have vdd while we switch off the panel. */
...@@ -1381,16 +1383,17 @@ static void intel_disable_dp(struct intel_encoder *encoder) ...@@ -1381,16 +1383,17 @@ static void intel_disable_dp(struct intel_encoder *encoder)
ironlake_edp_panel_off(intel_dp); ironlake_edp_panel_off(intel_dp);
/* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */ /* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */
if (!is_cpu_edp(intel_dp)) if (!(port == PORT_A || IS_VALLEYVIEW(dev)))
intel_dp_link_down(intel_dp); intel_dp_link_down(intel_dp);
} }
static void intel_post_disable_dp(struct intel_encoder *encoder) static void intel_post_disable_dp(struct intel_encoder *encoder)
{ {
struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
enum port port = dp_to_dig_port(intel_dp)->port;
struct drm_device *dev = encoder->base.dev; struct drm_device *dev = encoder->base.dev;
if (is_cpu_edp(intel_dp)) { if (port == PORT_A || IS_VALLEYVIEW(dev)) {
intel_dp_link_down(intel_dp); intel_dp_link_down(intel_dp);
if (!IS_VALLEYVIEW(dev)) if (!IS_VALLEYVIEW(dev))
ironlake_edp_pll_off(intel_dp); ironlake_edp_pll_off(intel_dp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment