summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMitul Golani <mitulkumar.ajitkumar.golani@intel.com>2026-07-30 16:29:13 +0530
committerSuraj Kandpal <suraj.kandpal@intel.com>2026-08-03 10:32:41 +0530
commit39ca58943e4666c49eb568cf9c5c6b19e5042eb8 (patch)
treea174f8edb2e56d12456b33f5a3a91f28dc7897c9 /tools/perf/scripts/python/stackcollapse.py
parent6f80bda1d088b9df6d3e91c5b5ad48406de4e7e4 (diff)
downloadlinux-39ca58943e4666c49eb568cf9c5c6b19e5042eb8.tar.gz
linux-39ca58943e4666c49eb568cf9c5c6b19e5042eb8.zip
drm/i915/vrr: Compute CMRR fractional timings generically
Rework the fractional CMRR computation into a generic, transcoder-agnostic helper driven by an explicit per-CRTC debugfs target, replacing the previous disabled, eDP-only code path. Compute CMRR_M and CMRR_N timings based on the video mode requirements. A 1:1 ratio (denominator == 1000) means no video timing is required. Note that the CMRR enable path is wired up separately; this patch only lays down the generic computation. Remove computation of mode_flags, I915_MODE_FLAG_VRR, as CMRR is being moved to the fixed refresh rate path. Also return early from the CMRR computation if the existing computation is already sufficient. --v2: - Derive video_mode locally instead of caching it in the persistent struct intel_crtc state (Jani, Chaitanya) - Fix numerator unit in comment: milli-Hz, not kHz (Chaitanya) - Fix "requirement" typo and clarify that CMRR is not yet enabled in the commit message (Chaitanya) - Fix precision issue while computing the M/N ratio (Chaitanya) - Rename multiplier_m and multiplier_n to improve readability (Chaitanya) - Compute vtotal as it is required for dithering as per the algorithm implementation (Chaitanya) - Replace the misleading adjusted_pixel_rate with dividend, which is more descriptive --v3: - Mention the rationale for not computing I915_MODE_FLAG_VRR (Chaitanya) - Remove the redundant return statement at the end of the CMRR computation (Chaitanya) - Correct cmrr_n calculation (Chaitanya) - Add an early return if the current computation is already sufficient to drive the mode without CMRR (Chaitanya) - Round up requested_refresh_rate (Validation) - Fix integer overflow --v4: - Update cmrr_n calculation to avoid aggressive dithering - Use div64_u64 to truncate to the floor value instead of DIV_ROUND_UP_ULL, which rounds up to the ceiling value - Add a TODO comment to the cmrr_n calculation - Add a condition for custom refresh rate requests - Update the CMRR computation comment block in compute_config --v5: - Simplify computation - Correct typo in commit message (Chaitanya) - Compute early return condition (Chaitanya) --v6: - Simplify commit message - Simplify video timing requirement compute function (Chaitanya) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260730105919.3913412-7-mitulkumar.ajitkumar.golani@intel.com
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions