aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2014-01-07 16:30:45 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-01-08 09:48:57 -0500
commite59150dcf7e126ebf89afacd372602f328d4d6fc (patch)
treeb2aa2be14d09c3eb5f02afa234aec9dce0c90daa /drivers/gpu/drm/i915
parent576b259e65baf15f691010353f6ab06f7190c33f (diff)
drm/i915/bdw: don't try to check IPS state on BDW v2
According to Art, we don't have a way to read back the state reliably at runtime, through the control reg or the mailbox, at least not without risking disabling it again. So drop the readout and checking on BDW. v2: drop TODO comment (Paulo) move POSTING_READ of control reg under HSW branch in disable (Paulo) always report IPS as enabled on BDW (Paulo) References: https://bugs.freedesktop.org/show_bug.cgi?id=71906 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c19
2 files changed, 12 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 6fe7934b2894..16e8e09bbdd6 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1357,7 +1357,7 @@ static int i915_ips_status(struct seq_file *m, void *unused)
1357 return 0; 1357 return 0;
1358 } 1358 }
1359 1359
1360 if (I915_READ(IPS_CTL) & IPS_ENABLE) 1360 if (IS_BROADWELL(dev) || I915_READ(IPS_CTL) & IPS_ENABLE)
1361 seq_puts(m, "enabled\n"); 1361 seq_puts(m, "enabled\n");
1362 else 1362 else
1363 seq_puts(m, "disabled\n"); 1363 seq_puts(m, "disabled\n");
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 08ed792d89bc..767e05c2cb76 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3433,9 +3433,8 @@ void hsw_enable_ips(struct intel_crtc *crtc)
3433 mutex_unlock(&dev_priv->rps.hw_lock); 3433 mutex_unlock(&dev_priv->rps.hw_lock);
3434 /* Quoting Art Runyan: "its not safe to expect any particular 3434 /* Quoting Art Runyan: "its not safe to expect any particular
3435 * value in IPS_CTL bit 31 after enabling IPS through the 3435 * value in IPS_CTL bit 31 after enabling IPS through the
3436 * mailbox." Therefore we need to defer waiting on the state 3436 * mailbox." Moreover, the mailbox may return a bogus state,
3437 * change. 3437 * so we need to just enable it and continue on.
3438 * TODO: need to fix this for state checker
3439 */ 3438 */
3440 } else { 3439 } else {
3441 I915_WRITE(IPS_CTL, IPS_ENABLE); 3440 I915_WRITE(IPS_CTL, IPS_ENABLE);
@@ -3462,9 +3461,10 @@ void hsw_disable_ips(struct intel_crtc *crtc)
3462 mutex_lock(&dev_priv->rps.hw_lock); 3461 mutex_lock(&dev_priv->rps.hw_lock);
3463 WARN_ON(sandybridge_pcode_write(dev_priv, DISPLAY_IPS_CONTROL, 0)); 3462 WARN_ON(sandybridge_pcode_write(dev_priv, DISPLAY_IPS_CONTROL, 0));
3464 mutex_unlock(&dev_priv->rps.hw_lock); 3463 mutex_unlock(&dev_priv->rps.hw_lock);
3465 } else 3464 } else {
3466 I915_WRITE(IPS_CTL, 0); 3465 I915_WRITE(IPS_CTL, 0);
3467 POSTING_READ(IPS_CTL); 3466 POSTING_READ(IPS_CTL);
3467 }
3468 3468
3469 /* We need to wait for a vblank before we can disable the plane. */ 3469 /* We need to wait for a vblank before we can disable the plane. */
3470 intel_wait_for_vblank(dev, crtc->pipe); 3470 intel_wait_for_vblank(dev, crtc->pipe);
@@ -7006,8 +7006,9 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,
7006 if (intel_display_power_enabled(dev, pfit_domain)) 7006 if (intel_display_power_enabled(dev, pfit_domain))
7007 ironlake_get_pfit_config(crtc, pipe_config); 7007 ironlake_get_pfit_config(crtc, pipe_config);
7008 7008
7009 pipe_config->ips_enabled = hsw_crtc_supports_ips(crtc) && 7009 if (IS_HASWELL(dev))
7010 (I915_READ(IPS_CTL) & IPS_ENABLE); 7010 pipe_config->ips_enabled = hsw_crtc_supports_ips(crtc) &&
7011 (I915_READ(IPS_CTL) & IPS_ENABLE);
7011 7012
7012 pipe_config->pixel_multiplier = 1; 7013 pipe_config->pixel_multiplier = 1;
7013 7014
@@ -9336,7 +9337,9 @@ intel_pipe_config_compare(struct drm_device *dev,
9336 PIPE_CONF_CHECK_I(pch_pfit.size); 9337 PIPE_CONF_CHECK_I(pch_pfit.size);
9337 } 9338 }
9338 9339
9339 PIPE_CONF_CHECK_I(ips_enabled); 9340 /* BDW+ don't expose a synchronous way to read the state */
9341 if (IS_HASWELL(dev))
9342 PIPE_CONF_CHECK_I(ips_enabled);
9340 9343
9341 PIPE_CONF_CHECK_I(double_wide); 9344 PIPE_CONF_CHECK_I(double_wide);
9342 9345