Commit 7a0a6ee7 authored by Anshuman Gupta's avatar Anshuman Gupta Committed by Ville Syrjälä

drm/i915: Fix broken num_entries in skl_ddb_allocation_overlaps

skl_ddb_allocation_overlaps() num_entries hass been passed as
INTEL_NUM_PIPES, it should be I915_MAX_PIPES.

v2:
- Rebased.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200224124004.26712-8-anshuman.gupta@intel.com
parent b1852b73
...@@ -15328,7 +15328,6 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) ...@@ -15328,7 +15328,6 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
struct intel_crtc *crtc; struct intel_crtc *crtc;
struct intel_crtc_state *old_crtc_state, *new_crtc_state; struct intel_crtc_state *old_crtc_state, *new_crtc_state;
struct skl_ddb_entry entries[I915_MAX_PIPES] = {}; struct skl_ddb_entry entries[I915_MAX_PIPES] = {};
const u8 num_pipes = INTEL_NUM_PIPES(dev_priv);
u8 update_pipes = 0, modeset_pipes = 0; u8 update_pipes = 0, modeset_pipes = 0;
int i; int i;
...@@ -15365,7 +15364,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) ...@@ -15365,7 +15364,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
continue; continue;
if (skl_ddb_allocation_overlaps(&new_crtc_state->wm.skl.ddb, if (skl_ddb_allocation_overlaps(&new_crtc_state->wm.skl.ddb,
entries, num_pipes, pipe)) entries, I915_MAX_PIPES, pipe))
continue; continue;
entries[pipe] = new_crtc_state->wm.skl.ddb; entries[pipe] = new_crtc_state->wm.skl.ddb;
...@@ -15403,7 +15402,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) ...@@ -15403,7 +15402,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
continue; continue;
drm_WARN_ON(&dev_priv->drm, skl_ddb_allocation_overlaps(&new_crtc_state->wm.skl.ddb, drm_WARN_ON(&dev_priv->drm, skl_ddb_allocation_overlaps(&new_crtc_state->wm.skl.ddb,
entries, num_pipes, pipe)); entries, I915_MAX_PIPES, pipe));
entries[pipe] = new_crtc_state->wm.skl.ddb; entries[pipe] = new_crtc_state->wm.skl.ddb;
modeset_pipes &= ~BIT(pipe); modeset_pipes &= ~BIT(pipe);
...@@ -15438,7 +15437,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state) ...@@ -15438,7 +15437,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
continue; continue;
drm_WARN_ON(&dev_priv->drm, skl_ddb_allocation_overlaps(&new_crtc_state->wm.skl.ddb, drm_WARN_ON(&dev_priv->drm, skl_ddb_allocation_overlaps(&new_crtc_state->wm.skl.ddb,
entries, num_pipes, pipe)); entries, I915_MAX_PIPES, pipe));
entries[pipe] = new_crtc_state->wm.skl.ddb; entries[pipe] = new_crtc_state->wm.skl.ddb;
modeset_pipes &= ~BIT(pipe); modeset_pipes &= ~BIT(pipe);
......
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