mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/i915/psr: Add interface to notify PSR of vblank enable/disable
To implement Wa_16025596647 we need to get notification of vblank interrupt enable/disable. Add new interface to PSR code for this notification. Signed-off-by: Jouni Högander <jouni.hogander@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Link: https://lore.kernel.org/r/20250414100508.1208774-10-jouni.hogander@intel.com
This commit is contained in:
@@ -3797,6 +3797,46 @@ unlock:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_psr_notify_vblank_enable_disable - Notify PSR about enable/disable of vblank
|
||||
* @display: intel display struct
|
||||
* @enable: enable/disable
|
||||
*
|
||||
* This is targeted for underrun on idle PSR HW bug (Wa_16025596647) to apply
|
||||
* remove the workaround when vblank is getting enabled/disabled
|
||||
*/
|
||||
void intel_psr_notify_vblank_enable_disable(struct intel_display *display,
|
||||
bool enable)
|
||||
{
|
||||
struct intel_encoder *encoder;
|
||||
|
||||
for_each_intel_encoder_with_psr(display->drm, encoder) {
|
||||
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
|
||||
|
||||
mutex_lock(&intel_dp->psr.lock);
|
||||
if (intel_dp->psr.panel_replay_enabled) {
|
||||
mutex_unlock(&intel_dp->psr.lock);
|
||||
break;
|
||||
}
|
||||
|
||||
if (intel_dp->psr.enabled)
|
||||
intel_psr_apply_underrun_on_idle_wa_locked(intel_dp);
|
||||
|
||||
mutex_unlock(&intel_dp->psr.lock);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTE: intel_display_power_set_target_dc_state is used
|
||||
* only by PSR * code for DC3CO handling. DC3CO target
|
||||
* state is currently disabled in * PSR code. If DC3CO
|
||||
* is taken into use we need take that into account here
|
||||
* as well.
|
||||
*/
|
||||
intel_display_power_set_target_dc_state(display, enable ? DC_STATE_DISABLE :
|
||||
DC_STATE_EN_UPTO_DC6);
|
||||
}
|
||||
|
||||
static void
|
||||
psr_source_status(struct intel_dp *intel_dp, struct seq_file *m)
|
||||
{
|
||||
|
||||
@@ -64,6 +64,8 @@ void intel_psr_notify_pipe_change(struct intel_atomic_state *state,
|
||||
struct intel_crtc *crtc, bool enable);
|
||||
void intel_psr_notify_dc5_dc6(struct intel_display *display);
|
||||
void intel_psr_dc5_dc6_wa_init(struct intel_display *display);
|
||||
void intel_psr_notify_vblank_enable_disable(struct intel_display *display,
|
||||
bool enable);
|
||||
bool intel_psr_link_ok(struct intel_dp *intel_dp);
|
||||
|
||||
void intel_psr_lock(const struct intel_crtc_state *crtc_state);
|
||||
|
||||
Reference in New Issue
Block a user