mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 20:33:49 -04:00
drm/i915: store the peak bw per QGV point
In MTL onwards, pcode locks the GV point based on the peak BW of a QGV point. So store the peak BW of all the QGV points. v2: use DIV_ROUND_CLOSEST() for the peakBW calculation Bspec: 64636 Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230606093509.221709-4-vinod.govindapillai@intel.com
This commit is contained in:
committed by
Radhakrishna Sripada
parent
39bea0ff0f
commit
88d0ecbde9
@@ -534,10 +534,14 @@ static int tgl_get_bw_info(struct drm_i915_private *dev_priv, const struct intel
|
||||
|
||||
bi->deratedbw[j] = min(maxdebw,
|
||||
bw * (100 - sa->derating) / 100);
|
||||
bi->peakbw[j] = DIV_ROUND_CLOSEST(sp->dclk *
|
||||
num_channels *
|
||||
qi.channel_width, 8);
|
||||
|
||||
drm_dbg_kms(&dev_priv->drm,
|
||||
"BW%d / QGV %d: num_planes=%d deratedbw=%u\n",
|
||||
i, j, bi->num_planes, bi->deratedbw[j]);
|
||||
"BW%d / QGV %d: num_planes=%d deratedbw=%u peakbw: %u\n",
|
||||
i, j, bi->num_planes, bi->deratedbw[j],
|
||||
bi->peakbw[j]);
|
||||
}
|
||||
|
||||
for (j = 0; j < qi.num_psf_points; j++) {
|
||||
|
||||
@@ -314,6 +314,8 @@ struct intel_display {
|
||||
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_qgv_points;
|
||||
u8 num_psf_gv_points;
|
||||
u8 num_planes;
|
||||
|
||||
Reference in New Issue
Block a user