[igt-dev] [PATCH i-g-t 2/2] tests/kms_cursor_crc: Remove DPMS/suspend tests.
Maarten Lankhorst
maarten.lankhorst at linux.intel.com
Tue Mar 20 13:55:17 UTC 2018
All the tests care about are that we save cursor parameters
correctly. The new test in kms_cursor_legacy verifies that
a legacy cursor update updates all properties, so
suspend/resume and dpms would work as intended.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
tests/kms_cursor_crc.c | 42 ++----------------------------------------
1 file changed, 2 insertions(+), 40 deletions(-)
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index a164839ee2cc..de0cc0812da5 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -60,12 +60,8 @@ typedef struct {
int cursor_max_w, cursor_max_h;
igt_pipe_crc_t *pipe_crc;
uint32_t devid;
- unsigned flags;
} data_t;
-#define TEST_DPMS (1<<0)
-#define TEST_SUSPEND (1<<1)
-
static void draw_cursor(cairo_t *cr, int x, int y, int cw, int ch)
{
int wl, wr, ht, hb;
@@ -168,27 +164,6 @@ static void do_single_test(data_t *data, int x, int y)
igt_wait_for_vblank(data->drm_fd, data->pipe);
igt_pipe_crc_collect_crc(pipe_crc, &crc);
- if (data->flags & (TEST_DPMS | TEST_SUSPEND)) {
- igt_crc_t crc_after;
-
- if (data->flags & TEST_DPMS) {
- igt_debug("dpms off/on cycle\n");
- kmstest_set_connector_dpms(data->drm_fd,
- data->output->config.connector,
- DRM_MODE_DPMS_OFF);
- kmstest_set_connector_dpms(data->drm_fd,
- data->output->config.connector,
- DRM_MODE_DPMS_ON);
- }
-
- if (data->flags & TEST_SUSPEND)
- igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
- SUSPEND_TEST_NONE);
-
- igt_pipe_crc_collect_crc(pipe_crc, &crc_after);
- igt_assert_crc_equal(&crc, &crc_after);
- }
-
cursor_disable(data);
igt_display_commit(display);
@@ -319,12 +294,10 @@ static void test_crc_sliding(data_t *data)
static void test_crc_random(data_t *data)
{
- int i, max;
-
- max = data->flags & (TEST_DPMS | TEST_SUSPEND) ? 2 : 50;
+ int i;
/* Random cursor placement */
- for (i = 0; i < max; i++) {
+ for (i = 0; i < 50; i++) {
int x = rand() % (data->screenw + data->curw * 2) - data->curw;
int y = rand() % (data->screenh + data->curh * 2) - data->curh;
do_single_test(data, x, y);
@@ -585,17 +558,6 @@ static void run_test_generic(data_t *data)
run_test(data, test_crc_sliding, w, h);
igt_subtest_f("cursor-%dx%d-random", w, h)
run_test(data, test_crc_random, w, h);
- igt_subtest_f("cursor-%dx%d-dpms", w, h) {
- data->flags = TEST_DPMS;
- run_test(data, test_crc_random, w, h);
- data->flags = 0;
- }
-
- igt_subtest_f("cursor-%dx%d-suspend", w, h) {
- data->flags = TEST_SUSPEND;
- run_test(data, test_crc_random, w, h);
- data->flags = 0;
- }
igt_subtest_f("cursor-%dx%d-rapid-movement", w, h) {
run_test(data, test_rapid_movement, w, h);
--
2.16.2
More information about the igt-dev
mailing list