On Tue, 2025-05-20 at 14:24 +0530, Nautiyal, Ankit K wrote: > > On 5/2/2025 2:28 PM, Jouni Högander wrote: > > we need to know if AUXLess ALPM is used when preparing for link > > training. Add new interface for this and use it in existing code > > where > > possible. > > > > Signed-off-by: Jouni Högander <jouni.hogan...@intel.com> > > --- > > drivers/gpu/drm/i915/display/intel_alpm.c | 18 ++++++++++++++++-- > > drivers/gpu/drm/i915/display/intel_alpm.h | 2 ++ > > 2 files changed, 18 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c > > b/drivers/gpu/drm/i915/display/intel_alpm.c > > index 5e5bc91ca7b76..4a8d4b34fa89e 100644 > > --- a/drivers/gpu/drm/i915/display/intel_alpm.c > > +++ b/drivers/gpu/drm/i915/display/intel_alpm.c > > @@ -26,6 +26,21 @@ bool intel_alpm_aux_less_wake_supported(struct > > intel_dp *intel_dp) > > return intel_dp->alpm_dpcd & DP_ALPM_AUX_LESS_CAP; > > } > > > > +/** > > + * intel_alpm_is_alpm_aux_less - Check if AUXLess ALPM is used > > + * @intel_dp: Intel DP > > + * @crtc_state: CRTC status > > crtc state > > > > + * > > + * Check if AUXLess ALPM is used by LOBF (Link Off Between Frames) > > or by PSR > > + * (Panel Self Refresh) > > Similar to comment in previous patch lets use `Return:` in line with > kernel doc.
Decided to left out these kernel doc comments completely on this patch as well. Thank you for you review. BR, Jouni Högander > > Patch LGTM. > > Reviewed-by: Ankit Nautiyal <ankit.k.nauti...@intel.com> > > > + */ > > +bool intel_alpm_is_alpm_aux_less(struct intel_dp *intel_dp, > > + const struct intel_crtc_state > > *crtc_state) > > +{ > > + return intel_psr_needs_alpm_aux_less(intel_dp, crtc_state) > > || > > + (crtc_state->has_lobf && > > intel_alpm_aux_less_wake_supported(intel_dp)); > > +} > > + > > void intel_alpm_init(struct intel_dp *intel_dp) > > { > > u8 dpcd; > > @@ -341,8 +356,7 @@ static void lnl_alpm_configure(struct intel_dp > > *intel_dp, > > * Panel Replay on eDP is always using ALPM aux less. I.e. > > no need to > > * check panel support at this point. > > */ > > - if ((crtc_state->has_panel_replay && > > intel_dp_is_edp(intel_dp)) || > > - (crtc_state->has_lobf && > > intel_alpm_aux_less_wake_supported(intel_dp))) { > > + if (intel_alpm_is_alpm_aux_less(intel_dp, crtc_state)) { > > alpm_ctl = ALPM_CTL_ALPM_ENABLE | > > ALPM_CTL_ALPM_AUX_LESS_ENABLE | > > ALPM_CTL_AUX_LESS_SLEEP_HOLD_TIME_50_SYMBO > > LS | > > diff --git a/drivers/gpu/drm/i915/display/intel_alpm.h > > b/drivers/gpu/drm/i915/display/intel_alpm.h > > index d7126d65b60fb..83bbe0b7ff100 100644 > > --- a/drivers/gpu/drm/i915/display/intel_alpm.h > > +++ b/drivers/gpu/drm/i915/display/intel_alpm.h > > @@ -30,6 +30,8 @@ void intel_alpm_post_plane_update(struct > > intel_atomic_state *state, > > void intel_alpm_lobf_debugfs_add(struct intel_connector > > *connector); > > bool intel_alpm_aux_wake_supported(struct intel_dp *intel_dp); > > bool intel_alpm_aux_less_wake_supported(struct intel_dp > > *intel_dp); > > +bool intel_alpm_is_alpm_aux_less(struct intel_dp *intel_dp, > > + const struct intel_crtc_state > > *crtc_state); > > void intel_alpm_disable(struct intel_dp *intel_dp); > > bool intel_alpm_get_error(struct intel_dp *intel_dp); > > #endif