From a98a8c35b0ad2cd9c3f357eb2ed4143c37e4c333 Mon Sep 17 00:00:00 2001 From: Christophe Priouzeau Date: Thu, 9 Sep 2021 14:56:46 +0200 Subject: [PATCH 4/4] tests/modetest: close crtc To test several configuration of crtc, it must be closed at the end of modetest test (with/without atomic mode). Signed-off-by: Yannick Fertre --- tests/modetest/modetest.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index 215f2ab..7c92702 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -2295,6 +2295,10 @@ int main(int argc, char **argv) if (plane_count) atomic_clear_FB(&dev, plane_args, plane_count); + + for (i = 0; i < count; i++) + drmModeSetCrtc(dev.fd, dev.resources->crtcs[i].crtc->crtc_id, + 0, 0, 0, 0, 0, NULL); } drmModeAtomicFree(dev.req); @@ -2333,6 +2337,11 @@ int main(int argc, char **argv) if (set_preferred || count) clear_mode(&dev); + + for (i = 0; i < count; i++) + drmModeSetCrtc(dev.fd, dev.resources->crtcs[i].crtc->crtc_id, + 0, 0, 0, 0, 0, NULL); + } } -- 2.25.1