drm/xe/uapi: Align on a common way to return arrays (memory regions)
authorFrancois Dugast <francois.dugast@intel.com>
Wed, 22 Nov 2023 14:38:24 +0000 (14:38 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:45:16 +0000 (11:45 -0500)
commit4bc9dd98e0a7e8a14386fc8341379ee09e594987
tree000c2146edb15ac5915976798d695a6ea55455bd
parent4e03b584143e18eabd091061a1716515da928dcb
drm/xe/uapi: Align on a common way to return arrays (memory regions)

The uAPI provides queries which return arrays of elements. As of now
the format used in the struct is different depending on which element
is queried. Fix this for memory regions by applying the pattern below:

    struct drm_xe_query_Xs {
       __u32 num_Xs;
       struct drm_xe_X Xs[];
       ...
    }

This removes "query" in the name of struct drm_xe_query_mem_region
as it is not returned from the query IOCTL. There is no functional
change.

v2: Only rename drm_xe_query_mem_region to drm_xe_mem_region
    (José Roberto de Souza)

v3: Rename usage to mem_regions in xe_query.c (José Roberto de Souza)

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_query.c
include/uapi/drm/xe_drm.h