drm/xe/mocs: Move warn/assertion up
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 28 Feb 2024 06:10:46 +0000 (22:10 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 1 Mar 2024 04:29:41 +0000 (20:29 -0800)
commit17c20e3b50c7fd03b7583d52f1a8b022dbd0750f
treec5e82d5471f5a5f271c5cadd10adb684d49cbf11
parentd40c6c45fbe7aeb7e773b786b4ec010d5d40367d
drm/xe/mocs: Move warn/assertion up

The warn-once in __init_mocs_table() to make sure there's an index set
for unused entries is more a sanity check that should be done as the
first thing in that function. The kunit test replicates the same check,
so also move it up and turn it into a failure condition for the test.

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