@@ -138,6 +138,26 @@ static void test_prepare_array(struct kunit *test)
drm_exec_fini(&exec);
}
+static void test_multiple_loops(struct kunit *test)
+{
+ struct drm_exec exec;
+
+ drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
+ drm_exec_until_all_locked(&exec)
+ {
+ break;
+ }
+ drm_exec_fini(&exec);
+
+ drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
+ drm_exec_until_all_locked(&exec)
+ {
+ break;
+ }
+ drm_exec_fini(&exec);
+ KUNIT_SUCCEED(test);
+}
+
static struct kunit_case drm_exec_tests[] = {
KUNIT_CASE(sanitycheck),
KUNIT_CASE(test_lock),
@@ -145,6 +165,7 @@ static struct kunit_case drm_exec_tests[] = {
KUNIT_CASE(test_duplicates),
KUNIT_CASE(test_prepare),
KUNIT_CASE(test_prepare_array),
+ KUNIT_CASE(test_multiple_loops),
{}
};
Not really a common use case, but let's make sure that we don't accidentially break that somehow. CC: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/tests/drm_exec_test.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)