aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tests/drm_exec_test.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2023-08-11 16:28:12 +1000
committerDave Airlie <[email protected]>2023-08-11 16:28:51 +1000
commite6b17f5ce92d769e8eb0f25d3aba3684e541309f (patch)
tree9b7fc77971bd29e7e4011f4d97cf80cb1fa61932 /drivers/gpu/drm/tests/drm_exec_test.c
parent3defb4fe3e144cb2d7db34fa3f8ff12b83b2bcba (diff)
parent2799804ac651da1375ecb9b9a644eba97218df07 (diff)
Merge tag 'drm-misc-next-2023-08-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v6.6: UAPI Changes: * nouveau: * Provide several GETPARAM ioctls * Provide VM_BIND ioctls Cross-subsystem Changes: * fbdev: Convert many drivers to fbdev I/O-memory helpers * media/vivid: Convert to fbdev I/O-memory helpers * vfio-dev/mdpy-fb: Convert to fbdev I/O-memory helpers Core Changes: * Documentation fixes * Do not select framebuffer console for fbdev emulation, fixes Kconfig dependencies * exec: * Add test cases for calling drm_exec() multiple times * Fix memory leak in sleftests * Build fixes * gem: * Fix lockdep checking * ttm: * Add Kunit tests * Cleanups Driver Changes: * atmel-hlcdc: * Support inverted pixclock polarity, required by several SoCs * bridge: * dw-hdmi: Update EDID on HDMI detection * sitronix-st7789v: Support panel orientation; Support rotation property; Add support for Jasonic JT240MHQS-HWT-EK-E3 plus DT bindings; Minor fixes * ivpu: * Support VPU4 * Refactorings * loongson: * Fixes * mcde: * Cleanups * nouveau: * Track GPU virtual memory via DRM GPUVA manager, enables Vulkan sparse binding/residency * panfrost: * Fix synchronization in IRQ handling * tve200: * Cleanups Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230810084505.GA14039@linux-uq9g
Diffstat (limited to 'drivers/gpu/drm/tests/drm_exec_test.c')
-rw-r--r--drivers/gpu/drm/tests/drm_exec_test.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tests/drm_exec_test.c b/drivers/gpu/drm/tests/drm_exec_test.c
index f79c9f0359aa..563949d777dd 100644
--- a/drivers/gpu/drm/tests/drm_exec_test.c
+++ b/drivers/gpu/drm/tests/drm_exec_test.c
@@ -125,8 +125,6 @@ static void test_duplicates(struct kunit *test)
drm_exec_fini(&exec);
}
-
-
static void test_prepare(struct kunit *test)
{
struct drm_exec_priv *priv = test->priv;
@@ -145,6 +143,8 @@ static void test_prepare(struct kunit *test)
break;
}
drm_exec_fini(&exec);
+
+ drm_gem_private_object_fini(&gobj);
}
static void test_prepare_array(struct kunit *test)
@@ -165,6 +165,29 @@ static void test_prepare_array(struct kunit *test)
1);
KUNIT_EXPECT_EQ(test, ret, 0);
drm_exec_fini(&exec);
+
+ drm_gem_private_object_fini(&gobj1);
+ drm_gem_private_object_fini(&gobj2);
+}
+
+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[] = {
@@ -174,6 +197,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),
{}
};