[PATCH 2/3] lib/amd: Return false if dp_fec or dp_dsc is not supported
Wu, Hersen
hersenxs.wu at amd.com
Mon Mar 25 11:27:22 UTC 2024
[AMD Official Use Only - General]
Reviewed-by: Hersen Wu <Hersenxs.Wu at amd.com>
-----Original Message-----
From: Hung, Alex <Alex.Hung at amd.com>
Sent: Thursday, March 21, 2024 6:48 PM
To: igt-dev at lists.freedesktop.org
Cc: Siqueira, Rodrigo <Rodrigo.Siqueira at amd.com>; Wentland, Harry <Harry.Wentland at amd.com>; Wu, Hersen <hersenxs.wu at amd.com>; Hung, Alex <Alex.Hung at amd.com>
Subject: [PATCH 2/3] lib/amd: Return false if dp_fec or dp_dsc is not supported
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