diff options
author | Paulo Zanoni | 2018-10-05 01:15:57 +0200 |
---|---|---|
committer | Paulo Zanoni | 2018-10-11 23:23:03 +0200 |
commit | 077b5820af74507a1d748f215d6e0753616dfb3d (patch) | |
tree | 3f15717c688afe2814b003ba08b744ffa49a14bf /drivers/gpu/drm/i915/intel_pm.c | |
parent | drm/i915: fix the transition minimums for gen9+ watermarks (diff) | |
download | kernel-qcow2-linux-077b5820af74507a1d748f215d6e0753616dfb3d.tar.gz kernel-qcow2-linux-077b5820af74507a1d748f215d6e0753616dfb3d.tar.xz kernel-qcow2-linux-077b5820af74507a1d748f215d6e0753616dfb3d.zip |
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: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181004231600.14101-4-paulo.r.zanoni@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 983af46197b1..43fb1f8fced8 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4672,15 +4672,24 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv, } else { if ((wp->cpp * cstate->base.adjusted_mode.crtc_htotal / 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; - else if (ddb_allocation >= - fixed16_to_u32_round_up(wp->plane_blocks_per_line)) - selected_result = min_fixed16(method1, method2); - else if (latency >= wp->linetime_us) - selected_result = min_fixed16(method1, method2); - else + } else if (ddb_allocation >= + 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); + 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); + else + selected_result = method2; + } else { selected_result = method1; + } } res_blocks = fixed16_to_u32_round_up(selected_result) + 1; |