Warn for the wrong mask in enable only. Disable will have the wrong mask now
because the new state is committed before disabling the old state.

Changes since v1:
- Use crtc_mask (Durgadoss)
- Rebase.

Signed-off-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c  | 5 ++---
 drivers/gpu/drm/i915/intel_dpll_mgr.c | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index f8f02ec201b7..17d07a729cc0 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13536,7 +13536,8 @@ static int intel_atomic_commit(struct drm_device *dev,
        }
 
        drm_atomic_helper_swap_state(dev, state);
-       dev_priv->wm.config = to_intel_atomic_state(state)->wm_config;
+       dev_priv->wm.config = intel_state->wm_config;
+       intel_shared_dpll_commit(state);
 
        if (intel_state->modeset) {
                memcpy(dev_priv->min_pixclk, intel_state->min_pixclk,
@@ -13588,8 +13589,6 @@ static int intel_atomic_commit(struct drm_device *dev,
        intel_modeset_update_crtc_state(state);
 
        if (intel_state->modeset) {
-               intel_shared_dpll_commit(state);
-
                drm_atomic_helper_update_legacy_modeset_state(state->dev, 
state);
 
                if (dev_priv->display.modeset_commit_cdclk &&
diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c 
b/drivers/gpu/drm/i915/intel_dpll_mgr.c
index e5f67efec32d..213862e8cd04 100644
--- a/drivers/gpu/drm/i915/intel_dpll_mgr.c
+++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c
@@ -156,7 +156,7 @@ void intel_disable_shared_dpll(struct intel_crtc *crtc)
        if (pll == NULL)
                return;
 
-       if (WARN_ON(!(pll->config.crtc_mask & crtc_mask)))
+       if (WARN_ON(!(pll->active_mask & crtc_mask)))
                return;
 
        DRM_DEBUG_KMS("disable %s (active %x, on? %d) for crtc %d\n",
-- 
2.1.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to