Skip to content

Commit ec2231b

Browse files
ideakjlahtine-intel
authored andcommitted
drm/i915/dp: Fix AUX IO power enabling for eDP PSR
Panel Self Refresh on eDP requires the AUX IO power to be enabled whenever the output (main link) is enabled. This is required by the AUX_PHY_WAKE/ML_PHY_LOCK signaling initiated by the HW automatically to re-enable the main link after it got disabled in power saving states (see eDP v1.4b, sections 5.1, 6.1.3.3.1.1). The Panel Replay mode on non-eDP outputs on the other hand is only supported by keeping the main link active, thus not requiring the above AUX_PHY_WAKE/ML_PHY_LOCK signaling (eDP v1.4b, section 6.1.3.3.1.2). Thus enabling the AUX IO power for this case is not required either. Based on the above enable the AUX IO power only for eDP/PSR outputs. Bspec: 49274, 53370 v2: - Add a TODO comment to adjust the requirement for AUX IO based on whether the ALPM/main-link off mode gets enabled. (Rodrigo) Cc: Animesh Manna <[email protected]> Fixes: b8cf5b5 ("drm/i915/panelreplay: Initializaton and compute config for panel replay") Reviewed-by: Rodrigo Vivi <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit f7c2ed9) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent fcd33d4 commit ec2231b

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

drivers/gpu/drm/i915/display/intel_ddi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ intel_ddi_main_link_aux_domain(struct intel_digital_port *dig_port,
916916
* instead of a specific AUX_IO_<port> reference without powering up any
917917
* extra wells.
918918
*/
919-
if (intel_encoder_can_psr(&dig_port->base))
919+
if (intel_psr_needs_aux_io_power(&dig_port->base, crtc_state))
920920
return intel_display_power_aux_io_domain(i915, dig_port->aux_ch);
921921
else if (DISPLAY_VER(i915) < 14 &&
922922
(intel_crtc_has_dp_encoder(crtc_state) ||

drivers/gpu/drm/i915/display/intel_psr.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,25 @@ bool intel_encoder_can_psr(struct intel_encoder *encoder)
203203
return false;
204204
}
205205

206+
bool intel_psr_needs_aux_io_power(struct intel_encoder *encoder,
207+
const struct intel_crtc_state *crtc_state)
208+
{
209+
/*
210+
* For PSR/PR modes only eDP requires the AUX IO power to be enabled whenever
211+
* the output is enabled. For non-eDP outputs the main link is always
212+
* on, hence it doesn't require the HW initiated AUX wake-up signaling used
213+
* for eDP.
214+
*
215+
* TODO:
216+
* - Consider leaving AUX IO disabled for eDP / PR as well, in case
217+
* the ALPM with main-link off mode is not enabled.
218+
* - Leave AUX IO enabled for DP / PR, once support for ALPM with
219+
* main-link off mode is added for it and this mode gets enabled.
220+
*/
221+
return intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
222+
intel_encoder_can_psr(encoder);
223+
}
224+
206225
static bool psr_global_enabled(struct intel_dp *intel_dp)
207226
{
208227
struct intel_display *display = to_intel_display(intel_dp);

drivers/gpu/drm/i915/display/intel_psr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ struct intel_plane_state;
2525
(intel_dp)->psr.source_panel_replay_support)
2626

2727
bool intel_encoder_can_psr(struct intel_encoder *encoder);
28+
bool intel_psr_needs_aux_io_power(struct intel_encoder *encoder,
29+
const struct intel_crtc_state *crtc_state);
2830
void intel_psr_init_dpcd(struct intel_dp *intel_dp);
2931
void intel_psr_enable_sink(struct intel_dp *intel_dp,
3032
const struct intel_crtc_state *crtc_state);

0 commit comments

Comments
 (0)