Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>, <jani.nikula@linux.intel.com>,
	<mitulkumar.ajitkumar.golani@intel.com>
Subject: Re: [PATCH 00/23] Use VRR timing generator for fixed refresh rate modes
Date: Wed, 22 Jan 2025 16:08:07 +0530	[thread overview]
Message-ID: <711973f2-03d2-4493-92bb-1da9dbc0e082@intel.com> (raw)
In-Reply-To: <Z1xvavnFCeaiYwJL@intel.com>


On 12/13/2024 11:01 PM, Ville Syrjälä wrote:
> On Mon, Nov 11, 2024 at 02:41:58PM +0530, Ankit Nautiyal wrote:
>> 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.
> Some ideas I had while thinking about this:
>
> - perhaps the most fundemental decision we have to make is how do
>    we compute the vrr state in each case. My first idea was to
>    stick to the current way of always computing it as if vrr is enabled,
>    but that complicates the state checker needlessly, so I'm actually
>    leaning towards always computing the vrr state based on actual
>    uapi.vrr_enable knob. So when that knob is disabled we always compute
>    vmin=flipline=vmax. We're going to anyway have to repgrogram all those
>    registers when toggle VRR anyway.
>
> - intel_vrr_{enable,disable}() should just flip between the fixed and
>    variable timings in vmin/flipline/vmax. I think we should just do this
>    for all the platforms, regarless of whether we also toggle the VRR_CTL
>    enable bit there. This minimizes the differences between the two
>    approaches fairly well, and it should also work well with the previous
>    idea of computing the vrr state based on uapi.vrr_enable. I'm still
>    a bit uneasy wrt. repgramming the timings on the fly since none of
>    the registers are double buffered. So not entirely sure if we need
>    to spend some brain cells on coming up with some kind of safe order
>    of writing the registers or not.
>
> - guardbad/pipeline full probably can't be reprogrammed on the fly,
>    so we need to make sure it satisfies both the fixed and variable
>    timings. I think we should probably just always set vmin=crtc_vtotal
>    instead of the using the current refresh rate based approach. That
>    way we never need to change anything to do with the guardband.
>
> - I was initially thinking we chould jsue the PUSH_EN bit to
>    differentiate between variable and fixed timings, but at least tgl
>    and adl refuse to play ball and the display just blanks out if you
>    attempt to use the VRR timing generator without enabling push.
>    So probably we'll just need make the distinction based on
>    flipline==vmax.
>
> - cmrr I've not really though about. It'll still involve frobbing the
>    VRR_CTL and whatnot (which I think might be double buffered unlike
>    all the other VRR registers). So not sure how to make sure the changes
>    beween the modes are done safely. I think easiest to just never use
>    cmrr for now, and we can figure it out later.
>
> So maybe something along the lines of:
> 1) do the vmin==crtc_vtotal change
> 2) neuter cmrr
> 2) change the state computation and
>     add vmin/vmax/flipline reprogramming to vrr_{enable,disable}()
>     (need to make sure we can still do the fastset vrr toggle)

I am getting some confusion around the vrr_enable and vrr_disable 
functions, with respect to platforms prior to MTL.

For prior platforms TGL-ADL, where we do not want to have fixed timings, 
what happens to them when uapi.vrr_enable is not set.

Do we intend to use the same logic as was earlier where we compute vrr 
timings and write them anyway without enabling VRR?

Or we just dont do anything for these platform when uapi.vrr_enable is 
not set, that way later when uapi.vrr_enable is set, the vrr timings get 
computed and then written to VRR registers in vrr_enable().


Regards,

Ankit


