ALPM AUX-Wake fast wake sync pulse count is needed by PSR to calculate IO wake and fast wake lines. Signed-off-by: Jouni Högander <jouni.hogander@xxxxxxxxx> --- drivers/gpu/drm/i915/display/intel_display_types.h | 6 ++++++ drivers/gpu/drm/i915/display/intel_dp_aux.c | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index 0d4012097db1..1231d374aeec 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -1798,6 +1798,12 @@ struct intel_dp { u32 (*get_aux_send_ctl)(struct intel_dp *dp, int send_bytes, u32 aux_clock_divider); + /* + * This function returns the number of fast wake sync pulses. It is + * needed by PSR code to calculate needed fast wake and io wake lines. + */ + u8 (*get_aux_fw_sync_len)(void); + i915_reg_t (*aux_ch_ctl_reg)(struct intel_dp *dp); i915_reg_t (*aux_ch_data_reg)(struct intel_dp *dp, int index); diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/drm/i915/display/intel_dp_aux.c index 4f4a0e3b3114..fad39b2e3022 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_aux.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c @@ -143,10 +143,10 @@ static int intel_dp_aux_sync_len(void) return precharge + preamble; } -static int intel_dp_aux_fw_sync_len(void) +static u8 intel_dp_aux_fw_sync_len(void) { - int precharge = 10; /* 10-16 */ - int preamble = 8; + u8 precharge = 10; /* 10-16 */ + u8 preamble = 8; return precharge + preamble; } @@ -793,10 +793,12 @@ void intel_dp_aux_init(struct intel_dp *intel_dp) else intel_dp->get_aux_clock_divider = g4x_get_aux_clock_divider; - if (DISPLAY_VER(i915) >= 9) + if (DISPLAY_VER(i915) >= 9) { intel_dp->get_aux_send_ctl = skl_get_aux_send_ctl; - else + intel_dp->get_aux_fw_sync_len = intel_dp_aux_fw_sync_len; + } else { intel_dp->get_aux_send_ctl = g4x_get_aux_send_ctl; + } intel_dp->aux.drm_dev = &i915->drm; drm_dp_aux_init(&intel_dp->aux); -- 2.34.1