[PATCH v2 1/1] drm/xe/xe2: Send flat_ccs value in struct drm_xe_query_config
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Tue Mar 26 05:53:01 UTC 2024
On Tue, Mar 26, 2024 at 03:10:31AM -0700, Akshata Jahagirdar wrote:
> Currently, we don't have any check in IGT testcases if platform supports
> compression or not. Send this flat_ccs value as part of the struct
> drm_xe_query_config so that we can read this value in the igt testcases
> and proceed accordingly.
> Fixes: VLK-56136
Drop this id.
>
> Signed-off-by: Akshata Jahagirdar <akshata.jahagirdar at intel.com>
> ---
> drivers/gpu/drm/xe/xe_query.c | 3 +++
> include/uapi/drm/xe_drm.h | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
> index e80321b34918..8a3a3117491c 100644
> --- a/drivers/gpu/drm/xe/xe_query.c
> +++ b/drivers/gpu/drm/xe/xe_query.c
> @@ -332,6 +332,9 @@ static int query_config(struct xe_device *xe, struct drm_xe_device_query *query)
> config->num_params = num_params;
> config->info[DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID] =
> xe->info.devid | (xe->info.revid << 16);
> + if (xe->info.has_flat_ccs)
> + config->info[DRM_XE_QUERY_CONFIG_FLAGS] =
> + DRM_XE_QUERY_CONFIG_FLAG_HAS_FLAT_CCS;
> if (xe_device_get_root_tile(xe)->mem.vram.usable_size)
> config->info[DRM_XE_QUERY_CONFIG_FLAGS] =
> DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM;
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index f44a19ae9333..08783234bae1 100644
> --- a/include/uapi/drm/xe_drm.h
> +++ b/include/uapi/drm/xe_drm.h
> @@ -405,6 +405,7 @@ struct drm_xe_query_config {
> #define DRM_XE_QUERY_CONFIG_REV_AND_DEVICE_ID 0
> #define DRM_XE_QUERY_CONFIG_FLAGS 1
> #define DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM (1 << 0)
> + #define DRM_XE_QUERY_CONFIG_FLAG_HAS_FLAT_CCS (1 << 1)
> #define DRM_XE_QUERY_CONFIG_MIN_ALIGNMENT 2
> #define DRM_XE_QUERY_CONFIG_VA_BITS 3
> #define DRM_XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY 4
> --
> 2.34.1
>
Code looks correct imo, but you should get an ack for that
uapi change, so from me (with commit msg fixed):
Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
More information about the Intel-xe
mailing list