diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-10-13 14:04:38 +0200 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-10-23 12:11:51 +0200 |
commit | cdfe992134b478b76e0763773e9d4e82bba5b98f (patch) | |
tree | 8f96ed9c6bd8ba6fbe8b40b8082c9b50f47ca84a /lib/igt_kms.c | |
parent | 9ba736aecc2a3cb34a2aeec8d417f66390e0c82b (diff) |
tests/kms_plane_lowres: Rework tests to work without fbcon, v3.
kmstest_get_crtc was skipping because at that point the crtc was not
active yet, instead we should only use igt_assert_plane_visible
directly. Unexport kmstest_get_crtc, since nothing here should need it.
While at it fix a small leak in igt_assert_plane_visible, the only
remaining user.
Additionally, it' s not allowed to obtain crc on a disabled pipe, so
wait until the pipe is enabled before allocating the crc.
Changes since v1:
- Move igt_pipe_crc_new until after pipe is enabled.
- Move test_init() into test_setup(), it's redundant..
- Remove pipe_crc from data, no need to have it there.
Changes since v2:
- Increment fb pointer for igt_plane_set_fb, in order to set a different
fb on each plane correctly.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index cb2bc2b8..1c50484a 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1416,7 +1416,7 @@ static void parse_crtc(char *info, struct kmstest_crtc *crtc) igt_assert_eq(ret, 2); } -void kmstest_get_crtc(int device, enum pipe pipe, struct kmstest_crtc *crtc) +static void kmstest_get_crtc(int device, enum pipe pipe, struct kmstest_crtc *crtc) { char tmp[256]; FILE *file; @@ -1460,7 +1460,7 @@ void kmstest_get_crtc(int device, enum pipe pipe, struct kmstest_crtc *crtc) fclose(file); close(fd); - igt_skip_on(ncrtc == 0); + igt_assert(ncrtc == 1); } void igt_assert_plane_visible(int fd, enum pipe pipe, bool visibility) @@ -1485,6 +1485,7 @@ void igt_assert_plane_visible(int fd, enum pipe pipe, bool visibility) } } + free(crtc.planes); igt_assert_eq(visible, visibility); } |