]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/display: Enable MSA Ignore Timing PAR only when in not fixed_rr mode
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Tue, 11 Mar 2025 09:37:51 +0000 (15:07 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 13 Mar 2025 12:15:29 +0000 (17:45 +0530)
MSA Ignore Timing PAR enable is set in the DP sink when we enable variable
refresh rate.

Currently for link training we depend on flipline to decide whether we
want to ignore the msa timings. With fixed refresh rate we will still
fill the flipline in all cases whether panel supports VRR or not.

Change the condition for link training to ignore the msa timings if
vrr.in_range.

v2: Add more documentation and a #TODO for readout of vrr.in_range.
(Ville)

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250311093751.1329043-9-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_dp_link_training.c

index ded246bbf23256ace0d888f87cef9c1f4843bde2..53480914f2394811e636dcd61dfffc860b869e21 100644 (file)
@@ -727,8 +727,21 @@ void intel_dp_link_training_set_mode(struct intel_dp *intel_dp, int link_rate, b
 static void intel_dp_update_downspread_ctrl(struct intel_dp *intel_dp,
                                            const struct intel_crtc_state *crtc_state)
 {
+        /*
+         * Currently, we set the MSA ignore bit based on vrr.in_range.
+         * We can't really read that out during driver load since we don't have
+         * the connector information read in yet. So if we do end up doing a
+         * modeset during initial_commit() we'll clear the MSA ignore bit.
+         * GOP likely wouldn't have set this bit so after the initial commit,
+         * if there are no modesets and we enable VRR mode seamlessly
+         * (without a full modeset), the MSA ignore bit might never get set.
+         *
+         * #TODO: Implement readout of vrr.in_range.
+         * We need fastset support for setting the MSA ignore bit in DPCD,
+         * especially on the first real commit when clearing the inherited flag.
+         */
        intel_dp_link_training_set_mode(intel_dp,
-                                       crtc_state->port_clock, crtc_state->vrr.flipline);
+                                       crtc_state->port_clock, crtc_state->vrr.in_range);
 }
 
 void intel_dp_link_training_set_bw(struct intel_dp *intel_dp,