]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Dec 2025 10:45:57 +0000 (11:45 +0100)
commit123d4cc167bae587dd9107e078c4abd6aa8bd5f3
treea807c8c12c9b2f12b9c5734af9ae0cb29d227525
parent5d60c61d6db1bf0d77bf730650587a75538fb293
drm/xe/kunit: Fix forcewake assertion in mocs test

[ Upstream commit 905a3468ec679293949438393de7e61310432662 ]

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>
(cherry picked from commit 9be4f0f687048ba77428ceca11994676736507b7)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/xe/tests/xe_mocs.c