[igt-dev] [i-g-t 3/6] lib/xe/xe_query: Add xe_config() interface

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Tue May 9 07:21:58 UTC 2023



On Thu-04-05-2023 10:27 am, Bhanuprakash Modem wrote:
> Add support to get XE configuration from xe_device.
> 
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Cc: Janga Rahul Kumar <janga.rahul.kumar at intel.com>
> ---
>   lib/xe/xe_query.c | 8 ++++++++
>   lib/xe/xe_query.h | 1 +
>   2 files changed, 9 insertions(+)
> 
> diff --git a/lib/xe/xe_query.c b/lib/xe/xe_query.c
> index bd5eb1d18..d254a23cb 100644
> --- a/lib/xe/xe_query.c
> +++ b/lib/xe/xe_query.c
> @@ -479,6 +479,14 @@ uint32_t xe_min_page_size(int fd, uint64_t region)
>   	return xe_mem_region(fd, region)->min_page_size;
>   }
>   
> +/**
> + * xe_config:
> + * @fd: xe device fd
> + *
> + * Returns xe configuration of xe device @fd.
> + */
> +xe_dev_FN(xe_config, config, struct drm_xe_query_config *);
> +
>   /**
>    * xe_number_hw_engine:
>    * @fd: xe device fd
> diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
> index cc6e7cefd..63f32ca92 100644
> --- a/lib/xe/xe_query.h
> +++ b/lib/xe/xe_query.h
> @@ -86,6 +86,7 @@ struct drm_xe_engine_class_instance *xe_hw_engine(int fd, int idx);
>   struct drm_xe_query_mem_region *xe_mem_region(int fd, uint64_t region);
>   const char *xe_region_name(uint64_t region);
>   uint32_t xe_min_page_size(int fd, uint64_t region);
> +struct drm_xe_query_config *xe_config(int fd);
>   unsigned int xe_number_hw_engines(int fd);
>   bool xe_has_vram(int fd);
>   uint64_t xe_vram_size(int fd, int gt);


More information about the igt-dev mailing list