Commit 077b5820 authored by Paulo Zanoni's avatar Paulo Zanoni

drm/i915: fix the watermark result selection on glk/gen10+

On these platforms we're supposed to unconditonally pick the method 2
result instead of the minimum.
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181004231600.14101-4-paulo.r.zanoni@intel.com
parent 91961a85
...@@ -4672,16 +4672,25 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, ...@@ -4672,16 +4672,25 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
} else { } else {
if ((wp->cpp * cstate->base.adjusted_mode.crtc_htotal / if ((wp->cpp * cstate->base.adjusted_mode.crtc_htotal /
wp->dbuf_block_size < 1) && wp->dbuf_block_size < 1) &&
(wp->plane_bytes_per_line / wp->dbuf_block_size < 1)) (wp->plane_bytes_per_line / wp->dbuf_block_size < 1)) {
selected_result = method2; selected_result = method2;
else if (ddb_allocation >= } else if (ddb_allocation >=
fixed16_to_u32_round_up(wp->plane_blocks_per_line)) fixed16_to_u32_round_up(wp->plane_blocks_per_line)) {
if (INTEL_GEN(dev_priv) == 9 &&
!IS_GEMINILAKE(dev_priv))
selected_result = min_fixed16(method1, method2); selected_result = min_fixed16(method1, method2);
else if (latency >= wp->linetime_us) else
selected_result = method2;
} else if (latency >= wp->linetime_us) {
if (INTEL_GEN(dev_priv) == 9 &&
!IS_GEMINILAKE(dev_priv))
selected_result = min_fixed16(method1, method2); selected_result = min_fixed16(method1, method2);
else else
selected_result = method2;
} else {
selected_result = method1; selected_result = method1;
} }
}
res_blocks = fixed16_to_u32_round_up(selected_result) + 1; res_blocks = fixed16_to_u32_round_up(selected_result) + 1;
res_lines = div_round_up_fixed16(selected_result, res_lines = div_round_up_fixed16(selected_result,
......
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