diff options
| -rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c59335ce84f4..76b01c16a0e8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -8314,6 +8314,8 @@ check_shared_dpll_state(struct drm_device *dev) | |||
| 8314 | pll->active, pll->refcount); | 8314 | pll->active, pll->refcount); |
| 8315 | WARN(pll->active && !pll->on, | 8315 | WARN(pll->active && !pll->on, |
| 8316 | "pll in active use but not on in sw tracking\n"); | 8316 | "pll in active use but not on in sw tracking\n"); |
| 8317 | WARN(pll->on && !pll->active, | ||
| 8318 | "pll in on but not on in use in sw tracking\n"); | ||
| 8317 | WARN(pll->on != active, | 8319 | WARN(pll->on != active, |
| 8318 | "pll on state mismatch (expected %i, found %i)\n", | 8320 | "pll on state mismatch (expected %i, found %i)\n", |
| 8319 | pll->on, active); | 8321 | pll->on, active); |
| @@ -9814,8 +9816,8 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) | |||
| 9814 | } | 9816 | } |
| 9815 | pll->refcount = pll->active; | 9817 | pll->refcount = pll->active; |
| 9816 | 9818 | ||
| 9817 | DRM_DEBUG_KMS("%s hw state readout: refcount %i\n", | 9819 | DRM_DEBUG_KMS("%s hw state readout: refcount %i, on %i\n", |
| 9818 | pll->name, pll->refcount); | 9820 | pll->name, pll->refcount, pll->on); |
| 9819 | } | 9821 | } |
| 9820 | 9822 | ||
| 9821 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, | 9823 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, |
| @@ -9866,6 +9868,7 @@ void intel_modeset_setup_hw_state(struct drm_device *dev, | |||
| 9866 | struct drm_plane *plane; | 9868 | struct drm_plane *plane; |
| 9867 | struct intel_crtc *crtc; | 9869 | struct intel_crtc *crtc; |
| 9868 | struct intel_encoder *encoder; | 9870 | struct intel_encoder *encoder; |
| 9871 | int i; | ||
| 9869 | 9872 | ||
| 9870 | intel_modeset_readout_hw_state(dev); | 9873 | intel_modeset_readout_hw_state(dev); |
| 9871 | 9874 | ||
| @@ -9881,6 +9884,18 @@ void intel_modeset_setup_hw_state(struct drm_device *dev, | |||
| 9881 | intel_dump_pipe_config(crtc, &crtc->config, "[setup_hw_state]"); | 9884 | intel_dump_pipe_config(crtc, &crtc->config, "[setup_hw_state]"); |
| 9882 | } | 9885 | } |
| 9883 | 9886 | ||
| 9887 | for (i = 0; i < dev_priv->num_shared_dpll; i++) { | ||
| 9888 | struct intel_shared_dpll *pll = &dev_priv->shared_dplls[i]; | ||
| 9889 | |||
| 9890 | if (!pll->on || pll->active) | ||
| 9891 | continue; | ||
| 9892 | |||
| 9893 | DRM_DEBUG_KMS("%s enabled but not in use, disabling\n", pll->name); | ||
| 9894 | |||
| 9895 | pll->disable(dev_priv, pll); | ||
| 9896 | pll->on = false; | ||
| 9897 | } | ||
| 9898 | |||
| 9884 | if (force_restore) { | 9899 | if (force_restore) { |
| 9885 | /* | 9900 | /* |
| 9886 | * We need to use raw interfaces for restoring state to avoid | 9901 | * We need to use raw interfaces for restoring state to avoid |
