From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 08E8038AC8C for ; Sun, 26 Apr 2026 19:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777231155; cv=none; b=h1tV4foiV7TNIMT5m2dGiQ7OFcaSPNm5lDd2kBedCv45EhGLUTyW+ejA8GzPuiDwyPjwg0Hzp356a9eLubFeN+AkdxBJxnU/+sXyaHOnaxaCH0oDrZ4uWb2tMlRFKPNh9+0sompROP/aE37P/0yI07zKWHCDzS4H1ET+qM6Gqq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777231155; c=relaxed/simple; bh=4iBRHaOi6eQXo0qAYzu+rulcFvY+O5sqz9pCSwA5BGU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=I84Nwj2OgzBGy3C7wx8x96mM5MHZkgninYmDBEk5sQjAfXv5tm03DYPKozFtjdA3Dz/QM3aOcB57Bnjc3UxAB3+kMr8PSnfFPfXz3saCKxsgxYUwBwFFzdBqAWyxdgzhi/twag2wCSmHmbipeWzkd1OVy9Uch1qAlhHiyVTHfB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=sUpNlYzG; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sUpNlYzG" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-44136f7a169so1210347f8f.3 for ; Sun, 26 Apr 2026 12:19:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777231152; x=1777835952; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Zhjzk6+k9bpCPC8O+MN7tV3ddOFfrvXcuTes7z8vTpM=; b=sUpNlYzGojM2TjJCUDIqa82yLxdnL4t61F/nj3ZIHjfVSrLjHM8aPwyfd8aX/EV/5x orNE09MTd36RtObguKniFYdCqsozV2IvIPLVU6VLt+cF7mnta7a+RYnA3II1d+FSK4B9 7AnO8+V7DxGTlI6yD+Qtp0JkhExkYxvmqxmDoePyhY+kCaDhPcvfMFnQAScliQx5EyDs e4z8x63FdChLHVlnu2a2Ho8GvnWaLJ2Z6T77zA0n3+Biysa7OUz5+scYRShJ+Ns1A9td 8cS/uLRnjzMaSx2X2gi7z67TM3C72bK4R0T9gO6HbKusDLZK+jqOT7p7CQpIWWtkxu+9 JKgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777231152; x=1777835952; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Zhjzk6+k9bpCPC8O+MN7tV3ddOFfrvXcuTes7z8vTpM=; b=Y1EDzCqlGpSNT2wcOWzZzqsQ7n5eQ1tGyc8rcQL7vAl041O8EoPH6ls0lw8/Xnr+l7 Ar9xSOXURQz6C31wT49FOjFKzQOvSglX2ri2Xsps4Br1RvNqaA2O9jeb8cKT37hhh6P5 unSMB1l9Puf5Ua+M7BrXnEIl0E0seNQfi+A+hjCgWuRMJeuOui+hcAEoJ2L6sK8FjLk7 nP/U49yLsW+OFJ0NlMjGR0igkkJQXU5Nzr3ivtlABWh3l7b4V2uyvKiI69y2QWojfOnv x6LNMOMBIqtdFhv4/PcTDtfyjldL5XdYZ2o2XcG7DeOsbBIGar+GBGSBJMCbhe+tmNKE rYCg== X-Forwarded-Encrypted: i=1; AFNElJ9K86oF8tSFMgovBW3Q7nkjJngIzDLbJMyJgqeFBQ2G/ZgstT6NHKzySgWeKbwKkGRmQMobNw44b5v/kJk=@vger.kernel.org X-Gm-Message-State: AOJu0YzMYo+y3sEMcAIyR358t1LdVlkEZdcMe2Q0sqV87P6x3SZHGscS nA8sp4tFtvqBiP/mCQ/bISjrFHLFWUZjPPktOwp/WAZXfJ2ovwXpyQVk X-Gm-Gg: AeBDiet4FNcr/9zYg40HafHRu+fMWnjwmMSoKjoc0dpl7WjJPQ4BWMV8gjSqJ2J6RA1 T1pVMNtDn14QKLwuIuYS5fiEKrUcPD8ASIy/0DtZN662Qxo9pkCTvOCDHD5aicFjdhVCEsBZ+DC 1XhAS7d+qMTGBtYdi6euTeHBLY2EOaiUFSfmBItKaAg6qoHJktJXnIoMOG1gAiI/sKp1/ayIEj7 C6RZgISzjo5JeZmrSWmiDduE70cteeMeQ89Xn5py3ciX4M2LQrHErVcUFj6YvrGZxeabX2abO6Z AEnGamc52gL10IbeYb/YRlzVcDHDHQ2kM1YwEUB6KL4xfg+Xn071CjSd72X7khnSrfRKFReaOeZ kZNNhn/zxHk+tUeT2xbNetNxLfpLCQuENUj4zye4mheCErs844HFqEB3N/Yk3D6ZmQlgU5aLn6x zxTFBfjPyo9MQ6P10zTV2BHSTW7rkaJZN0ZWRcqD6kvK2EF3rJTpoK/cNxeYfYGI8WmuQF+Bne/ fuk1UDhBG6CDnCWdLR1As5Vc/apATTCgPk8+5cTyvcg9cMTc2Y= X-Received: by 2002:a5d:5f84:0:b0:43d:7783:c684 with SMTP id ffacd0b85a97d-43fe3e1e092mr63569379f8f.43.1777231152150; Sun, 26 Apr 2026 12:19:12 -0700 (PDT) Received: from fedora.homenet.telecomitalia.it (host-82-60-237-185.retail.telecomitalia.it. [82.60.237.185]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4412150a092sm39057567f8f.23.2026.04.26.12.19.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Apr 2026 12:19:11 -0700 (PDT) From: Adriano Vero 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 Subject: [PATCH] drm/amd/display: clarify average bandwidth comment in dcn4_calcs Date: Sun, 26 Apr 2026 21:18:25 +0200 Message-ID: <20260426191825.9727-1-adri.vero.dev@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- .../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