summaryrefslogtreecommitdiff
path: root/tests/kms_async_flips.c
diff options
context:
space:
mode:
authorBhanuprakash Modem <bhanuprakash.modem@intel.com>2023-11-25 21:50:09 +0530
committerBhanuprakash Modem <bhanuprakash.modem@intel.com>2023-11-27 11:00:35 +0530
commitb88ef1a06ad599265c3661219ea6b07028277a92 (patch)
treeb751ac9ce23d4dcabe14f640f830206b3795222a /tests/kms_async_flips.c
parent2ddd8cac90d4333943cd017319514949b047821b (diff)
tests/kms/testplan: Move testplan documentation to beginning of the file
To maintain the uniformness, move testplan documentation to beginning of the file. Move TEST block to before the #includes, and SUBTEST block to after the #includes. Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
Diffstat (limited to 'tests/kms_async_flips.c')
-rw-r--r--tests/kms_async_flips.c100
1 files changed, 49 insertions, 51 deletions
diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index f29c46645..82a8f5ef3 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -30,6 +30,7 @@
* Category: Display
* Description: Test asynchronous page flips.
*/
+
#include "igt.h"
#include "igt_aux.h"
#include "igt_psr.h"
@@ -37,6 +38,54 @@
#include <sys/time.h>
#include <poll.h>
+/**
+ * SUBTEST: alternate-sync-async-flip
+ * Description: Verify the async flip functionality and the fps during async flips
+ * Alternate between sync and async flips
+ * Driver requirement: i915, xe
+ * Functionality: async_flips, vblank
+ * Mega feature: General Display Features
+ * Test category: functionality test
+ *
+ * SUBTEST: async-flip-with-page-flip-events
+ * Description: Verify the async flip functionality and the fps during async flips
+ * Wait for page flip events in between successive asynchronous flips
+ * Driver requirement: i915, xe
+ * Functionality: async_flips, vblank
+ * Mega feature: General Display Features
+ * Test category: functionality test
+ *
+ * SUBTEST: test-time-stamp
+ * Description: Verify the async flip functionality and the fps during async flips
+ * Verify that the async flip timestamp does not coincide with either
+ * previous or next vblank
+ * Driver requirement: i915, xe
+ * Functionality: async_flips, vblank
+ * Mega feature: General Display Features
+ * Test category: functionality test
+ *
+ * SUBTEST: test-cursor
+ * Description: Verify that the DRM_IOCTL_MODE_CURSOR passes after async flip
+ * Driver requirement: i915, xe
+ * Functionality: async_flips, cursor, vblank
+ * Mega feature: General Display Features
+ * Test category: functionality test
+ *
+ * SUBTEST: crc
+ * Description: Use CRC to verify async flip scans out the correct framebuffer
+ * Driver requirement: i915, xe
+ * Functionality: async_flips, crc, vblank
+ * Mega feature: General Display Features
+ * Test category: functionality test
+ *
+ * SUBTEST: invalid-async-flip
+ * Description: Negative case to verify if changes in fb are rejected from kernel as expected
+ * Driver requirement: i915, xe
+ * Functionality: async_flips, vblank
+ * Mega feature: General Display Features
+ * Test category: functionality test
+ */
+
#define CURSOR_POS 128
/*
@@ -203,23 +252,6 @@ static void test_init_fbs(data_t *data)
igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
}
-/**
- * SUBTEST: alternate-sync-async-flip
- * Description: Verify the async flip functionality and the fps during async flips
- * Alternate between sync and async flips
- * Driver requirement: i915, xe
- * Functionality: async_flips, vblank
- * Mega feature: General Display Features
- * Test category: functionality test
- *
- * SUBTEST: async-flip-with-page-flip-events
- * Description: Verify the async flip functionality and the fps during async flips
- * Wait for page flip events in between successive asynchronous flips
- * Driver requirement: i915, xe
- * Functionality: async_flips, vblank
- * Mega feature: General Display Features
- * Test category: functionality test
- */
static void test_async_flip(data_t *data)
{
int ret, frame;
@@ -315,16 +347,6 @@ static void wait_for_vblank(data_t *data, unsigned long *vbl_time, unsigned int
*seq = wait_vbl.reply.sequence;
}
-/**
- * SUBTEST: test-time-stamp
- * Description: Verify the async flip functionality and the fps during async flips
- * Verify that the async flip timestamp does not coincide with either
- * previous or next vblank
- * Driver requirement: i915, xe
- * Functionality: async_flips, vblank
- * Mega feature: General Display Features
- * Test category: functionality test
- */
static void test_timestamp(data_t *data)
{
int flags = DRM_MODE_PAGE_FLIP_ASYNC | DRM_MODE_PAGE_FLIP_EVENT;
@@ -369,14 +391,6 @@ static void test_timestamp(data_t *data)
"Async flip time stamp is expected to be in between 2 vblank time stamps\n");
}
-/**
- * SUBTEST: test-cursor
- * Description: Verify that the DRM_IOCTL_MODE_CURSOR passes after async flip
- * Driver requirement: i915, xe
- * Functionality: async_flips, cursor, vblank
- * Mega feature: General Display Features
- * Test category: functionality test
- */
static void test_cursor(data_t *data)
{
int flags = DRM_MODE_PAGE_FLIP_ASYNC | DRM_MODE_PAGE_FLIP_EVENT;
@@ -529,14 +543,6 @@ static unsigned int clock_ms(void)
return ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
}
-/**
- * SUBTEST: crc
- * Description: Use CRC to verify async flip scans out the correct framebuffer
- * Driver requirement: i915, xe
- * Functionality: async_flips, crc, vblank
- * Mega feature: General Display Features
- * Test category: functionality test
- */
static void test_crc(data_t *data)
{
unsigned int frame = 0;
@@ -599,14 +605,6 @@ static void test_crc(data_t *data)
igt_assert_lt(data->frame_count * 2, data->flip_count);
}
-/**
- * SUBTEST: invalid-async-flip
- * Description: Negative case to verify if changes in fb are rejected from kernel as expected
- * Driver requirement: i915, xe
- * Functionality: async_flips, vblank
- * Mega feature: General Display Features
- * Test category: functionality test
- */
static void run_test(data_t *data, void (*test)(data_t *))
{
igt_display_t *display = &data->display;