Thread (23 messages) 23 messages, 5 authors, 2021-10-08

Re: [igt-dev] [PATCH i-g-t] tests/kms_psr2_sf: Skip tests if selected fetch is not available

From: B, Jeevan <hidden>
Date: 2021-09-30 09:55:50

Looks good to me. 
-----Original Message-----
From: igt-dev <redacted> On Behalf Of Vidya
Srinivas
Sent: Thursday, September 16, 2021 7:30 PM
To: igt-dev@lists.freedesktop.org
Cc: Modem, Bhanuprakash <redacted>;
markyacoub@google.com; Srinivas, Vidya [off-list ref]
Subject: [igt-dev] [PATCH i-g-t] tests/kms_psr2_sf: Skip tests if selected fetch is
not available

Currently the tests are failing on systems where selected fetch feature is not
availble. Kernel returns -EINVAL when the test executes reporting "Invalid debug
mask 4".
Patch skips if selected fetch feature is not available in the kernel.

v2: Incorportated Mark Yacoub's comments.
Changed igt_skip to igt_require_f

Signed-off-by: Vidya Srinivas <redacted>
Reviewed-by: Jeevan B	<redacted>
quoted hunk ↗ jump to hunk
---
lib/igt_psr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/igt_psr.c b/lib/igt_psr.c index 68240f9a33b4..0af503fb796e 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -167,7 +167,7 @@ static bool psr_set(int device, int debugfs_fd, int mode)
		}

		ret = psr_write(debugfs_fd, debug_val);
-		igt_assert(ret > 0);
+		igt_require_f(ret == 0, "PSR2 SF feature not available\n");
	}

	/* Restore original value on exit */
--
2.33.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help