All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t 0/3] Default fence expiration test
@ 2021-03-18 16:23 ` Tvrtko Ursulin
  0 siblings, 0 replies; 14+ messages in thread
From: Tvrtko Ursulin @ 2021-03-18 16:23 UTC (permalink / raw)
  To: igt-dev; +Cc: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

See patch 2.

Tvrtko Ursulin (3):
  lib: Add helper for reading modparam values
  tests/i915: Default fence expiry test
  tests/i915/gem_watchdog: Exercise long rendering chains

 lib/igt_params.c          |  26 ++
 lib/igt_params.h          |   2 +
 tests/Makefile.sources    |   3 +
 tests/i915/gem_watchdog.c | 686 ++++++++++++++++++++++++++++++++++++++
 tests/meson.build         |   1 +
 5 files changed, 718 insertions(+)
 create mode 100644 tests/i915/gem_watchdog.c

-- 
2.27.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [Intel-gfx] [PATCH i-g-t 1/3] lib: Add helper for reading modparam values
@ 2021-03-31 11:02 Tvrtko Ursulin
  2021-03-31 11:02 ` [Intel-gfx] [PATCH i-g-t 2/3] tests/i915: Default fence expiry test Tvrtko Ursulin
  0 siblings, 1 reply; 14+ messages in thread
From: Tvrtko Ursulin @ 2021-03-31 11:02 UTC (permalink / raw)
  To: igt-dev; +Cc: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Add __igt_params_get for simple reading of modparams.

v2:
 * Fix kerneldoc. (Matt)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
 lib/igt_params.c | 26 ++++++++++++++++++++++++++
 lib/igt_params.h |  2 ++
 2 files changed, 28 insertions(+)

diff --git a/lib/igt_params.c b/lib/igt_params.c
index c06416988baa..3dad317a56b2 100644
--- a/lib/igt_params.c
+++ b/lib/igt_params.c
@@ -156,6 +156,32 @@ int igt_params_open(int device)
 	return params;
 }
 
+/**
+ * __igt_params_get:
+ * @device: fd of the device
+ * @parameter: the name of the parameter to get
+ *
+ * This reads the value of the modparam.
+ *
+ * Returns:
+ * A nul-terminated string, must be freed by caller after use, or NULL
+ * on failure.
+ */
+char *__igt_params_get(int device, const char *parameter)
+{
+	char *str;
+	int dir;
+
+	dir = igt_params_open(device);
+	if (dir < 0)
+		return NULL;
+
+	str = igt_sysfs_get(dir, parameter);
+	close(dir);
+
+	return str;
+}
+
 __attribute__((format(printf, 3, 0)))
 static bool __igt_params_set(int device, const char *parameter,
 			     const char *fmt, va_list ap, bool save)
diff --git a/lib/igt_params.h b/lib/igt_params.h
index bbd6f3ee6582..6494786f0696 100644
--- a/lib/igt_params.h
+++ b/lib/igt_params.h
@@ -28,6 +28,8 @@
 
 int igt_params_open(int device);
 
+char *__igt_params_get(int device, const char *parameter);
+
 __attribute__((format(printf, 3, 4)))
 bool igt_params_set(int device, const char *parameter, const char *fmt, ...);
 
-- 
2.27.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2021-03-31 11:02 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 16:23 [Intel-gfx] [PATCH i-g-t 0/3] Default fence expiration test Tvrtko Ursulin
2021-03-18 16:23 ` [igt-dev] " Tvrtko Ursulin
2021-03-18 16:23 ` [Intel-gfx] [PATCH i-g-t 1/3] lib: Add helper for reading modparam values Tvrtko Ursulin
2021-03-18 16:23   ` [igt-dev] " Tvrtko Ursulin
2021-03-30 10:49   ` [Intel-gfx] " Matthew Auld
2021-03-30 10:49     ` Matthew Auld
2021-03-18 16:23 ` [Intel-gfx] [PATCH i-g-t 2/3] tests/i915: Default fence expiry test Tvrtko Ursulin
2021-03-30 12:53   ` Matthew Auld
2021-03-18 16:24 ` [Intel-gfx] [PATCH i-g-t 3/3] tests/i915/gem_watchdog: Exercise long rendering chains Tvrtko Ursulin
2021-03-18 16:24   ` [igt-dev] " Tvrtko Ursulin
2021-03-30 15:40   ` [Intel-gfx] " Matthew Auld
2021-03-18 17:57 ` [igt-dev] ✓ Fi.CI.BAT: success for Default fence expiration test (rev2) Patchwork
2021-03-18 22:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-03-31 11:02 [Intel-gfx] [PATCH i-g-t 1/3] lib: Add helper for reading modparam values Tvrtko Ursulin
2021-03-31 11:02 ` [Intel-gfx] [PATCH i-g-t 2/3] tests/i915: Default fence expiry test Tvrtko Ursulin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.