aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2013-05-23 12:39:40 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-05-31 14:53:59 -0400
commit982a38667dd9f175f8dd8a78651426ae6baac463 (patch)
treeacaceda4c8722c3d40684d03857e0faca40ce956 /drivers/gpu
parent6640aab6f2aed89470bc44c7450b7573659e651e (diff)
drm/i915: stop using is_cpu_edp() in intel_disable/post_disable_dp
Based on 3739850b46f - "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: Imre Deak <imre.deak@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index cdb1c2a6d2b2..ee157091f92e 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1372,6 +1372,8 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
1372static void intel_disable_dp(struct intel_encoder *encoder) 1372static void intel_disable_dp(struct intel_encoder *encoder)
1373{ 1373{
1374 struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); 1374 struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
1375 enum port port = dp_to_dig_port(intel_dp)->port;
1376 struct drm_device *dev = encoder->base.dev;
1375 1377
1376 /* Make sure the panel is off before trying to change the mode. But also 1378 /* Make sure the panel is off before trying to change the mode. But also
1377 * ensure that we have vdd while we switch off the panel. */ 1379 * 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 ironlake_edp_panel_off(intel_dp); 1383 ironlake_edp_panel_off(intel_dp);
1382 1384
1383 /* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */ 1385 /* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */
1384 if (!is_cpu_edp(intel_dp)) 1386 if (!(port == PORT_A || IS_VALLEYVIEW(dev)))
1385 intel_dp_link_down(intel_dp); 1387 intel_dp_link_down(intel_dp);
1386} 1388}
1387 1389
1388static void intel_post_disable_dp(struct intel_encoder *encoder) 1390static void intel_post_disable_dp(struct intel_encoder *encoder)
1389{ 1391{
1390 struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base); 1392 struct intel_dp *intel_dp = enc_to_intel_dp(&encoder->base);
1393 enum port port = dp_to_dig_port(intel_dp)->port;
1391 struct drm_device *dev = encoder->base.dev; 1394 struct drm_device *dev = encoder->base.dev;
1392 1395
1393 if (is_cpu_edp(intel_dp)) { 1396 if (port == PORT_A || IS_VALLEYVIEW(dev)) {
1394 intel_dp_link_down(intel_dp); 1397 intel_dp_link_down(intel_dp);
1395 if (!IS_VALLEYVIEW(dev)) 1398 if (!IS_VALLEYVIEW(dev))
1396 ironlake_edp_pll_off(intel_dp); 1399 ironlake_edp_pll_off(intel_dp);