Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Medium] LOBF guardband and vblank checks do not account for fast_wake_lines, 
contrary to commit claims.
--

commit 7252754a9cb3de5dc35455a120dc90a19c62a9a4
Author: Jake Steinman <[email protected]>
Subject: drm/i915/alpm: Add a quirk to keep the fast wake ahead of the IO 
buffer wake

This commit introduces a DPCD quirk for the LG panel on Dell XPS 14/16
(Panther Lake) to ensure the ALPM fast wake starts strictly before the IO
buffer wake. It modifies the wake time formulas and updates PSR vblank
and guardband checks to account for the larger of the two wake times.

Link: 
https://lore.kernel.org/intel-gfx/[email protected]/
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/7521

> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c 
> b/drivers/gpu/drm/i915/display/intel_alpm.c
> index f1383764b7028..79cce5b1fe9f2 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
[ ... ]
> @@ -238,8 +239,29 @@ bool intel_alpm_compute_params(struct intel_dp *intel_dp,
[ ... ]
> +     if (DISPLAY_VER(display) >= 20 &&
> +         intel_has_dpcd_quirk(intel_dp, QUIRK_ALPM_FAST_WAKE_AHEAD) &&
> +         fast_wake_lines <= io_wake_lines) {
> +             if (io_wake_lines < max_wake_lines)
> +                     fast_wake_lines = io_wake_lines + 1;
> +             else
> +                     io_wake_lines = fast_wake_lines - 1;
> +     }
> +
> +     crtc_state->alpm_state.io_wake_lines = io_wake_lines;
> +     crtc_state->alpm_state.fast_wake_lines = fast_wake_lines;

[Severity: Medium]
Do the LOBF checks in intel_alpm.c also need to be updated to account for
fast_wake_lines when it exceeds io_wake_lines due to this quirk?

The commit message states we account for the larger of the two wake times
in the vblank and guardband checks, and the PSR checks in intel_psr.c
were successfully updated.

However, looking at intel_alpm_lobf_min_guardband() in intel_alpm.c:

    waketime_in_lines = max(crtc_state->alpm_state.io_wake_lines,
                            crtc_state->alpm_state.aux_less_wake_lines);

And similarly in intel_alpm_lobf_compute_config_late():

    if (intel_alpm_aux_less_wake_supported(intel_dp))
        waketime_in_lines = crtc_state->alpm_state.io_wake_lines;
    else
        waketime_in_lines = crtc_state->alpm_state.aux_less_wake_lines;

Could this underestimate the ALPM wake time requirements by 1 scanline for
LOBF on the quirked hardware, potentially allowing LOBF to be enabled when
the guardband or vblank duration is insufficient?

-- 
Sashiko AI review · 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to