drm/xe/mocs: Allow odd number of entries on test
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 28 Feb 2024 06:10:47 +0000 (22:10 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 1 Mar 2024 04:29:41 +0000 (20:29 -0800)
commit50a9ffe61f7da1e8a55a1802cb010902dad423c8
treef09cdb639ef4eed774f1a44923478f3a90f50f13
parent17c20e3b50c7fd03b7583d52f1a8b022dbd0750f
drm/xe/mocs: Allow odd number of entries on test

Refactor the mocs/l3cc kunit test to support odd number of entries. This
switches out from the "check the register value" approach to check the
entry value if it makes sense from the register read. This provides an
easier output to reason about and cross check with bspec.

Some code reordering and variable re-use was also done so the 2
functions follow more or less the same logic.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240228061048.3661978-5-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/tests/xe_mocs.c