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>, <jouni.hogander@intel.com>,
<animesh.manna@intel.com>
Subject: Re: [PATCH 2/5] drm/i915/alpm: Allow LOBF only if window1 > alpm check_entry lines
Date: Mon, 17 Nov 2025 13:04:34 +0530 [thread overview]
Message-ID: <80aedd90-26dc-4edb-91e9-9c3ff08b8f3d@intel.com> (raw)
In-Reply-To: <aRdGFoATz-liPKxO@intel.com>
On 11/14/2025 8:39 PM, Ville Syrjälä wrote:
> On Fri, Nov 14, 2025 at 10:57:43AM +0530, Ankit Nautiyal wrote:
>> LOBF must be disabled if the number of lines within Window 1 is not greater
>> than ALPM_CTL[ALPM Entry Check]
>>
>> v2: Consider the case where SCL is in the active region. (Ville)
>>
>> Bspec:71041
>> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/intel_alpm.c | 22 ++++++++++++++++++++++
>> 1 file changed, 22 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
>> index 98cbf5dde73b..686e4d13f864 100644
>> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
>> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
>> @@ -263,6 +263,23 @@ int intel_alpm_lobf_min_guardband(struct intel_crtc_state *crtc_state)
>> return first_sdp_position + waketime_in_lines + crtc_state->set_context_latency;
>> }
>>
>> +static bool intel_alpm_lobf_is_window1_sufficient(struct intel_crtc_state *crtc_state)
>> +{
>> + struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
>> + int vblank = adjusted_mode->crtc_vtotal - adjusted_mode->crtc_vdisplay;
>> + int window1;
>> +
>> + /*
>> + * LOBF must be disabled if the number of lines within Window 1 is not
>> + * greater than ALPM_CTL[ALPM Entry Check]
>> + */
>> + window1 = vblank - min(vblank,
>> + crtc_state->vrr.guardband +
>> + crtc_state->set_context_latency);
> Dunno why you have the min() here? guardband+SCL can never
> exceed the total vblank length.
Hmm.. for PTL+ platforms, the SCL can be in vactive region, at that time
SCL + guardband will become more than vblank.
In that case window1 would be 0.
I believed this is what you were pointing to in [1] or did I miss something.
[1] https://lore.kernel.org/intel-xe/aQM_VK0wTlEiub9O@intel.com/
Regards,
Ankit
>
>> +
>> + return window1 > crtc_state->alpm_state.check_entry_lines;
>> +}
>> +
>> void intel_alpm_lobf_compute_config_late(struct intel_dp *intel_dp,
>> struct intel_crtc_state *crtc_state)
>> {
>> @@ -272,6 +289,11 @@ void intel_alpm_lobf_compute_config_late(struct intel_dp *intel_dp,
>> if (!crtc_state->has_lobf)
>> return;
>>
>> + if (!intel_alpm_lobf_is_window1_sufficient(crtc_state)) {
>> + crtc_state->has_lobf = false;
>> + return;
>> + }
>> +
>> /*
>> * LOBF can only be enabled if the time from the start of the SCL+Guardband
>> * window to the position of the first SDP is greater than the time it takes
>> --
>> 2.45.2
next prev parent reply other threads:[~2025-11-17 7:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 5:27 [PATCH 0/5] LOBF fixes Ankit Nautiyal
2025-11-14 5:27 ` [PATCH 1/5] drm/i915/alpm: Compute LOBF late after guardband is already determined Ankit Nautiyal
2025-11-14 5:27 ` [PATCH 2/5] drm/i915/alpm: Allow LOBF only if window1 > alpm check_entry lines Ankit Nautiyal
2025-11-14 15:09 ` Ville Syrjälä
2025-11-17 7:34 ` Nautiyal, Ankit K [this message]
2025-11-14 5:27 ` [PATCH 3/5] drm/i915/alpm: Allow LOBF only for platform that have Always on VRR TG Ankit Nautiyal
2025-11-14 15:10 ` Ville Syrjälä
2025-11-14 5:27 ` [PATCH 4/5] drm/i915/alpm: Simplify and align LOBF checks in pre/post plane update Ankit Nautiyal
2025-11-14 15:15 ` Ville Syrjälä
2025-11-17 7:36 ` Nautiyal, Ankit K
2025-11-14 5:27 ` [PATCH 5/5] drm/i915/alpm: Disable LOBF around transitioning for LRR/seamless MN Ankit Nautiyal
2025-11-14 7:40 ` ✓ i915.CI.BAT: success for LOBF fixes Patchwork
2025-11-14 23:08 ` ✓ i915.CI.Full: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2025-11-19 13:51 [PATCH 0/5] " Ankit Nautiyal
2025-11-19 13:51 ` [PATCH 2/5] drm/i915/alpm: Allow LOBF only if window1 > alpm check_entry lines Ankit Nautiyal
2025-11-20 8:52 ` Michał Grzelak
2025-12-24 8:48 [PATCH 0/5] LOBF fixes Ankit Nautiyal
2025-12-24 8:48 ` [PATCH 2/5] drm/i915/alpm: Allow LOBF only if window1 > alpm check_entry lines Ankit Nautiyal
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=80aedd90-26dc-4edb-91e9-9c3ff08b8f3d@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=animesh.manna@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jouni.hogander@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