Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/16] Use VRR timing generator for fixed refresh rate modes
@ 2025-03-24 13:32 Ankit Nautiyal
  2025-03-24 13:32 ` [PATCH 01/16] drm/i915/hdmi: Use VRR Timing generator for HDMI for fixed_rr Ankit Nautiyal
                   ` (23 more replies)
  0 siblings, 24 replies; 34+ messages in thread
From: Ankit Nautiyal @ 2025-03-24 13:32 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 PTL+, 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"

Rev9:
-Fixed issue seen on BAT bugs.

Rev10:
-Drop patch for avoiding VRR for DP with HDMI panel.
-Address comments from Ville.
-Add VRR compute config for DP MST.
-Add HAS_VRR() checks and compute fixed timing for all VRR supporting
platforms.
-Move guardband and pipeline_full checks
out from the pure !fastset block in intel_pipe_config_compare().

Rev11:
-Addressed comments from Ville.
-Added only fixed_rr for Joiner.
-Use vrr_possible() before setting fixed timings and before setting
trans_vrr_ctl.
-Split patch to remove vrr.guardband/pipeline_full from !fastset block.
-Add patch to avoid writing into Vtotal.Vtotal bits when always using
VRRTG.

Rev12:
-Address comments from Ville.
-Change sequence of Disable VRR.
-Enable Push before VRR Enable.
-Clear Push after VRR Disable.
-Drop patch to remove Vtotal.vtotal bits.

Rev13:
-Reset trans_vrr_ctl in disable transcoder path.
-Do not allow vrr.guardband live programming without modeset for
platform that always have VRR TG on.

Rev14:
-Add fix for an issue seen after merge of first few refactoring patches.
-Add fix for issue seen on CI.
-Address comments from Ville on last revision.
-Use VRR timing generator by default from PTL

Rev15:
-Address review comment on Patch: Use fixed_rr timings in modeset sequence

Rev16:
-Rebase
-Address review comments from Ville.
-Re-introduce patch to avoid using VTotal.Vtotal bits for PTL+

