mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
drm/i915: Round up when calculating display bandwidth requirements
We should round up when doing bandwidth calculations to make sure our estimates don't fall short of the actual number. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220303191207.27931-7-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
This commit is contained in:
parent
7243867c6f
commit
6c69d0bb9f
|
|
@ -638,7 +638,7 @@ static unsigned int intel_bw_data_rate(struct drm_i915_private *dev_priv,
|
|||
data_rate += bw_state->data_rate[pipe];
|
||||
|
||||
if (DISPLAY_VER(dev_priv) >= 13 && intel_vtd_active(dev_priv))
|
||||
data_rate = data_rate * 105 / 100;
|
||||
data_rate = DIV_ROUND_UP(data_rate * 105, 100);
|
||||
|
||||
return data_rate;
|
||||
}
|
||||
|
|
@ -763,7 +763,7 @@ int intel_bw_calc_min_cdclk(struct intel_atomic_state *state)
|
|||
}
|
||||
}
|
||||
|
||||
new_bw_state->min_cdclk = max_bw / 64;
|
||||
new_bw_state->min_cdclk = DIV_ROUND_UP(max_bw, 64);
|
||||
|
||||
if (new_bw_state->min_cdclk != old_bw_state->min_cdclk) {
|
||||
int ret = intel_atomic_lock_global_state(&new_bw_state->base);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user