[PATCH 2/3] lib/amd: Return false if dp_fec or dp_dsc is not supported
Alex Hung
alex.hung at amd.com
Thu Mar 21 22:47:57 UTC 2024
Stop assertion but return accordingly when dp_fec or dp_dsc is
not supported.
Signed-off-by: Alex Hung <alex.hung at amd.com>
---
lib/igt_amd.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/igt_amd.c b/lib/igt_amd.c
index 623883dbc..a321da335 100644
--- a/lib/igt_amd.c
+++ b/lib/igt_amd.c
@@ -353,10 +353,10 @@ bool is_dp_dsc_supported(int drm_fd, char *connector_name)
}
ret = igt_debugfs_simple_read(fd, DEBUGFS_DSC_FEC_SUPPORT, buf, sizeof(buf));
- close(fd);
+ if (ret < 0)
+ igt_info("Reading %s for connector %s failed.\n", DEBUGFS_DSC_FEC_SUPPORT, connector_name);
- igt_assert_f(ret >= 0, "Reading %s for connector %s failed.\n",
- DEBUGFS_DSC_FEC_SUPPORT, connector_name);
+ close(fd);
return strstr(buf, "DSC_Sink_Support: yes");
}
@@ -380,10 +380,10 @@ bool is_dp_fec_supported(int drm_fd, char *connector_name)
}
ret = igt_debugfs_simple_read(fd, DEBUGFS_DSC_FEC_SUPPORT, buf, sizeof(buf));
- close(fd);
+ if (ret < 0)
+ igt_info("Reading %s for connector %s failed.\n", DEBUGFS_DSC_FEC_SUPPORT, connector_name);
- igt_assert_f(ret >= 0, "Reading %s for connector %s failed.\n",
- DEBUGFS_DSC_FEC_SUPPORT, connector_name);
+ close(fd);
return strstr(buf, "FEC_Sink_Support: yes");
}
--
2.34.1
More information about the igt-dev
mailing list