mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
drm/i915/alpm: Add intel_psr_need_alpm() to simplify alpm check
Simplify the alpm check which will be used multiple places like source configuration, sink enablement etc. Signed-off-by: Animesh Manna <animesh.manna@intel.com> Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://lore.kernel.org/r/20250423092334.2294483-11-animesh.manna@intel.com
This commit is contained in:
parent
2063174c22
commit
554698b826
|
|
@ -13,6 +13,7 @@
|
|||
#include "intel_display_types.h"
|
||||
#include "intel_dp.h"
|
||||
#include "intel_dp_aux.h"
|
||||
#include "intel_psr.h"
|
||||
#include "intel_psr_regs.h"
|
||||
|
||||
bool intel_alpm_aux_wake_supported(struct intel_dp *intel_dp)
|
||||
|
|
@ -331,8 +332,8 @@ static void lnl_alpm_configure(struct intel_dp *intel_dp,
|
|||
enum port port = dp_to_dig_port(intel_dp)->base.port;
|
||||
u32 alpm_ctl;
|
||||
|
||||
if (DISPLAY_VER(display) < 20 ||
|
||||
(!crtc_state->has_sel_update && !intel_dp_is_edp(intel_dp)))
|
||||
if (DISPLAY_VER(display) < 20 || (!intel_psr_needs_alpm(intel_dp, crtc_state) &&
|
||||
!crtc_state->has_lobf))
|
||||
return;
|
||||
|
||||
mutex_lock(&intel_dp->alpm_parameters.lock);
|
||||
|
|
|
|||
|
|
@ -4192,3 +4192,9 @@ void intel_psr_connector_debugfs_add(struct intel_connector *connector)
|
|||
debugfs_create_file("i915_psr_status", 0444, root,
|
||||
connector, &i915_psr_status_fops);
|
||||
}
|
||||
|
||||
bool intel_psr_needs_alpm(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
return intel_dp_is_edp(intel_dp) && (crtc_state->has_sel_update ||
|
||||
crtc_state->has_panel_replay);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,5 +75,6 @@ void intel_psr_trigger_frame_change_event(struct intel_dsb *dsb,
|
|||
struct intel_crtc *crtc);
|
||||
void intel_psr_connector_debugfs_add(struct intel_connector *connector);
|
||||
void intel_psr_debugfs_register(struct intel_display *display);
|
||||
bool intel_psr_needs_alpm(struct intel_dp *intel_dp, const struct intel_crtc_state *crtc_state);
|
||||
|
||||
#endif /* __INTEL_PSR_H__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user