summaryrefslogtreecommitdiff
path: root/tests/kms_setmode.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-02 11:00:50 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-02-12 13:13:01 +0100
commitaa5068c58947f31252cad69d80686e40bbce29db (patch)
tree557e4984186b3b5abc17b8d1980190e1b4c9c233 /tests/kms_setmode.c
parente62de1c7c4ecde0bea5256faec0e8793810f9410 (diff)
tests: Always call igt_remove_fb without checking.
This cleans up the tests slightly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com> Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
Diffstat (limited to 'tests/kms_setmode.c')
-rw-r--r--tests/kms_setmode.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 06241b19..47d04fb5 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -361,6 +361,9 @@ static void cleanup_crtcs(struct crtc_config *crtcs, int crtc_count)
int i;
for (i = 0; i < crtc_count; i++) {
+ igt_remove_fb(drm_fd, &crtcs[i].fb_info);
+ drmModeSetCrtc(drm_fd, crtcs[i].crtc_id, 0, 0, 0, NULL, 0, NULL);
+
free(crtcs[i].cconfs);
}
}
@@ -577,15 +580,6 @@ static void test_crtc_config(const struct test_config *tconf,
if (ret == 0 && tconf->flags & TEST_TIMINGS)
check_timings(crtcs[0].crtc_idx, &crtcs[0].mode);
- for (i = 0; i < crtc_count; i++) {
- if (crtcs[i].fb_info.fb_id) {
- drmModeSetCrtc(drm_fd, crtcs[i].crtc_id, 0, 0, 0, NULL,
- 0, NULL);
- drmModeRmFB(drm_fd, crtcs[i].fb_info.fb_id);
- crtcs[i].fb_info.fb_id = 0;
- }
- }
-
return;
}