diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2015-03-04 10:50:53 -0800 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-06 18:06:07 +0100 |
commit | 14a3d88a0967718124fc3b6c111a877203da025f (patch) | |
tree | 7dd13f2e4887acdaacf7fe8757b0626e53f0ae1d /tests | |
parent | b8db5d60e0f19c46142f22f9dcbe4d7b6d166b9f (diff) |
tests/kms_plane: Ensure planes recover from DPMS
i915 was using the main atomic 'disable plane' to turn off sprite planes
during a CRTC disable. This was problematic because it modified the
plane state, preventing us from recovering the original state later.
One such case was that during a DPMS OFF followed by a DPMS ON, any
sprite planes would not be restored properly.
Let's add a test that toggles DPMS off and on and ensures that the CRC
remains the same (i.e., planes are successfully restored unchanged).
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kms_plane.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/kms_plane.c b/tests/kms_plane.c index 8a08f203..b66ab1d2 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -145,6 +145,7 @@ create_fb_for_mode__position(data_t *data, drmModeModeInfo *mode, enum { TEST_POSITION_FULLY_COVERED = 1 << 0, + TEST_DPMS = 1 << 1, }; static void @@ -158,7 +159,7 @@ test_plane_position_with_output(data_t *data, igt_plane_t *primary, *sprite; struct igt_fb primary_fb, sprite_fb; drmModeModeInfo *mode; - igt_crc_t crc; + igt_crc_t crc, crc2; igt_info("Testing connector %s using pipe %s plane %d\n", igt_output_name(output), kmstest_pipe_name(pipe), plane); @@ -194,11 +195,24 @@ test_plane_position_with_output(data_t *data, igt_pipe_crc_collect_crc(data->pipe_crc, &crc); + if (flags & TEST_DPMS) { + kmstest_set_connector_dpms(data->drm_fd, + output->config.connector, + DRM_MODE_DPMS_OFF); + kmstest_set_connector_dpms(data->drm_fd, + output->config.connector, + DRM_MODE_DPMS_ON); + } + + igt_pipe_crc_collect_crc(data->pipe_crc, &crc2); + if (flags & TEST_POSITION_FULLY_COVERED) igt_assert(igt_crc_equal(&test.reference_crc, &crc)); else igt_assert(!igt_crc_equal(&test.reference_crc, &crc)); + igt_assert(igt_crc_equal(&crc, &crc2)); + igt_plane_set_fb(primary, NULL); igt_plane_set_fb(sprite, NULL); @@ -358,6 +372,11 @@ run_tests_for_pipe_plane(data_t *data, enum pipe pipe, enum igt_plane plane) kmstest_pipe_name(pipe), plane) test_plane_position(data, pipe, plane, 0); + igt_subtest_f("plane-position-hole-dpms-pipe-%s-plane-%d", + kmstest_pipe_name(pipe), plane) + test_plane_position(data, pipe, plane, + TEST_DPMS); + igt_subtest_f("plane-panning-top-left-pipe-%s-plane-%d", kmstest_pipe_name(pipe), plane) test_plane_panning(data, pipe, plane, TEST_PANNING_TOP_LEFT); |