Commit 6499f925 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Index min_{cdclk,voltage_level}[] with pipe

min_cdclk[] and min_voltage_level[] are supposed to be indexed
with the pipe. Fix up a few cases where we index via the crtc
index (via the atomic iterators) instead.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210204020846.2094-1-ville.syrjala@linux.intel.comReviewed-by: default avatarMika Kahola <mika.kahola@intel.com>
parent dcb38f79
...@@ -2145,10 +2145,10 @@ static int intel_compute_min_cdclk(struct intel_cdclk_state *cdclk_state) ...@@ -2145,10 +2145,10 @@ static int intel_compute_min_cdclk(struct intel_cdclk_state *cdclk_state)
if (IS_ERR(bw_state)) if (IS_ERR(bw_state))
return PTR_ERR(bw_state); return PTR_ERR(bw_state);
if (cdclk_state->min_cdclk[i] == min_cdclk) if (cdclk_state->min_cdclk[crtc->pipe] == min_cdclk)
continue; continue;
cdclk_state->min_cdclk[i] = min_cdclk; cdclk_state->min_cdclk[crtc->pipe] = min_cdclk;
ret = intel_atomic_lock_global_state(&cdclk_state->base); ret = intel_atomic_lock_global_state(&cdclk_state->base);
if (ret) if (ret)
...@@ -2199,10 +2199,10 @@ static int bxt_compute_min_voltage_level(struct intel_cdclk_state *cdclk_state) ...@@ -2199,10 +2199,10 @@ static int bxt_compute_min_voltage_level(struct intel_cdclk_state *cdclk_state)
else else
min_voltage_level = 0; min_voltage_level = 0;
if (cdclk_state->min_voltage_level[i] == min_voltage_level) if (cdclk_state->min_voltage_level[crtc->pipe] == min_voltage_level)
continue; continue;
cdclk_state->min_voltage_level[i] = min_voltage_level; cdclk_state->min_voltage_level[crtc->pipe] = min_voltage_level;
ret = intel_atomic_lock_global_state(&cdclk_state->base); ret = intel_atomic_lock_global_state(&cdclk_state->base);
if (ret) if (ret)
......
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