drm/xe/uapi: Document the memory_region bitmask
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 15 Dec 2023 15:45:48 +0000 (15:45 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:47:01 +0000 (11:47 -0500)
commit535881a8c50b79085327e7dbe26a4c55f3e1591b
treef1e9019c5ec063613c0910b0b9c7fdfc9011612b
parent4b437893a826b2f1d15f73e72506349656ea14b2
drm/xe/uapi: Document the memory_region bitmask

The uAPI should stay generic in regarding to the bitmask. It is
the userspace responsibility to check for the type/class of the
memory, without any assumption.

Also add comments inside the code to explain how it is actually
constructed so we don't accidentally change the assignment of
the instance and the masks.

No functional change in this patch. It only explains and document
the memory_region masks. A further follow-up work with the
organization of all memory regions around struct xe_mem_regions
is desired, but not part of this patch.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Mateusz Naklicki <mateusz.naklicki@intel.com>
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
drivers/gpu/drm/xe/xe_query.c
include/uapi/drm/xe_drm.h