drm/i915/bw: Fix rounding direction in clperchgroup calculation

The '8/num_channels' in the clperchgroup is supposed to be rounded
down according to the spec. Make it so.

Not sure we can ever actually have a non-power of two number of
channels, so this might not matter.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260522200346.17377-6-ville.syrjala@linux.intel.com
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
This commit is contained in:
Ville Syrjälä 2026-05-22 23:03:41 +03:00
parent 67309d7fbe
commit ee0421aad3

View File

@ -624,7 +624,7 @@ static int tgl_get_bw_info(struct intel_display *display,
* clperchgroup = 4kpagespermempage * clperchperblock,
* clperchperblock = 8 / num_channels * interleave
*/
clperchgroup = 4 * DIV_ROUND_UP(8, num_channels) * qi.deinterleave;
clperchgroup = 4 * (8 / num_channels) * qi.deinterleave;
for (i = 0; i < num_groups; i++) {
struct intel_bw_info *bi = &display->bw.max[i];