Commit ab98ebb9 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Fix HPLL watermark readout for g4x

If HPLL watermarks are already enabled, let's not mark them as
disabled by forgetting to bump 'level' before we call
g4x_raw_plane_wm_set().
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210514125751.17075-6-ville.syrjala@linux.intel.comReviewed-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
parent 9ce5884e
...@@ -6828,7 +6828,8 @@ void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv) ...@@ -6828,7 +6828,8 @@ void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv)
for_each_plane_id_on_crtc(crtc, plane_id) for_each_plane_id_on_crtc(crtc, plane_id)
raw->plane[plane_id] = active->wm.plane[plane_id]; raw->plane[plane_id] = active->wm.plane[plane_id];
if (++level > max_level) level = G4X_WM_LEVEL_SR;
if (level > max_level)
goto out; goto out;
raw = &crtc_state->wm.g4x.raw[level]; raw = &crtc_state->wm.g4x.raw[level];
...@@ -6837,7 +6838,8 @@ void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv) ...@@ -6837,7 +6838,8 @@ void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv)
raw->plane[PLANE_SPRITE0] = 0; raw->plane[PLANE_SPRITE0] = 0;
raw->fbc = active->sr.fbc; raw->fbc = active->sr.fbc;
if (++level > max_level) level = G4X_WM_LEVEL_HPLL;
if (level > max_level)
goto out; goto out;
raw = &crtc_state->wm.g4x.raw[level]; raw = &crtc_state->wm.g4x.raw[level];
...@@ -6846,6 +6848,7 @@ void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv) ...@@ -6846,6 +6848,7 @@ void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv)
raw->plane[PLANE_SPRITE0] = 0; raw->plane[PLANE_SPRITE0] = 0;
raw->fbc = active->hpll.fbc; raw->fbc = active->hpll.fbc;
level++;
out: out:
for_each_plane_id_on_crtc(crtc, plane_id) for_each_plane_id_on_crtc(crtc, plane_id)
g4x_raw_plane_wm_set(crtc_state, level, g4x_raw_plane_wm_set(crtc_state, level,
......
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