summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Lankhorst <dev@lankhorst.se>2026-03-04 09:56:16 +0100
committerMaarten Lankhorst <dev@lankhorst.se>2026-03-04 11:31:54 +0100
commita58d487fb1a52579d3c37544ea371da78ed70c45 (patch)
tree9dffb4a19c7cc8e14e755b693f65be718dc94fb3
parent61ded1083b264ff67ca8c2de822c66b6febaf9a8 (diff)
drm/ttm/tests: Fix build failure on PREEMPT_RT
Fix a compile error in the kunit tests when CONFIG_PREEMPT_RT is enabled, and the normal mutex is converted into a rtmutex. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202602261547.3bM6yVAS-lkp@intel.com/ Reviewed-by: Jouni Högander <jouni.hogander@intel.com> Link: https://patch.msgid.link/20260304085616.1216961-1-dev@lankhorst.se Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
-rw-r--r--drivers/gpu/drm/ttm/tests/ttm_bo_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
index d468f8322072..f3103307b5df 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_bo_test.c
@@ -222,13 +222,13 @@ static void ttm_bo_reserve_interrupted(struct kunit *test)
KUNIT_FAIL(test, "Couldn't create ttm bo reserve task\n");
/* Take a lock so the threaded reserve has to wait */
- mutex_lock(&bo->base.resv->lock.base);
+ dma_resv_lock(bo->base.resv, NULL);
wake_up_process(task);
msleep(20);
err = kthread_stop(task);
- mutex_unlock(&bo->base.resv->lock.base);
+ dma_resv_unlock(bo->base.resv);
KUNIT_ASSERT_EQ(test, err, -ERESTARTSYS);
}