[igt-dev] [[RFC] PATCH i-g-t 1/2] lib/drmtest: Don't write ffffffff to a numeric param

Mohammed Khajapasha mohammed.khajapasha at intel.com
Wed Jun 10 19:11:45 UTC 2020


From: Petri Latvala <petri.latvala at intel.com>

__cancel_work_at_exit writes -1 to param "reset", with the intention
that it's "any available method". Hex values to numeric params should
be prefixed with 0x to be parsed as a number. Use the convention of %u
with -1 as is used elsewhere with the "reset" param.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 lib/drmtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index e4e710d4..c732d1dd 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -478,7 +478,7 @@ static void __cancel_work_at_exit(int fd)
 {
 	igt_terminate_spins(); /* for older kernels */
 
-	igt_params_set(fd, "reset", "%x", -1u /* any method */);
+	igt_params_set(fd, "reset", "%u", -1u /* any method */);
 	igt_drop_caches_set(fd,
 			    /* cancel everything */
 			    DROP_RESET_ACTIVE | DROP_RESET_SEQNO |
-- 
2.24.1



More information about the igt-dev mailing list