mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
drm/i915/psr: Add helper to get min psr guardband
Introduce a helper to compute the max link wake latency when using Auxless/Aux wake mechanism for PSR/Panel Replay/LOBF features. This will be used to compute the minimum guardband so that the link wake latencies are accounted and these features work smoothly for higher refresh rate panels. v2: - Account for flag `req_psr2_sdp_prior_scanline` and scl lines while computing min guardband. (Jouni) - Use wake lines only for eDP with panel_replay and sel_update flags set. (Jouni) Bspec: 70151, 71477 Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://lore.kernel.org/r/20251017123504.2247954-2-ankit.k.nautiyal@intel.com
This commit is contained in:
@@ -4499,3 +4499,30 @@ void intel_psr_compute_config_late(struct intel_dp *intel_dp,
|
||||
|
||||
intel_psr_set_non_psr_pipes(intel_dp, crtc_state);
|
||||
}
|
||||
|
||||
int intel_psr_min_guardband(struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
int psr_min_guardband;
|
||||
int wake_lines;
|
||||
|
||||
if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
|
||||
return 0;
|
||||
|
||||
if (crtc_state->has_panel_replay)
|
||||
wake_lines = crtc_state->alpm_state.aux_less_wake_lines;
|
||||
else if (crtc_state->has_sel_update)
|
||||
wake_lines = DISPLAY_VER(display) < 20 ?
|
||||
psr2_block_count_lines(crtc_state->alpm_state.io_wake_lines,
|
||||
crtc_state->alpm_state.fast_wake_lines) :
|
||||
crtc_state->alpm_state.io_wake_lines;
|
||||
else
|
||||
return 0;
|
||||
|
||||
psr_min_guardband = wake_lines + crtc_state->set_context_latency;
|
||||
|
||||
if (crtc_state->req_psr2_sdp_prior_scanline)
|
||||
psr_min_guardband++;
|
||||
|
||||
return psr_min_guardband;
|
||||
}
|
||||
|
||||
@@ -85,5 +85,6 @@ bool intel_psr_needs_alpm_aux_less(struct intel_dp *intel_dp,
|
||||
const struct intel_crtc_state *crtc_state);
|
||||
void intel_psr_compute_config_late(struct intel_dp *intel_dp,
|
||||
struct intel_crtc_state *crtc_state);
|
||||
int intel_psr_min_guardband(struct intel_crtc_state *crtc_state);
|
||||
|
||||
#endif /* __INTEL_PSR_H__ */
|
||||
|
||||
Reference in New Issue
Block a user