Commit c3524759 authored by Rodrigo Vivi's avatar Rodrigo Vivi

test/kms_psr_sink_crc: Add dpms off/on tests.

Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 782d5e7a
......@@ -525,6 +525,15 @@ static void setup_test_plane(data_t *data)
igt_display_commit(&data->display);
}
static void dpms_off_on(data_t data)
{
kmstest_set_connector_dpms(data.drm_fd, data.output->config.connector,
DRM_MODE_DPMS_OFF);
sleep(1);
kmstest_set_connector_dpms(data.drm_fd, data.output->config.connector,
DRM_MODE_DPMS_ON);
}
static int opt_handler(int opt, int opt_index)
{
switch (opt) {
......@@ -600,6 +609,30 @@ int main(int argc, char *argv[])
}
}
igt_subtest_f("dpms_off_psr_active") {
data.test_plane = PRIMARY;
data.op = RENDER;
setup_test_plane(&data);
igt_assert(wait_psr_entry(&data));
dpms_off_on(data);
run_test(&data);
test_cleanup(&data);
}
igt_subtest_f("dpms_off_psr_exit") {
data.test_plane = SPRITE;
data.op = PLANE_ONOFF;
setup_test_plane(&data);
dpms_off_on(data);
igt_assert(wait_psr_entry(&data));
run_test(&data);
test_cleanup(&data);
}
igt_fixture {
drm_intel_bufmgr_destroy(data.bufmgr);
display_fini(&data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment