mirror of
https://github.com/openbsd/src.git
synced 2026-06-18 07:13:36 +02:00
drm/i915/psr: Block DC states on vblank enable when Panel Replay supported
From Jouni Hogander fed64e47a32f390fb3a0fc7c87b8ef96c8897333 in linux-6.18.y/6.18.35 8bb9093df555f9e89fdbe1405118b11384c03e04 in mainline linux
This commit is contained in:
@@ -3982,32 +3982,33 @@ void intel_psr_notify_vblank_enable_disable(struct intel_display *display,
|
||||
bool enable)
|
||||
{
|
||||
struct intel_encoder *encoder;
|
||||
bool block_dc_states = false;
|
||||
|
||||
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 (CAN_PANEL_REPLAY(intel_dp))
|
||||
block_dc_states = true;
|
||||
|
||||
if (intel_dp->psr.enabled && intel_dp->psr.pkg_c_latency_used)
|
||||
if (intel_dp->psr.enabled && !intel_dp->psr.panel_replay_enabled &&
|
||||
intel_dp->psr.pkg_c_latency_used)
|
||||
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
|
||||
* 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);
|
||||
if (block_dc_states)
|
||||
intel_display_power_set_target_dc_state(display, enable ?
|
||||
DC_STATE_DISABLE :
|
||||
DC_STATE_EN_UPTO_DC6);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user