[i-g-t,v1,1/5] lib/i915/fbc: fbc psr combo support check helper function

Joshi, Kunal1 kunal1.joshi at intel.com
Tue Feb 25 09:12:46 UTC 2025


Hello Vinod,

Just a suggestion if we can have some kind of identifier to refer below 
criteria added as a comment.
Without that also LGTM.
Reviewed-by: Kunal Joshi <kunal1.joshi at intel.com>

Thanks and Regards
Kunal Joshi

On 20-02-2025 17:51, Vinod Govindapillai wrote:
> Introduce a function which can check if the PSR and FBC combo
> is supported in a display version.
>
> Signed-off-by: Vinod Govindapillai <vinod.govindapillai at intel.com>
> ---
>   lib/i915/intel_fbc.c | 18 ++++++++++++++++++
>   lib/i915/intel_fbc.h |  1 +
>   2 files changed, 19 insertions(+)
>
> diff --git a/lib/i915/intel_fbc.c b/lib/i915/intel_fbc.c
> index 2096bd996..90fe5943c 100644
> --- a/lib/i915/intel_fbc.c
> +++ b/lib/i915/intel_fbc.c
> @@ -154,3 +154,21 @@ bool intel_fbc_plane_size_supported(int fd, uint32_t width, uint32_t height)
>   
>   	return width <= max_w && height <= max_h;
>   }
> +
> +/**
> + * intel_fbc_psr_combo_supported
> + *
> + * @fd: fd of the device
> + *
> + * FBC PSR combination support depends on the display version.
> + *
> + * Returns:
> + * true if FBC and PSR can be enabled together in a platform
> + */
> +bool intel_fbc_psr_combo_supported(int device)
> +{
> +	if (intel_display_ver(intel_get_drm_devid(device)) >= 20)
> +		return true;
> +
> +	return false;
> +}
> diff --git a/lib/i915/intel_fbc.h b/lib/i915/intel_fbc.h
> index 5cca5dfd9..0abd18478 100644
> --- a/lib/i915/intel_fbc.h
> +++ b/lib/i915/intel_fbc.h
> @@ -16,5 +16,6 @@ bool intel_fbc_wait_until_enabled(int device, enum pipe pipe);
>   bool intel_fbc_is_enabled(int device, enum pipe pipe, int log_level);
>   void intel_fbc_max_plane_size(int fd, uint32_t *width, uint32_t *height);
>   bool intel_fbc_plane_size_supported(int device, uint32_t width, uint32_t height);
> +bool intel_fbc_psr_combo_supported(int device);
>   
>   #endif


More information about the igt-dev mailing list