diff mbox series

[v6,13/26] drm/i915/psr: Check vblank against IO buffer wake time on Lunarlake

Message ID 20240605102553.187309-14-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series Panel Replay eDP support | expand

Commit Message

Hogander, Jouni June 5, 2024, 10:25 a.m. UTC
As Lunarlake doesn't have block count configuration vblank should be
checked against IO buffer wake time.

Bspec: 68920

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Manna, Animesh June 6, 2024, 2:55 p.m. UTC | #1
> -----Original Message-----
> From: Hogander, Jouni <jouni.hogander@intel.com>
> Sent: Wednesday, June 5, 2024 3:56 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Manna, Animesh <animesh.manna@intel.com>; Kahola, Mika
> <mika.kahola@intel.com>; Hogander, Jouni <jouni.hogander@intel.com>
> Subject: [PATCH v6 13/26] drm/i915/psr: Check vblank against IO buffer wake
> time on Lunarlake
> 
> As Lunarlake doesn't have block count configuration vblank should be
> checked against IO buffer wake time.
> 
> Bspec: 68920
> 
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>

Reviewed-by: Animesh Manna <animesh.manna@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 471b60032304..c9fcb25184ee 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1246,9 +1246,13 @@ static int intel_psr_entry_setup_frames(struct
> intel_dp *intel_dp,  static bool vblank_length_valid(struct intel_dp *intel_dp,
>  				const struct intel_crtc_state *crtc_state)  {
> +	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
>  	int vblank = crtc_state->hw.adjusted_mode.crtc_vblank_end -
>  		crtc_state->hw.adjusted_mode.crtc_vblank_start;
> -	int wake_lines = psr2_block_count_lines(intel_dp);
> +	int wake_lines;
> +
> +	wake_lines = DISPLAY_VER(i915) < 20 ?
> psr2_block_count_lines(intel_dp) :
> +		intel_dp->alpm_parameters.io_wake_lines;
> 
>  	if (crtc_state->req_psr2_sdp_prior_scanline)
>  		vblank -= 1;
> --
> 2.34.1
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 471b60032304..c9fcb25184ee 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1246,9 +1246,13 @@  static int intel_psr_entry_setup_frames(struct intel_dp *intel_dp,
 static bool vblank_length_valid(struct intel_dp *intel_dp,
 				const struct intel_crtc_state *crtc_state)
 {
+	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
 	int vblank = crtc_state->hw.adjusted_mode.crtc_vblank_end -
 		crtc_state->hw.adjusted_mode.crtc_vblank_start;
-	int wake_lines = psr2_block_count_lines(intel_dp);
+	int wake_lines;
+
+	wake_lines = DISPLAY_VER(i915) < 20 ? psr2_block_count_lines(intel_dp) :
+		intel_dp->alpm_parameters.io_wake_lines;
 
 	if (crtc_state->req_psr2_sdp_prior_scanline)
 		vblank -= 1;