Commit 1be4d379 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Fix the level 0 max_wm hack on VLV/CHV

The watermark should never exceed the FIFO size, so we need to
check against the current FIFO size instead of the theoretical
maximum when we clamp the level 0 watermark.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1480354637-14209-4-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
parent ddd2b792
...@@ -1132,13 +1132,13 @@ static void vlv_compute_wm(struct intel_crtc *crtc) ...@@ -1132,13 +1132,13 @@ static void vlv_compute_wm(struct intel_crtc *crtc)
/* normal watermarks */ /* normal watermarks */
for (level = 0; level < wm_state->num_levels; level++) { for (level = 0; level < wm_state->num_levels; level++) {
int wm = vlv_compute_wm_level(plane, crtc, state, level); int wm = vlv_compute_wm_level(plane, crtc, state, level);
int max_wm = plane->base.type == DRM_PLANE_TYPE_CURSOR ? 63 : 511; int max_wm = plane->wm.fifo_size;
/* hack */ /* hack */
if (WARN_ON(level == 0 && wm > max_wm)) if (WARN_ON(level == 0 && wm > max_wm))
wm = max_wm; wm = max_wm;
if (wm > plane->wm.fifo_size) if (wm > max_wm)
break; break;
switch (plane->base.type) { switch (plane->base.type) {
......
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