From: Adriano Vero <adri.vero.dev@gmail.com>
To: austin.zheng@amd.com, jun.lei@amd.com, harry.wentland@amd.com,
sunpeng.li@amd.com
Cc: siqueira@igalia.com, alexander.deucher@amd.com,
christian.koenig@amd.com, airlied@gmail.com, simona@ffwll.ch,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Adriano Vero <adri.vero.dev@gmail.com>
Subject: [PATCH] drm/amd/display: clarify average bandwidth comment in dcn4_calcs
Date: Sun, 26 Apr 2026 21:18:25 +0200 [thread overview]
Message-ID: <20260426191825.9727-1-adri.vero.dev@gmail.com> (raw)
Replace a stale FIXME_DCN4 comment in calculate_avg_bandwidth_required()
that questioned whether cursor_bw and tdlut bandwidth should be included
in the average bandwidth calculation.
cursor_bw is already correctly included in all four accumulation
sites below the comment. tdlut bandwidth is intentionally absent
because tdlut data is fetched only during prefetch and blanking
intervals, not during active display, and therefore does not
contribute to active average bandwidth.
Also clarify the phantom pipe handling: phantom pipes are excluded
from sys_active average BW but included in svp_prefetch average BW,
which matches the existing code structure.
Signed-off-by: Adriano Vero <adri.vero.dev@gmail.com>
---
.../dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c
index ca5ac3c0d..34a2a8326 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4_calcs.c
@@ -2845,8 +2845,14 @@ static void calculate_avg_bandwidth_required(
dram_overhead_factor_p0 = dcc_dram_bw_nom_overhead_factor_p0[k] * mall_prefetch_dram_overhead_factor[k];
dram_overhead_factor_p1 = dcc_dram_bw_nom_overhead_factor_p1[k] * mall_prefetch_dram_overhead_factor[k];
- // FIXME_DCN4, was missing cursor_bw in here, but do I actually need that and tdlut bw for average bandwidth calculation?
- // active avg bw not include phantom, but svp_prefetch avg bw should include phantom pipes
+ /*
+ * cursor_bw is included in the average bandwidth calculation below.
+ * tdlut bandwidth is intentionally excluded: tdlut data is fetched
+ * only during prefetch/blanking intervals and does not contribute
+ * to active average bandwidth.
+ * Phantom pipe contributions are excluded from sys_active but
+ * included in svp_prefetch average bandwidth.
+ */
if (!dml_is_phantom_pipe(&display_cfg->plane_descriptors[k])) {
avg_bandwidth_required[dml2_core_internal_soc_state_sys_active][dml2_core_internal_bw_sdp] += sdp_overhead_factor * (ReadBandwidthLuma[k] + ReadBandwidthChroma[k]) + cursor_bw[k];
avg_bandwidth_required[dml2_core_internal_soc_state_sys_active][dml2_core_internal_bw_dram] += dram_overhead_factor_p0 * ReadBandwidthLuma[k] + dram_overhead_factor_p1 * ReadBandwidthChroma[k] + cursor_bw[k];
--
2.53.0
reply other threads:[~2026-04-26 19:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260426191825.9727-1-adri.vero.dev@gmail.com \
--to=adri.vero.dev@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=austin.zheng@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=jun.lei@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox