drm/xe: Add KUnit test for xe_pci.c IP engine lists
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 6 Apr 2023 23:56:20 +0000 (16:56 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:31:40 +0000 (18:31 -0500)
commit3713ed52ef2bc9272afdd195fe24b011a4dcd44d
treef72a684390d1d870fbe5e2fb383b0f78aa6fbd41
parent5822bba943ad2ecb386e8a27614e753ad7e285fa
drm/xe: Add KUnit test for xe_pci.c IP engine lists

Add a simple KUnit test to ensure that the hardware engine lists for
GMD_ID IP definitions are sensible (i.e., no graphics engines defined
for the media IP and vice versa).

Only the IP descriptors for GMD_ID platforms are checked for now.
Presumably the engine lists on older pre-GMD_ID platforms shouldn't be
changing.  We can extend the KUnit testing in the future if we decide we
want to check those as well.

v2:
 - Add missing 'const' in xe_call_for_each_media_ip to avoid compiler
   warning.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230406235621.1914492-9-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/tests/Makefile
drivers/gpu/drm/xe/tests/xe_pci.c
drivers/gpu/drm/xe/tests/xe_pci_test.c [new file with mode: 0644]
drivers/gpu/drm/xe/tests/xe_pci_test.h