]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/kunit: Fix forcewake assertion in mocs test
authorMatt Roper <matthew.d.roper@intel.com>
Thu, 13 Nov 2025 23:40:39 +0000 (15:40 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Fri, 14 Nov 2025 16:53:37 +0000 (08:53 -0800)
commit9be4f0f687048ba77428ceca11994676736507b7
tree4d02c68d0caef445cf831abf76ea7745b8c9e20c
parent562b0f254d8b1515a1c8d2a650f940d4f719300e
drm/xe/kunit: Fix forcewake assertion in mocs test

The MOCS kunit test calls KUNIT_ASSERT_TRUE_MSG() with a condition of
'true;' this prevents the assertion from ever failing.  Replace
KUNIT_ASSERT_TRUE_MSG with KUNIT_FAIL_AND_ABORT to get the intended
failure behavior in cases where forcewake was not acquired successfully.

Fixes: 51c0ee84e4dc ("drm/xe/tests/mocs: Hold XE_FORCEWAKE_ALL for LNCF regs")
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://patch.msgid.link/20251113234038.2256106-2-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/tests/xe_mocs.c