From 0eb4d05ea1148672086972e5dc2506a8d2002ce6 Mon Sep 17 00:00:00 2001 From: Dhinakaran Pandiyan Date: Wed, 5 Sep 2018 14:15:56 -0700 Subject: tests/psr: Avoid opening of already open debugfs dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tests calls igt_debugfs_dir() to open the debugfs dir and further along calls igt_debugfs_read() each time i915_edp_psr_status needs to be read. As igt_debugfs_read() opens the directory unnecessarily, switch to using the newly added igt_debugfs_simple_read() v2: Commit message typo (Jose) Signed-off-by: Dhinakaran Pandiyan Reviewed-by: José Roberto de Souza --- tests/kms_frontbuffer_tracking.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/kms_frontbuffer_tracking.c') diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index eab84926..e9abceb6 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1632,7 +1632,8 @@ static void do_status_assertions(int flags) if (flags & ASSERT_PSR_ENABLED) igt_assert_f(psr_wait_entry(drm.fd), "PSR still disabled\n"); else if (flags & ASSERT_PSR_DISABLED) - igt_assert_f(psr_active(drm.fd, false), "PSR still enabled\n"); + igt_assert_f(psr_active(drm.debugfs, false), + "PSR still enabled\n"); } static void __do_assertions(const struct test_mode *t, int flags, -- cgit v1.2.3