[igt-dev] [PATCH i-g-t 01/12] lib/xe_query: Use vramN when returning string region name

Karolina Stolarek karolina.stolarek at intel.com
Wed Jul 5 10:58:56 UTC 2023


Hi Zbigniew,

On 4.07.2023 11:00, Zbigniew Kempczyński wrote:
> For tests which are mixing regions (like xe_ccs) name is confusing.
> As an example might be example "subtest-name-vram-1-vram-1". It's
> more readable when it will be renamed to "subtest-name-vram1-vram1".

Sounds good, but I wonder how it maps to the convention used in other 
tests. In gem_ccs, iirc, we had "smem" and "lmemN". Could we reuse it here?

All the best,
Karolina

> 
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> ---
>   lib/xe/xe_query.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/xe/xe_query.c b/lib/xe/xe_query.c
> index 48fb5afba7..830b7e401d 100644
> --- a/lib/xe/xe_query.c
> +++ b/lib/xe/xe_query.c
> @@ -445,7 +445,7 @@ struct drm_xe_query_mem_region *xe_mem_region(int fd, uint64_t region)
>    * xe_region_name:
>    * @region: region mask
>    *
> - * Returns region string like "system" or "vram-n" where n=0...62.
> + * Returns region string like "system" or "vramN" where N=0...62.
>    */
>   const char *xe_region_name(uint64_t region)
>   {
> @@ -457,7 +457,7 @@ const char *xe_region_name(uint64_t region)
>   		vrams = calloc(64, sizeof(char *));
>   		for (int i = 0; i < 64; i++) {
>   			if (i != 0)
> -				asprintf(&vrams[i], "vram-%d", i - 1);
> +				asprintf(&vrams[i], "vram%d", i - 1);
>   			else
>   				asprintf(&vrams[i], "system");
>   			igt_assert(vrams[i]);


More information about the igt-dev mailing list