[PATCH i-g-t v3 1/2] lib/intel_blt: Add helper function to ensure platform has flat-ccs enabled
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Fri Mar 29 09:32:47 UTC 2024
On Fri, Mar 29, 2024 at 10:27:00AM -0700, Akshata Jahagirdar wrote:
> Add helper function to check if platform has flat-ccs enabled by
> reading from debugfs entry.
>
> Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
> ---
> lib/intel_blt.c | 14 ++++++++++++++
> lib/intel_blt.h | 1 +
> 2 files changed, 15 insertions(+)
>
> diff --git a/lib/intel_blt.c b/lib/intel_blt.c
> index fe0a45cb8..a5ee302c4 100644
> --- a/lib/intel_blt.c
> +++ b/lib/intel_blt.c
> @@ -464,6 +464,20 @@ bool blt_block_copy_supports_compression(int fd)
> BLT_CMD_SUPPORTS_COMPRESSION);
> }
>
> +/**
> + * blt_platform_has_flat_ccs_enabled
> + * @fd: drm fd
> + *
> + * Check if platform provided by @fd device has flat-ccs enabled.
> + *
> + * Returns:
> + * true if it does, false otherwise.
> + */
> +bool blt_platform_has_flat_ccs_enabled(int fd)
> +{
> + return igt_debugfs_search(fd, "info", "has_flat_ccs yes");
> +}
> +
> /**
> * blt_uses_extended_block_copy
> * @fd: drm fd
> diff --git a/lib/intel_blt.h b/lib/intel_blt.h
> index 1f6c71359..a2c4a4adb 100644
> --- a/lib/intel_blt.h
> +++ b/lib/intel_blt.h
> @@ -209,6 +209,7 @@ bool blt_fast_copy_supports_tiling(int fd, enum blt_tiling_type tiling);
> bool blt_block_copy_supports_tiling(int fd, enum blt_tiling_type tiling);
> bool blt_xy_src_copy_supports_tiling(int fd, enum blt_tiling_type tiling);
> bool blt_block_copy_supports_compression(int fd);
> +bool blt_platform_supports_compression(int fd);
> bool blt_uses_extended_block_copy(int fd);
>
> const char *blt_tiling_name(enum blt_tiling_type tiling);
> --
> 2.34.1
>
LGTM:
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
More information about the igt-dev
mailing list