summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2026-05-22 23:03:37 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2026-05-28 06:44:12 +0300
commit85bfe1cec2d1fb67db2bd8603df391466f4ae29f (patch)
treea069898966d90841cb61bc29cf4978335c0d4a78
parent771394b4fb6d7d8be5a90228cea53affd20617f5 (diff)
downloadlinux-85bfe1cec2d1fb67db2bd8603df391466f4ae29f.tar.xz
drm/i915/bw: Fix num_planes handling on TGL+
The TGL+ bw code has an off by one error on the num_planes calculation, and tgl_max_bw_index() incorrectly bumps the num_planes to 1 from 0. That approach made sense on ICL where num_planes is more or less a minimum number of planes to consider for the group, but on TGL+ num_planes really is a maximum number of planes, so these adjustments no longer make any sense there. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260522200346.17377-2-ville.syrjala@linux.intel.com Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
-rw-r--r--drivers/gpu/drm/i915/display/intel_bw.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c
index d5aac5abea6f..c7b59cad176a 100644
--- a/drivers/gpu/drm/i915/display/intel_bw.c
+++ b/drivers/gpu/drm/i915/display/intel_bw.c
@@ -636,8 +636,7 @@ static int tgl_get_bw_info(struct intel_display *display,
bi_next = &display->bw.max[i + 1];
if (clpchgroup < clperchgroup)
- bi_next->num_planes = (ipqdepth - clpchgroup) /
- clpchgroup + 1;
+ bi_next->num_planes = (ipqdepth - clpchgroup) / clpchgroup;
else
bi_next->num_planes = 0;
}
@@ -802,11 +801,6 @@ static unsigned int tgl_max_bw_index(struct intel_display *display,
{
int i;
- /*
- * Let's return max bw for 0 planes
- */
- num_planes = max(1, num_planes);
-
for (i = ARRAY_SIZE(display->bw.max) - 1; i >= 0; i--) {
const struct intel_bw_info *bi =
&display->bw.max[i];