Ankit Nautiyal (16):
  drm/i915/hdmi: Use VRR Timing generator for HDMI for fixed_rr
  drm/i915/dp_mst: Use VRR Timing generator for DP MST for fixed_rr
  drm/i915/display: Disable PSR before disabling VRR
  drm/i915/display: Move intel_psr_post_plane_update() at the later
  drm/i915/vrr: Refactor condition for computing vmax and LRR
  drm/i915/vrr: Always set vrr vmax/vmin/flipline in
    vrr_{enable/disable}
  drm/i915/vrr: Set vrr.enable for VRR TG with fixed_rr
  drm/i915/display: Use fixed_rr timings in modeset sequence
  drm/i915/vrr: Use fixed timings for platforms that support VRR
  drm/i915/display: Use fixed rr timings in
    intel_set_transcoder_timings_lrr()
  drm/i915/display: Move vrr.guardband/pipeline_full out of !fastset
    block
  drm/i915/vrr: Allow fixed_rr with pipe joiner
  drm/i915/vrr: Always use VRR timing generator for PTL+
  drm/i915/vrr: Set trans_vrr_ctl in intel_vrr_set_transcoder_timings()
  drm/i915/display: Separate out functions to get/set VTOTAL register
  drm/i915/display: Avoid use of VTOTAL.Vtotal bits

 drivers/gpu/drm/i915/display/intel_ddi.c     |   5 +
 drivers/gpu/drm/i915/display/intel_display.c |  82 ++++++++---
 drivers/gpu/drm/i915/display/intel_dp_mst.c  |   7 +
 drivers/gpu/drm/i915/display/intel_hdmi.c    |   3 +
 drivers/gpu/drm/i915/display/intel_vrr.c     | 145 ++++++++++++++-----
 drivers/gpu/drm/i915/display/intel_vrr.h     |   6 +
 6 files changed, 193 insertions(+), 55 deletions(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 34+ messages in thread
* [PATCH 00/16] Use VRR timing generator for fixed refresh rate modes
@ 2025-03-25 11:22 Ankit Nautiyal
  2025-03-25 11:22 ` [PATCH 04/16] drm/i915/display: Move intel_psr_post_plane_update() at the later Ankit Nautiyal
  0 siblings, 1 reply; 34+ messages in thread
From: Ankit Nautiyal @ 2025-03-25 11:22 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 PTL+, 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"

Rev9:
-Fixed issue seen on BAT bugs.

Rev10:
-Drop patch for avoiding VRR for DP with HDMI panel.
-Address comments from Ville.
-Add VRR compute config for DP MST.
-Add HAS_VRR() checks and compute fixed timing for all VRR supporting
platforms.
-Move guardband and pipeline_full checks
out from the pure !fastset block in intel_pipe_config_compare().

Rev11:
-Addressed comments from Ville.
-Added only fixed_rr for Joiner.
-Use vrr_possible() before setting fixed timings and before setting
trans_vrr_ctl.
-Split patch to remove vrr.guardband/pipeline_full from !fastset block.
-Add patch to avoid writing into Vtotal.Vtotal bits when always using
VRRTG.

Rev12:
-Address comments from Ville.
-Change sequence of Disable VRR.
-Enable Push before VRR Enable.
-Clear Push after VRR Disable.
-Drop patch to remove Vtotal.vtotal bits.

Rev13:
-Reset trans_vrr_ctl in disable transcoder path.
-Do not allow vrr.guardband live programming without modeset for
platform that always have VRR TG on.

Rev14:
-Add fix for an issue seen after merge of first few refactoring patches.
-Add fix for issue seen on CI.
-Address comments from Ville on last revision.
-Use VRR timing generator by default from PTL

Rev15:
-Address review comment on Patch: Use fixed_rr timings in modeset sequence

Rev16:
-Rebase
-Address review comments from Ville.
-Re-introduce patch to avoid using VTotal.Vtotal bits for PTL+

Rev17:
-Address comment from Ville on patch to avoid using Vtotal.Vtotal bits
-Add a new patch to exclude the DSI transcoder for VRR read/writes.

Ankit Nautiyal (16):
  drm/i915/hdmi: Use VRR Timing generator for HDMI for fixed_rr
  drm/i915/dp_mst: Use VRR Timing generator for DP MST for fixed_rr
  drm/i915/display: Disable PSR before disabling VRR
  drm/i915/display: Move intel_psr_post_plane_update() at the later
  drm/i915/vrr: Refactor condition for computing vmax and LRR
  drm/i915/vrr: Always set vrr vmax/vmin/flipline in
    vrr_{enable/disable}
  drm/i915/vrr: Set vrr.enable for VRR TG with fixed_rr
  drm/i915/display: Use fixed_rr timings in modeset sequence
  drm/i915/vrr: Use fixed timings for platforms that support VRR
  drm/i915/display: Use fixed rr timings in
    intel_set_transcoder_timings_lrr()
  drm/i915/display: Move vrr.guardband/pipeline_full out of !fastset
    block
  drm/i915/vrr: Allow fixed_rr with pipe joiner
  drm/i915/vrr: Always use VRR timing generator for PTL+
  drm/i915/vrr: Set trans_vrr_ctl in intel_vrr_set_transcoder_timings()
  drm/i915/display: Avoid use of VTOTAL.Vtotal bits
  drm/i915/display: Introduce transcoder_has_vrr() helper

 drivers/gpu/drm/i915/display/intel_ddi.c     |   5 +
 drivers/gpu/drm/i915/display/intel_display.c |  71 +++++++--
 drivers/gpu/drm/i915/display/intel_dp_mst.c  |   7 +
 drivers/gpu/drm/i915/display/intel_hdmi.c    |   3 +
 drivers/gpu/drm/i915/display/intel_vrr.c     | 152 ++++++++++++++-----
 drivers/gpu/drm/i915/display/intel_vrr.h     |   5 +
 6 files changed, 193 insertions(+), 50 deletions(-)

-- 
2.45.2


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

end of thread, other threads:[~2025-03-25 15:53 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-24 13:32 [PATCH 00/16] Use VRR timing generator for fixed refresh rate modes Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 01/16] drm/i915/hdmi: Use VRR Timing generator for HDMI for fixed_rr Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 02/16] drm/i915/dp_mst: Use VRR Timing generator for DP MST " Ankit Nautiyal
2025-03-24 17:42   ` Ville Syrjälä
2025-03-25  4:35     ` Nautiyal, Ankit K
2025-03-24 13:32 ` [PATCH 03/16] drm/i915/display: Disable PSR before disabling VRR Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 04/16] drm/i915/display: Move intel_psr_post_plane_update() at the later Ankit Nautiyal
2025-03-24 17:00   ` Nautiyal, Ankit K
2025-03-24 13:32 ` [PATCH 05/16] drm/i915/vrr: Refactor condition for computing vmax and LRR Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 06/16] drm/i915/vrr: Always set vrr vmax/vmin/flipline in vrr_{enable/disable} Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 07/16] drm/i915/vrr: Set vrr.enable for VRR TG with fixed_rr Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 08/16] drm/i915/display: Use fixed_rr timings in modeset sequence Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 09/16] drm/i915/vrr: Use fixed timings for platforms that support VRR Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 10/16] drm/i915/display: Use fixed rr timings in intel_set_transcoder_timings_lrr() Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 11/16] drm/i915/display: Move vrr.guardband/pipeline_full out of !fastset block Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 12/16] drm/i915/vrr: Allow fixed_rr with pipe joiner Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 13/16] drm/i915/vrr: Always use VRR timing generator for PTL+ Ankit Nautiyal
2025-03-24 13:32 ` [PATCH 14/16] drm/i915/vrr: Set trans_vrr_ctl in intel_vrr_set_transcoder_timings() Ankit Nautiyal
2025-03-24 17:55   ` Ville Syrjälä
2025-03-24 13:32 ` [PATCH 15/16] drm/i915/display: Separate out functions to get/set VTOTAL register Ankit Nautiyal
2025-03-24 18:02   ` Ville Syrjälä
2025-03-25  6:22     ` Nautiyal, Ankit K
2025-03-25 13:45       ` Ville Syrjälä
2025-03-25 15:53         ` Nautiyal, Ankit K
2025-03-24 13:32 ` [PATCH 16/16] drm/i915/display: Avoid use of VTOTAL.Vtotal bits Ankit Nautiyal
2025-03-24 14:19 ` ✓ CI.Patch_applied: success for Use VRR timing generator for fixed refresh rate modes (rev11) Patchwork
2025-03-24 14:19 ` ✓ CI.checkpatch: " Patchwork
2025-03-24 14:20 ` ✓ CI.KUnit: " Patchwork
2025-03-24 14:37 ` ✓ CI.Build: " Patchwork
2025-03-24 14:39 ` ✓ CI.Hooks: " Patchwork
2025-03-24 14:41 ` ✗ CI.checksparse: warning " Patchwork
2025-03-24 15:01 ` ✓ Xe.CI.BAT: success " Patchwork
2025-03-24 17:00 ` ✗ Xe.CI.Full: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-03-25 11:22 [PATCH 00/16] Use VRR timing generator for fixed refresh rate modes Ankit Nautiyal
2025-03-25 11:22 ` [PATCH 04/16] drm/i915/display: Move intel_psr_post_plane_update() at the later Ankit Nautiyal

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