[igt-dev] [PATCH i-g-t 2/2] tests/i915/kms_dsc : Close fd after igt_display_fini execution.

Mohammed Thasleem mohammed.thasleem at intel.com
Wed Mar 9 06:46:42 UTC 2022


igt_display_reset() added in igt_display_fini which required fd to procees
further. Closing fd before igt_display_fini leads to bad fd failure,
So changing the order of close fd after igt_display_fini to avoid bad fd
failure.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
---
 tests/i915/kms_dsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index ee52ffcc..22d2216e 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -354,7 +354,7 @@ igt_main
 			drmModeFreeConnector(connector);
 		test_cleanup(&data);
 		drmModeFreeResources(res);
-		close(data.drm_fd);
 		igt_display_fini(&data.display);
+		close(data.drm_fd);
 	}
 }
-- 
2.25.1



More information about the igt-dev mailing list