Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/4] lib/amd: improve MALL capabilities checking logic
@ 2023-11-02 19:59 Aurabindo Pillai
  2023-11-02 19:59 ` [igt-dev] [PATCH i-g-t 2/4] lib/amd: Add check for SubVP feature status Aurabindo Pillai
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Aurabindo Pillai @ 2023-11-02 19:59 UTC (permalink / raw)
  To: igt-dev

improve strstr() arguments to be more accurate when
multiple features are exposed in DM capabilities end point

Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
---
 lib/igt_amd.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/igt_amd.c b/lib/igt_amd.c
index 84c6d7545..85afec99e 100644
--- a/lib/igt_amd.c
+++ b/lib/igt_amd.c
@@ -45,6 +45,12 @@
 #define Y6 64
 #define Y7 128
 
+#define SUPP "supported: yes"
+#define EN ", enabled: yes"
+
+#define MALL_SUPP "mall " SUPP
+#define MALL_EN MALL_SUPP EN
+
 struct dim2d
 {
     int w;
@@ -1197,11 +1203,11 @@ void igt_amd_get_mall_status(int drm_fd, bool *supported, bool *enabled)
 	if (!get_dm_capabilities(drm_fd, buf, 1024))
 		return;
 
-	mall_loc = strstr(buf, "mall supported: yes");
+	mall_loc = strstr(buf, MALL_SUPP);
 	if (mall_loc)
 		*supported = true;
 
-	mall_loc = strstr(buf, "enabled: yes");
+	mall_loc = strstr(buf, MALL_EN);
 	if (mall_loc && *supported)
 		*enabled = true;
 }
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-11-03 18:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-02 19:59 [igt-dev] [PATCH i-g-t 1/4] lib/amd: improve MALL capabilities checking logic Aurabindo Pillai
2023-11-02 19:59 ` [igt-dev] [PATCH i-g-t 2/4] lib/amd: Add check for SubVP feature status Aurabindo Pillai
2023-11-02 19:59 ` [igt-dev] [PATCH i-g-t 3/4] lib/amd: Update function documentation Aurabindo Pillai
2023-11-02 20:00 ` [igt-dev] [PATCH i-g-t 4/4] test/amdgpu: Add test for Sub-viewport Aurabindo Pillai
2023-11-03  9:21   ` Kamil Konieczny
2023-11-03 18:23     ` Aurabindo Pillai
2023-11-02 20:55 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] lib/amd: improve MALL capabilities checking logic Patchwork
2023-11-02 21:32 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-03 17:11 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox