Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/28] Use VRR timing generator for fixed refresh rate modes
@ 2025-02-03 12:38 Ankit Nautiyal
  2025-02-03 12:38 ` [PATCH 01/28] drm/i915/vrr: Remove unwanted comment Ankit Nautiyal
                   ` (35 more replies)
  0 siblings, 36 replies; 39+ messages in thread
From: Ankit Nautiyal @ 2025-02-03 12:38 UTC (permalink / raw)
  To: intel-gfx
  Cc: intel-xe, jani.nikula, ville.syrjala, mitulkumar.ajitkumar.golani

Even though the VRR timing generator (TG) is primarily used for
variable refresh rates, it can be used for fixed refresh rates as
well. For a fixed refresh rate the Flip Line and Vmax must be equal
(TRANS_VRR_FLIPLINE = TRANS_VRR_VMAX). Beyond that, there are some
dependencies between the VRR timings and the legacy timing generator
registers.

This series is an attempt to use VRR TG for fixed refresh rate.
For platforms XE2LPD+, always go with VRR timing generator for both fixed and
variable refresh rate cases.

Rev2:
-Added support from MTL+ and for HDMI too.
-Changed VRR VSYNC programming which is required for HDMI.
-Modified vrr compute config for bigjoiner case. (Still to be tested).

Rev3:
-Start support from XE2LPD+ as MTL needs a WA to have PSR +VRR (fixed
refresh rate)
-Add changes to enable PSR with VRR with fixed refresh rate.

Rev4:
-Addressed review comments from Mitul and rebased.

Rev5:
-Avoid MSA Ignore PAR timing enable bit for fixed refresh rate
with VRR TG.
-Skip VRR compute config for HDMI connected via DP-HDMI2.1 PCON.
-Print fixed_rr along with other VRR parameters in crtc state dump.
-Rebase

Rev6:
-Refactor VRR code to have distinct modes in which VRR timing generator
can be used: VRR, FIXED_RR, CMRR.
-Bring the cmmr attributes in vrr struct.
-Remove condition flipline > vmin for LNL.
-Account for vmax being 0 based while MSA vtotal being 1 based.

Rev7:
I have added patches from series for AS SDP fixes [1] , as without panels
that support AS SDP gives a lot of issues.
There were major changes in design as discussed in last version [2].
Below are the change logs:

-Change the design to compute vrr state based on actual uapi.vrr.enable
knob. So when that knob is disabled we always compute vmin=flipline=vmax.
-Always set vmin=crtc_vtotal instead of the using the current refresh rate
based approach. This helps to have the same guardband while switching
between fixed and variable timings.
-Disable CMRR for now to reduce complexity while changing timings on the
fly.
-Change the state computation and add vmin/vmax/flipline reprogramming
to vrr_{enable,disable}()
-Introduce the fixed refresh mode from MTL instead of LNL.

[1] https://patchwork.freedesktop.org/series/137035/
[2] https://patchwork.kernel.org/project/intel-gfx/cover/20241111091221.2992818-1-ankit.k.nautiyal@intel.com/

Rev8:
-Addressed review comments from Ville.
-Refactored few patches.
-Dropped patches:
1. "drm/i915/vrr: Adjust Vtotal for MSA for fixed timing"
2. "drm/i915/vrr: Avoid sending PUSH when VRR TG is used with Fixed
refresh rate"

Ankit Nautiyal (28):
  drm/i915/vrr: Remove unwanted comment
  drm/i915:vrr: Separate out functions to compute vmin and vmax
  drm/i915/vrr: Make helpers for cmrr and vrr timings
  drm/i915/vrr: Simplify CMRR Enable Check in intel_vrr_get_config
  drm/i915/vrr: Introduce new field for VRR mode
  drm/i915/vrr: Fill VRR timing generator mode for CMRR and VRR
  drm/i915/display: Remove vrr.enable and instead check vrr.mode != NONE
  drm/i915/display: Absorb cmrr attributes into vrr struct
  drm/i915/display: Add vrr mode to crtc_state dump
  drm/i915/vrr: Disable CMRR
  drm/i915/display: Update intel_crtc_vrr_{enable/disable}
  drm/i915/vrr: Use crtc_vtotal for vmin
  drm/i915/vrr: Prepare for fixed refresh rate timings
  drm/i915/dp: Avoid vrr compute config for HDMI sink
  drm/i915/vrr: Introduce VRR mode Fixed RR
  drm/i915/display: Enable MSA Ignore Timing PAR only when in not
    fixed_rr mode
  drm/i915/hdmi: Use VRR Timing generator for HDMI
  drm/i915/display: Disable PSR before disabling VRR
  drm/i915/psr: Allow PSR for fixed refrsh rate with VRR TG
  drm/i915/display: Extend WA 14015406119 for PSR2
  drm/i915/vrr: Handle joiner with vrr
  drm/i915/vrr: Refactor condition for computing vmax and LRR
  drm/i915/display: Pass vrr.mode to intel_crtc_update_active_timings()
  drm/i915/vblank: Add crtc active timings for fixed_rr mode
  drm/i915/vrr: Always set vrr vmax/vmin/flipline in
    vrr_{enable/disable}
  drm/i915/display: Use fixed_rr timings in modeset sequence
  drm/i915/vrr: Always use VRR timing generator for MTL+
  drm/i915/vblank: Avoid warning for platforms that always use VRR TG

 .../drm/i915/display/intel_crtc_state_dump.c  |  20 +-
 drivers/gpu/drm/i915/display/intel_ddi.c      |   3 +-
 drivers/gpu/drm/i915/display/intel_display.c  |  74 ++--
 .../drm/i915/display/intel_display_types.h    |  17 +-
 drivers/gpu/drm/i915/display/intel_dp.c       |  12 +-
 .../drm/i915/display/intel_dp_link_training.c |   2 +-
 drivers/gpu/drm/i915/display/intel_dsb.c      |   2 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c     |   3 +
 .../drm/i915/display/intel_modeset_setup.c    |   3 +-
 drivers/gpu/drm/i915/display/intel_psr.c      |   7 +-
 drivers/gpu/drm/i915/display/intel_vblank.c   |  37 +-
 drivers/gpu/drm/i915/display/intel_vblank.h   |   4 +-
 drivers/gpu/drm/i915/display/intel_vrr.c      | 325 +++++++++++++-----
 drivers/gpu/drm/i915/display/intel_vrr.h      |   7 +
 drivers/gpu/drm/i915/display/skl_watermark.c  |   3 +-
 15 files changed, 375 insertions(+), 144 deletions(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2025-02-13 11:06 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-03 12:38 [PATCH 00/28] Use VRR timing generator for fixed refresh rate modes Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 01/28] drm/i915/vrr: Remove unwanted comment Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 02/28] drm/i915:vrr: Separate out functions to compute vmin and vmax Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 03/28] drm/i915/vrr: Make helpers for cmrr and vrr timings Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 04/28] drm/i915/vrr: Simplify CMRR Enable Check in intel_vrr_get_config Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 05/28] drm/i915/vrr: Introduce new field for VRR mode Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 06/28] drm/i915/vrr: Fill VRR timing generator mode for CMRR and VRR Ankit Nautiyal
2025-02-12 21:06   ` Ville Syrjälä
2025-02-13 11:05     ` Nautiyal, Ankit K
2025-02-03 12:38 ` [PATCH 07/28] drm/i915/display: Remove vrr.enable and instead check vrr.mode != NONE Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 08/28] drm/i915/display: Absorb cmrr attributes into vrr struct Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 09/28] drm/i915/display: Add vrr mode to crtc_state dump Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 10/28] drm/i915/vrr: Disable CMRR Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 11/28] drm/i915/display: Update intel_crtc_vrr_{enable/disable} Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 12/28] drm/i915/vrr: Use crtc_vtotal for vmin Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 13/28] drm/i915/vrr: Prepare for fixed refresh rate timings Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 14/28] drm/i915/dp: Avoid vrr compute config for HDMI sink Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 15/28] drm/i915/vrr: Introduce VRR mode Fixed RR Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 16/28] drm/i915/display: Enable MSA Ignore Timing PAR only when in not fixed_rr mode Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 17/28] drm/i915/hdmi: Use VRR Timing generator for HDMI Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 18/28] drm/i915/display: Disable PSR before disabling VRR Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 19/28] drm/i915/psr: Allow PSR for fixed refrsh rate with VRR TG Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 20/28] drm/i915/display: Extend WA 14015406119 for PSR2 Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 21/28] drm/i915/vrr: Handle joiner with vrr Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 22/28] drm/i915/vrr: Refactor condition for computing vmax and LRR Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 23/28] drm/i915/display: Pass vrr.mode to intel_crtc_update_active_timings() Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 24/28] drm/i915/vblank: Add crtc active timings for fixed_rr mode Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 25/28] drm/i915/vrr: Always set vrr vmax/vmin/flipline in vrr_{enable/disable} Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 26/28] drm/i915/display: Use fixed_rr timings in modeset sequence Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 27/28] drm/i915/vrr: Always use VRR timing generator for MTL+ Ankit Nautiyal
2025-02-03 12:38 ` [PATCH 28/28] drm/i915/vblank: Avoid warning for platforms that always use VRR TG Ankit Nautiyal
2025-02-03 14:35 ` ✓ CI.Patch_applied: success for Use VRR timing generator for fixed refresh rate modes (rev3) Patchwork
2025-02-03 14:35 ` ✓ CI.checkpatch: " Patchwork
2025-02-03 14:36 ` ✓ CI.KUnit: " Patchwork
2025-02-03 14:53 ` ✓ CI.Build: " Patchwork
2025-02-03 14:55 ` ✓ CI.Hooks: " Patchwork
2025-02-03 14:57 ` ✗ CI.checksparse: warning " Patchwork
2025-02-03 15:20 ` ✓ Xe.CI.BAT: success " Patchwork
2025-02-03 16:15 ` ✗ Xe.CI.Full: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox