diff options
| author | Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> | 2026-07-30 16:29:09 +0530 |
|---|---|---|
| committer | Suraj Kandpal <suraj.kandpal@intel.com> | 2026-08-03 10:32:33 +0530 |
| commit | dfd1495664ef26662fa77ec829df88e41b6fd1fc (patch) | |
| tree | 475c50258bbcd587df943371e1530bdc0bbeec63 | |
| parent | 8565e6cfb8f19e066896efbc4cc126adb92cb38a (diff) | |
drm/i915/vrr: Restrict CMRR enable condition to VRR-TG-default platforms
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>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260730105919.3913412-3-mitulkumar.ajitkumar.golani@intel.com
| -rw-r--r-- | drivers/gpu/drm/i915/display/intel_vrr.c | 12 |
1 files 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) { |
