drm/i915/bw: Move psf_bw[] out from the plane group

The PSF bandwidth doesn't depend on the number of planes, so there
is no need to repeat the same information for each plane group.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260528103458.18069-8-ville.syrjala@linux.intel.com
Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
This commit is contained in:
Ville Syrjälä 2026-05-28 13:34:54 +03:00
parent d8ffe49c04
commit 9037f07dfc
2 changed files with 8 additions and 13 deletions

View File

@ -673,16 +673,14 @@ static int tgl_get_bw_info(struct intel_display *display,
i, j, bi->num_planes, bi->deratedbw[j],
bi->peakbw[j]);
}
}
for (j = 0; j < qi.num_psf_points; j++) {
const struct intel_psf_gv_point *sp = &qi.psf_points[j];
for (i = 0; i < qi.num_psf_points; i++) {
const struct intel_psf_gv_point *sp = &qi.psf_points[i];
bi->psf_bw[j] = adl_calc_psf_bw(sp->clk);
display->bw.psf_bw[i] = adl_calc_psf_bw(sp->clk);
drm_dbg_kms(display->drm,
"BW%d / PSF GV %d: num_planes=%d bw=%u\n",
i, j, bi->num_planes, bi->psf_bw[j]);
}
drm_dbg_kms(display->drm, "PSF GV %d: bw=%u\n", i, display->bw.psf_bw[i]);
}
/*
@ -810,10 +808,7 @@ static unsigned int tgl_max_bw_index(struct intel_display *display,
static unsigned int adl_psf_bw(struct intel_display *display,
int psf_gv_point)
{
const struct intel_bw_info *bi =
&display->bw.max[0];
return bi->psf_bw[psf_gv_point];
return display->bw.psf_bw[psf_gv_point];
}
static unsigned int icl_qgv_bw(struct intel_display *display,

View File

@ -325,12 +325,12 @@ struct intel_display {
struct intel_bw_info {
/* for each QGV point */
unsigned int deratedbw[I915_NUM_QGV_POINTS];
/* for each PSF GV point */
unsigned int psf_bw[I915_NUM_PSF_GV_POINTS];
/* Peak BW for each QGV point */
unsigned int peakbw[I915_NUM_QGV_POINTS];
u8 num_planes;
} max[6];
/* for each PSF GV point */
unsigned int psf_bw[I915_NUM_PSF_GV_POINTS];
u8 num_qgv_points;
u8 num_psf_gv_points;
} bw;