[igt-dev] [PATCH v2 i-g-t 23/23] tests/kms_dp_dsc: Read the debugfs only once

venkata.sai.patnana at intel.com venkata.sai.patnana at intel.com
Thu Jun 3 14:40:22 UTC 2021


From: Patnana Venkata Sai <venkata.sai.patnana at intel.com>

Instead of doing a debugfs_simple_read and then
a debugfs_read(), lets read the debugfs node just once.
We anyway get the suitable return from the following
strstr operation

v2: using igt_debugfs_simple_read instead igt_debugfs_read (karthik)
v3: using igt_debugfs_read to instead igt_debugfs_simple_read

Signed-off-by: Patnana Venkata Sai <venkata.sai.patnana at intel.com>
Cc: Karthik B S <karthik.b.s at intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni at intel.com>
Cc: Navare Manasi D <manasi.d.navare at intel.com>
---
 tests/kms_dp_dsc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
index 2446fd82bb..8bd2102447 100644
--- a/tests/kms_dp_dsc.c
+++ b/tests/kms_dp_dsc.c
@@ -80,8 +80,6 @@ static bool is_dp_dsc_supported(data_t *data)
 
 	strcpy(file_name, data->conn_name);
 	strcat(file_name, "/i915_dsc_fec_support");
-	igt_require(igt_debugfs_simple_read(data->debugfs_fd, file_name, buf,
-					    sizeof(buf)) > 0);
 	igt_debugfs_read(data->drm_fd, file_name, buf);
 
 	return strstr(buf, "DSC_Sink_Support: yes");
-- 
2.25.1



More information about the igt-dev mailing list