Re: [PATCH v4 4/5] drm/i915/psr: Add IO buffer wake times for LunarLake and beyond

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 06, 2024 at 10:34:26AM +0200, Jouni Högander wrote:
> IO buffer wake time used for IO wake calculation is dependent on port clock
> on LunarLake and beyond. Take this into account in get_io_buffer_wake_time.
> 
> Bspec: 65450
> 
> Signed-off-by: Jouni Högander <jouni.hogander@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index e1df0ece9fa3..e8410e770da8 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1160,6 +1160,9 @@ static bool _lnl_compute_alpm_params(struct intel_dp *intel_dp,
>   * This is not directly mentioned in Bspec. There are 50 us io wake time and 32
>   * us fast wake time. Clearly preharge pulses are not (improperly) included in
>   * 32 us fast wake time. 50 us - 32 us = 18 us.
> + *
> + * For DISPLAY_VER >= 20
> + * RBR 15us, HBR1 11us, higher rates 10us
>   */
>  static int get_io_buffer_wake_time(const struct intel_crtc_state *crtc_state)
>  {
> @@ -1167,8 +1170,12 @@ static int get_io_buffer_wake_time(const struct intel_crtc_state *crtc_state)
>  
>  	if (DISPLAY_VER(i915) < 12)
>  		return 18;
> -	else
> +	else if (DISPLAY_VER(i915) < 20 || crtc_state->port_clock > 270000)
>  		return 10;
> +	else if (crtc_state->port_clock > 162000)
> +		return 11;
> +	else
> +		return 15;

That's getting rather messy. I think having separate functions for 
skl vs. tgl vs. mtl (assuming the ver==20 is mtl) would be cleaner.
And the only one of those that I think deserves a comment is skl since 
there we don't get a proper value from bspec directly.

>  }
>  
>  static bool _compute_alpm_params(struct intel_dp *intel_dp,
> -- 
> 2.34.1

-- 
Ville Syrjälä
Intel



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux