From: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, uma.shankar@intel.com,
ankit.k.nautiyal@intel.com, chaitanya.kumar.borah@intel.com
Subject: [PATCH v7 02/10] drm/i915/vrr: Restrict CMRR enable condition to VRR-TG-default platforms
Date: Tue, 28 Jul 2026 20:29:34 +0530 [thread overview]
Message-ID: <20260728145943.3848704-3-mitulkumar.ajitkumar.golani@intel.com> (raw)
In-Reply-To: <20260728145943.3848704-1-mitulkumar.ajitkumar.golani@intel.com>
CMRR is currently advertised on all HAS_CMRR platforms, but it depends
on the VRR timing generator being the default timing generator, which
currently only applies to DISPLAY_VER >= 30.
Gate the CMRR enable condition and readout accordingly so CMRR is only
reported on supported platforms.
No functional change.
--v2:
- Create a separate function to check if CMRR possible
--v3:
- Simplify commit message (Chaitanya)
- Remove redundant outer parenthesis (Chaitanya)
Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
drivers/gpu/drm/i915/display/intel_vrr.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
index 51e4f3309b8b..b0c9101e6ed3 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -187,15 +187,21 @@ int intel_vrr_vmax_vblank_start(const struct intel_crtc_state *crtc_state)
return intel_vrr_vmax_vtotal(crtc_state) - crtc_state->vrr.guardband;
}
+static bool intel_vrr_cmrr_possible(const struct intel_crtc_state *crtc_state)
+{
+ struct intel_display *display = to_intel_display(crtc_state);
+
+ return HAS_CMRR(display) && intel_vrr_always_use_vrr_tg(display);
+}
+
static bool
is_cmrr_frac_required(struct intel_crtc_state *crtc_state)
{
- struct intel_display *display = to_intel_display(crtc_state);
int calculated_refresh_k, actual_refresh_k, pixel_clock_per_line;
struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
/* Avoid CMRR for now till we have VRR with fixed timings working */
- if (!HAS_CMRR(display) || true)
+ if (!intel_vrr_cmrr_possible(crtc_state) || true)
return false;
actual_refresh_k =
@@ -1066,7 +1072,7 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state)
trans_vrr_ctl = intel_de_read(display,
TRANS_VRR_CTL(display, cpu_transcoder));
- if (HAS_CMRR(display))
+ if (intel_vrr_cmrr_possible(crtc_state))
crtc_state->cmrr.enable = (trans_vrr_ctl & VRR_CTL_CMRR_ENABLE);
if (crtc_state->cmrr.enable) {
--
2.48.1
next prev parent reply other threads:[~2026-07-28 15:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 14:59 [PATCH v7 00/10] Enable CMRR in fixed-RR VRR path Mitul Golani
2026-07-28 14:59 ` [PATCH v7 01/10] drm/i915/vrr: Return from PSR2 compute config in case of CMRR enabled Mitul Golani
2026-07-28 15:23 ` [PATCH v8 " Mitul Golani
2026-07-30 8:43 ` Borah, Chaitanya Kumar
2026-07-28 14:59 ` Mitul Golani [this message]
2026-07-28 14:59 ` [PATCH v7 03/10] drm/i915/vrr: Add per-CRTC vrr/cmrr debugfs control Mitul Golani
2026-07-28 14:59 ` [PATCH v7 04/10] drm/i915/vrr: Update AS_SDP target_rr_divider based on CMRR config request Mitul Golani
2026-07-28 14:59 ` [PATCH v7 05/10] drm/i915/display: Move CMRR crtc_state members under VRR Mitul Golani
2026-07-30 8:44 ` Borah, Chaitanya Kumar
2026-07-28 14:59 ` [PATCH v7 06/10] drm/i915/vrr: Compute CMRR fractional timings generically Mitul Golani
2026-07-30 8:45 ` Borah, Chaitanya Kumar
2026-07-28 14:59 ` [PATCH v7 07/10] drm/i915/vrr: Latch CMRR ratio via fastset on debugfs write Mitul Golani
2026-07-30 8:48 ` Borah, Chaitanya Kumar
2026-07-28 14:59 ` [PATCH v7 08/10] drm/i915/vrr: Program CMRR enable/disable from transcoder timings Mitul Golani
2026-07-30 8:55 ` Borah, Chaitanya Kumar
2026-07-28 14:59 ` [PATCH v7 09/10] drm/i915/vrr: Dump CMRR state in the crtc state dump Mitul Golani
2026-07-28 14:59 ` [PATCH v7 10/10] drm/i915/vrr: Enable cmrr Mitul Golani
2026-07-30 8:55 ` Borah, Chaitanya Kumar
2026-07-28 16:08 ` ✓ i915.CI.BAT: success for Enable CMRR in fixed-RR VRR path (rev7) Patchwork
2026-07-28 16:23 ` ✓ i915.CI.BAT: success for Enable CMRR in fixed-RR VRR path (rev8) Patchwork
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=20260728145943.3848704-3-mitulkumar.ajitkumar.golani@intel.com \
--to=mitulkumar.ajitkumar.golani@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=uma.shankar@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.