mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
drm/i915/bw: Fix 'deinterleave' rounding direction
For some reason we're rounding up when calculating the deinterleave value. But the spec says we should round down. Fix it. But I suppose this doesn't actually matter since the deinterleave values should always be power of two. The only exception is therefore the deinterleave==1 case, which gets handled by the max(..., 1). Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260522200346.17377-5-ville.syrjala@linux.intel.com Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
This commit is contained in:
parent
615b23a7d2
commit
67309d7fbe
|
|
@ -607,7 +607,7 @@ static int tgl_get_bw_info(struct intel_display *display,
|
|||
qi.deinterleave = qi.deinterleave ? : DIV_ROUND_UP(num_channels, is_y_tile ? 4 : 2);
|
||||
|
||||
if (num_channels < qi.max_numchannels && DISPLAY_VER(display) >= 12)
|
||||
qi.deinterleave = max(DIV_ROUND_UP(qi.deinterleave, 2), 1);
|
||||
qi.deinterleave = max(qi.deinterleave / 2, 1);
|
||||
|
||||
if (DISPLAY_VER(display) >= 12 && num_channels > qi.max_numchannels)
|
||||
drm_warn(display->drm, "Number of channels exceeds max number of channels.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user