> 3) add the vrr enable/disable steps to the modeset sequence when
>     we want to always use the vrr timing generator
>

  reply	other threads:[~2025-01-22 10:38 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-11  9:11 [PATCH 00/23] Use VRR timing generator for fixed refresh rate modes Ankit Nautiyal
2024-11-11  9:11 ` [PATCH 01/23] drm/i915/vrr: Refactor VRR Timing Computation Ankit Nautiyal
2024-11-11 17:48   ` Garg, Nemesa
2024-11-11 17:49     ` Garg, Nemesa
2024-11-12  3:54     ` Nautiyal, Ankit K
2024-11-11  9:12 ` [PATCH 02/23] drm/i915/vrr: Simplify CMRR Enable Check in intel_vrr_get_config Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 03/23] drm/i915/vrr: Introduce new field for VRR mode Ankit Nautiyal
2024-11-11 17:33   ` Garg, Nemesa
2024-11-12  3:51     ` Nautiyal, Ankit K
2024-11-12 11:32   ` Jani Nikula
2024-11-12 11:33     ` Jani Nikula
2024-11-12 12:51       ` Nautiyal, Ankit K
2024-11-11  9:12 ` [PATCH 04/23] drm/i915/vrr: Fill VRR mode for CMRR and dynamic VRR Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 05/23] drm/i915/vrr: Rename vrr.enable to vrr.tg_enable Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 06/23] drm/i915/display: Absorb cmrr attributes into vrr Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 07/23] drm/i915/display: Add vrr mode to crtc_state dump Ankit Nautiyal
2024-11-12 11:29   ` Jani Nikula
2024-11-11  9:12 ` [PATCH 08/23] drm/i915/vrr: Remove condition flipline > vmin for LNL Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 09/23] drm/i915/vrr: Compute vrr vsync if platforms support it Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 10/23] drm/i915/dp: Avoid vrr compute config for HDMI sink Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 11/23] drm/i915/dp: fix the Adaptive sync Operation mode for SDP Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 12/23] drm/i915/hdmi: Use VRR Timing generator for HDMI Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 13/23] drm/i915/vrr: Handle joiner with vrr Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 14/23] drm/i915/display: Handle transcoder timings for joiner Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 15/23] drm/i915/vrr: Introduce VRR mode Fixed RR Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 16/23] drm/i915/vrr: Fill fixed refresh mode in vrr_get_compute_config Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 17/23] drm/i915/display: Enable MSA Ignore Timing PAR only when in not fixed_rr mode Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 18/23] drm/i915/dp: Set FAVT mode in DP SDP with fixed refresh rate Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 19/23] drm/i915/vrr: Avoid sending PUSH when VRR TG is used with Fixed " Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 20/23] drm/i915/display: Disable PSR before disabling VRR Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 21/23] drm/i915/psr: Allow PSR for fixed refrsh rate with VRR TG Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 22/23] drm/i915/vrr: Always use VRR timing generator for XE2LPD+ Ankit Nautiyal
2024-11-11  9:12 ` [PATCH 23/23] drm/i915/display: Use VRR timings for XE2LPD+ in modeset sequence Ankit Nautiyal
2024-11-11  9:17 ` ✓ CI.Patch_applied: success for Use VRR timing generator for fixed refresh rate modes Patchwork
2024-11-11  9:18 ` ✓ CI.checkpatch: " Patchwork
2024-11-11  9:19 ` ✓ CI.KUnit: " Patchwork
2024-11-11  9:30 ` ✓ CI.Build: " Patchwork
2024-11-11  9:33 ` ✓ CI.Hooks: " Patchwork
2024-11-11  9:35 ` ✗ CI.checksparse: warning " Patchwork
2024-11-11  9:56 ` ✗ CI.BAT: failure " Patchwork
2024-11-11 10:15 ` ✗ CI.FULL: " Patchwork
2024-12-13 17:31 ` [PATCH 00/23] " Ville Syrjälä
2025-01-22 10:38   ` Nautiyal, Ankit K [this message]
2025-01-22 13:08     ` Ville Syrjälä
2025-01-22 13:27       ` Nautiyal, Ankit K

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=711973f2-03d2-4493-92bb-1da9dbc0e082@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=mitulkumar.ajitkumar.golani@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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