From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com
Subject: Re: [PATCH v2 11/13] drm/i915/vrr: Add state checker for dc balance params
Date: Wed, 23 Apr 2025 13:21:48 +0300 [thread overview]
Message-ID: <8734dz18lf.fsf@intel.com> (raw)
In-Reply-To: <e66ce2ea-f0d4-422d-a3d6-08b95565e188@intel.com>
On Wed, 23 Apr 2025, "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com> wrote:
> On 4/21/2025 9:18 PM, Mitul Golani wrote:
>> Add state checker for dc balance params. Also add macro to
>> check source support.
>>
>> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_display.c | 7 +++++++
>> drivers/gpu/drm/i915/display/intel_vrr.c | 20 +++++++++++++++++++-
>> 2 files changed, 26 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
>> index 274d01552ccf..4a21acb88aa7 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display.c
>> @@ -5402,6 +5402,13 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
>> PIPE_CONF_CHECK_LLI(cmrr.cmrr_m);
>> PIPE_CONF_CHECK_LLI(cmrr.cmrr_n);
>> PIPE_CONF_CHECK_BOOL(cmrr.enable);
>> + PIPE_CONF_CHECK_I(vrr.dc_balance.vmin);
> Add check for vrr.dc_balance.enable?
They should match regardless, no? Something's wrong if they differ.
>> + PIPE_CONF_CHECK_I(vrr.dc_balance.vmax);
>> + PIPE_CONF_CHECK_I(vrr.dc_balance.guardband);
>> + PIPE_CONF_CHECK_I(vrr.dc_balance.slope);
>> + PIPE_CONF_CHECK_I(vrr.dc_balance.max_increase);
>> + PIPE_CONF_CHECK_I(vrr.dc_balance.max_decrease);
>> + PIPE_CONF_CHECK_I(vrr.dc_balance.vblank_target);
>> }
>>
>> if (!fastset || intel_vrr_always_use_vrr_tg(display)) {
>> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
>> index fb96d03bbf03..e8802348e5fa 100644
>> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
>> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
>> @@ -740,7 +740,7 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state)
>> {
>> struct intel_display *display = to_intel_display(crtc_state);
>> enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
>> - u32 trans_vrr_ctl, trans_vrr_vsync;
>> + u32 trans_vrr_ctl, trans_vrr_vsync, dcb_ctl;
>> bool vrr_enable;
>>
>> trans_vrr_ctl = intel_de_read(display,
>> @@ -802,6 +802,24 @@ void intel_vrr_get_config(struct intel_crtc_state *crtc_state)
>> else
>> crtc_state->vrr.enable = vrr_enable;
>>
>> + if (HAS_DC_BALANCE(display)) {
>> + dcb_ctl = intel_de_read(display, PIPEDMC_DCB_CTL(display, cpu_transcoder));
>
> dsb_ctl is not used. Need to use it for vrr.dc_balance.enable.
>
>
> IMO we can introduce the new members (which is done in Patch#4), readout
> and state checker in one patch.
>
> Regards,
>
> Ankit
>
>
>> + crtc_state->vrr.dc_balance.vmin =
>> + intel_de_read(display, PIPEDMC_DCB_VMIN(display, cpu_transcoder)) + 1;
>> + crtc_state->vrr.dc_balance.vmax =
>> + intel_de_read(display, PIPEDMC_DCB_VMAX(display, cpu_transcoder)) + 1;
>> + crtc_state->vrr.dc_balance.guardband =
>> + intel_de_read(display, PIPEDMC_DCB_GUARDBAND(display, cpu_transcoder));
>> + crtc_state->vrr.dc_balance.max_increase =
>> + intel_de_read(display, PIPEDMC_DCB_MAX_INCREASE(display, cpu_transcoder));
>> + crtc_state->vrr.dc_balance.max_decrease =
>> + intel_de_read(display, PIPEDMC_DCB_MAX_DECREASE(display, cpu_transcoder));
>> + crtc_state->vrr.dc_balance.slope =
>> + intel_de_read(display, PIPEDMC_DCB_SLOPE(display, cpu_transcoder));
>> + crtc_state->vrr.dc_balance.vblank_target =
>> + intel_de_read(display, PIPEDMC_DCB_VBLANK(display, cpu_transcoder));
>> + }
>> +
>> /*
>> * #TODO: For Both VRR and CMRR the flag I915_MODE_FLAG_VRR is set for mode_flags.
>> * Since CMRR is currently disabled, set this flag for VRR for now.
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-04-23 10:22 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 15:48 [PATCH v2 00/13] Enable/Disable DC balance along with VRR DSB Mitul Golani
2025-04-21 15:48 ` [PATCH v2 01/13] drm/i915/vrr: Refactor vmin/vmax stuff Mitul Golani
2025-04-23 6:49 ` Nautiyal, Ankit K
2025-04-25 11:36 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 02/13] drm/i915/vrr: Add functions to read out " Mitul Golani
2025-04-23 6:52 ` Nautiyal, Ankit K
2025-04-23 13:17 ` Nautiyal, Ankit K
2025-04-23 13:34 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 03/13] drm/i915/display: Add source param for dc balance Mitul Golani
2025-04-23 6:58 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 04/13] drm/i915/vrr: Add enable/disable calls for DC Balance Mitul Golani
2025-04-23 7:01 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 05/13] drm/i915/vrr: Add compute config for DC balance params Mitul Golani
2025-04-23 7:05 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 06/13] drm/i915/vrr: Add state dump for dc " Mitul Golani
2025-04-23 8:47 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 07/13] drm/i915: Extract vrr_vblank_start() Mitul Golani
2025-04-23 7:10 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 08/13] drm/i915/vrr: Implement vblank evasion with DC balancing Mitul Golani
2025-04-23 7:15 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 09/13] drm/i915/dsb: Add pipedmc dc balance enable/disable Mitul Golani
2025-04-23 7:16 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 10/13] drm/i915/vrr: Pause DC balancing for DSB commits Mitul Golani
2025-04-23 7:21 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 11/13] drm/i915/vrr: Add state checker for dc balance params Mitul Golani
2025-04-23 7:24 ` Nautiyal, Ankit K
2025-04-23 10:21 ` Jani Nikula [this message]
2025-04-23 11:36 ` Nautiyal, Ankit K
2025-04-21 15:48 ` [PATCH v2 12/13] drm/i915/display: Prepare state checker for dc balance enable Mitul Golani
2025-04-23 7:26 ` Nautiyal, Ankit K
2025-04-21 15:49 ` [PATCH v2 13/13] drm/i915/vrr: enable dc balance bit Mitul Golani
2025-04-23 7:28 ` Nautiyal, Ankit K
2025-04-21 16:43 ` ✓ CI.Patch_applied: success for Enable/Disable DC balance along with VRR DSB Patchwork
2025-04-21 16:44 ` ✓ CI.checkpatch: " Patchwork
2025-04-21 16:45 ` ✓ CI.KUnit: " Patchwork
2025-04-21 16:53 ` ✓ CI.Build: " Patchwork
2025-04-21 16:55 ` ✓ CI.Hooks: " Patchwork
2025-04-21 16:57 ` ✗ CI.checksparse: warning " Patchwork
2025-04-21 18:39 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-22 7:52 ` ✗ Fi.CI.SPARSE: warning for Enable/Disable DC balance along with VRR DSB (rev2) Patchwork
2025-04-22 8:16 ` ✗ i915.CI.BAT: failure " Patchwork
2025-04-22 13:19 ` ✓ Xe.CI.BAT: success for Enable/Disable DC balance along with VRR DSB Patchwork
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=8734dz18lf.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.