Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, ankit.k.nautiyal@intel.com,
	chaitanya.kumar.borah@intel.com
Subject: [PATCH v2 04/11] drm/i915/vrr: Move CMRR hw registers to fix refresh rate path
Date: Tue, 16 Jun 2026 20:12:25 +0530	[thread overview]
Message-ID: <20260616144233.832276-5-mitulkumar.ajitkumar.golani@intel.com> (raw)
In-Reply-To: <20260616144233.832276-1-mitulkumar.ajitkumar.golani@intel.com>

Move CMRR register writes to fix refresh rate register write path
to consolidate with fix refresh rate implementation.

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
---
 drivers/gpu/drm/i915/display/intel_vrr.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
index e36c0cab096a..5678c3a86796 100644
--- a/drivers/gpu/drm/i915/display/intel_vrr.c
+++ b/drivers/gpu/drm/i915/display/intel_vrr.c
@@ -329,6 +329,17 @@ void intel_vrr_set_fixed_rr_timings(const struct intel_crtc_state *crtc_state,
 	if (!intel_vrr_possible(crtc_state))
 		return;
 
+	if (crtc_state->cmrr.enable) {
+		intel_de_write(display, TRANS_CMRR_M_HI(display, transcoder),
+			       upper_32_bits(crtc_state->cmrr.cmrr_m));
+		intel_de_write(display, TRANS_CMRR_M_LO(display, transcoder),
+			       lower_32_bits(crtc_state->cmrr.cmrr_m));
+		intel_de_write(display, TRANS_CMRR_N_HI(display, transcoder),
+			       upper_32_bits(crtc_state->cmrr.cmrr_n));
+		intel_de_write(display, TRANS_CMRR_N_LO(display, transcoder),
+			       lower_32_bits(crtc_state->cmrr.cmrr_n));
+	}
+
 	intel_de_write(display, TRANS_VRR_VMIN(display, transcoder),
 		       intel_vrr_fixed_rr_hw_vmin(crtc_state) - 1);
 	intel_de_write(display, TRANS_VRR_VMAX(display, transcoder),
@@ -641,17 +652,6 @@ void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state)
 		return;
 	}
 
-	if (crtc_state->cmrr.enable) {
-		intel_de_write(display, TRANS_CMRR_M_HI(display, cpu_transcoder),
-			       upper_32_bits(crtc_state->cmrr.cmrr_m));
-		intel_de_write(display, TRANS_CMRR_M_LO(display, cpu_transcoder),
-			       lower_32_bits(crtc_state->cmrr.cmrr_m));
-		intel_de_write(display, TRANS_CMRR_N_HI(display, cpu_transcoder),
-			       upper_32_bits(crtc_state->cmrr.cmrr_n));
-		intel_de_write(display, TRANS_CMRR_N_LO(display, cpu_transcoder),
-			       lower_32_bits(crtc_state->cmrr.cmrr_n));
-	}
-
 	intel_vrr_set_fixed_rr_timings(crtc_state, cpu_transcoder);
 	intel_cmtg_set_vrr_timings(crtc_state);
 
-- 
2.48.1


  parent reply	other threads:[~2026-06-16 14:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-16 14:42 [PATCH v2 00/11] Enable CMRR in fixed-RR VRR path Mitul Golani
2026-06-16 14:42 ` [PATCH v2 01/11] drm/i915/vrr: add per-CRTC vrr/cmrr debugfs control Mitul Golani
2026-06-17 11:57   ` Jani Nikula
2026-06-16 14:42 ` [PATCH v2 02/11] drm/i915/vrr: compute CMRR fractional timings generically Mitul Golani
2026-06-17 12:00   ` Jani Nikula
2026-06-16 14:42 ` [PATCH v2 03/11] drm/i915/vrr: dump CMRR state in the crtc state dump Mitul Golani
2026-06-16 14:42 ` Mitul Golani [this message]
2026-06-16 14:42 ` [PATCH v2 05/11] drm/i915/vrr: Enable/Disable CMRR based on enable/disable preconditions Mitul Golani
2026-06-16 14:42 ` [PATCH v2 06/11] drm/i915/display: Move CMRR crtc_state members under VRR Mitul Golani
2026-06-17 12:02   ` Jani Nikula
2026-06-16 14:42 ` [PATCH v2 07/11] drm/i915/vrr: Fix the CMRR enabling/disabling sequence Mitul Golani
2026-06-16 14:42 ` [PATCH v2 08/11] drm/i915/vrr: Compare state and HW registers if platform supports CMRR Mitul Golani
2026-06-16 14:42 ` [PATCH v2 09/11] drm/i915/vrr: Remove TODO as CMRR is exclusive to Adaptive mode Mitul Golani
2026-06-16 14:42 ` [PATCH v2 10/11] drm/i915/vrr: Return from CMRR compute config in case of PSR2 enabled Mitul Golani
2026-06-16 14:42 ` [PATCH v2 11/11] drm/i915/vrr: Enable cmrr Mitul Golani
2026-06-16 16:10 ` ✓ i915.CI.BAT: success for Enable CMRR in fixed-RR VRR path (rev2) Patchwork
2026-06-17  5:56 ` ✗ i915.CI.Full: failure " 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=20260616144233.832276-5-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 \
    /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