All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion
@ 2020-05-19  6:34 Chris Wilson
  2020-05-19  6:34 ` [igt-dev] [PATCH i-g-t 2/3] Always pass device to igt_params_set Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Chris Wilson @ 2020-05-19  6:34 UTC (permalink / raw)
  To: igt-dev; +Cc: Chris Wilson

The debugfs modparams are more picky and refuse to do the implicit
unsigned conversion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_ctx_persistence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index ce9f02350..4a1ef0f27 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -1127,7 +1127,7 @@ igt_main
 		igt_require_gem(i915);
 
 		/* Restore the reset modparam if left clobbered */
-		igt_assert(igt_params_set(i915, "reset", "%d", -1));
+		igt_assert(igt_params_set(i915, "reset", "%u", -1));
 
 		enable_hangcheck(i915);
 		igt_install_exit_handler(exit_handler);
-- 
2.26.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t 2/3] Always pass device to igt_params_set
  2020-05-19  6:34 [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Chris Wilson
@ 2020-05-19  6:34 ` Chris Wilson
  2020-05-19  6:34 ` [igt-dev] [PATCH i-g-t 3/3] lib: Cleanup __igt_params_open() Chris Wilson
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2020-05-19  6:34 UTC (permalink / raw)
  To: igt-dev; +Cc: Chris Wilson

Don't second guess, require the user to provide the device that wish to
set the module parameter for.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_params.c                  |  8 ++++----
 lib/igt_params.h                  |  4 ++--
 lib/igt_psr.c                     | 18 ++++++++---------
 lib/igt_psr.h                     |  6 +++---
 tests/i915/i915_pm_dc.c           | 12 ++++++------
 tests/kms_busy.c                  |  8 ++++----
 tests/kms_fbcon_fbt.c             | 32 +++++++++++++++----------------
 tests/kms_force_connector_basic.c |  6 +++---
 tests/kms_frontbuffer_tracking.c  | 10 +++++-----
 tests/kms_panel_fitting.c         |  2 +-
 tests/kms_psr.c                   |  6 +++---
 tests/kms_psr2_su.c               |  6 ++++--
 12 files changed, 60 insertions(+), 58 deletions(-)

diff --git a/lib/igt_params.c b/lib/igt_params.c
index d8649dfd9..3decc5b2a 100644
--- a/lib/igt_params.c
+++ b/lib/igt_params.c
@@ -343,9 +343,9 @@ bool igt_params_save_and_set(int device, const char *parameter, const char *fmt,
  * Please consider using igt_set_module_param_int() for the integer and bool
  * parameters.
  */
-void igt_set_module_param(const char *name, const char *val)
+void igt_set_module_param(int device, const char *name, const char *val)
 {
-	igt_assert(igt_params_save_and_set(-1, name, "%s", val));
+	igt_assert(igt_params_save_and_set(device, name, "%s", val));
 }
 
 /**
@@ -356,7 +356,7 @@ void igt_set_module_param(const char *name, const char *val)
  * This is a wrapper for igt_set_module_param() that takes an integer instead of
  * a string. Please see igt_set_module_param().
  */
-void igt_set_module_param_int(const char *name, int val)
+void igt_set_module_param_int(int device, const char *name, int val)
 {
-	igt_assert(igt_params_save_and_set(-1, name, "%d", val));
+	igt_assert(igt_params_save_and_set(device, name, "%d", val));
 }
diff --git a/lib/igt_params.h b/lib/igt_params.h
index ed17f34a5..bbd6f3ee6 100644
--- a/lib/igt_params.h
+++ b/lib/igt_params.h
@@ -34,7 +34,7 @@ bool igt_params_set(int device, const char *parameter, const char *fmt, ...);
 __attribute__((format(printf, 3, 4)))
 bool igt_params_save_and_set(int device, const char *parameter, const char *fmt, ...);
 
-void igt_set_module_param(const char *name, const char *val);
-void igt_set_module_param_int(const char *name, int val);
+void igt_set_module_param(int device, const char *name, const char *val);
+void igt_set_module_param_int(int device, const char *name, int val);
 
 #endif /* __IGT_PARAMS_H__ */
diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index c2a8d0e11..4109b5295 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -94,11 +94,11 @@ static int has_psr_debugfs(int debugfs_fd)
 	return -EINVAL;
 }
 
-static bool psr_modparam_set(int val)
+static bool psr_modparam_set(int device, int val)
 {
 	static int oldval = -1;
 
-	igt_set_module_param_int("enable_psr", val);
+	igt_set_module_param_int(device, "enable_psr", val);
 
 	if (val == oldval)
 		return false;
@@ -114,7 +114,7 @@ static void restore_psr_debugfs(int sig)
 	psr_write(psr_restore_debugfs_fd, "0");
 }
 
-static bool psr_set(int debugfs_fd, int mode)
+static bool psr_set(int device, int debugfs_fd, int mode)
 {
 	int ret;
 
@@ -131,7 +131,7 @@ static bool psr_set(int debugfs_fd, int mode)
 		 * version enabled and the PSR version of the test, it will
 		 * fail in the first psr_wait_entry() of the test.
 		 */
-		ret = psr_modparam_set(mode >= PSR_MODE_1);
+		ret = psr_modparam_set(device, mode >= PSR_MODE_1);
 	} else {
 		const char *debug_val;
 
@@ -161,18 +161,18 @@ static bool psr_set(int debugfs_fd, int mode)
 	return ret;
 }
 
-bool psr_enable(int debugfs_fd, enum psr_mode mode)
+bool psr_enable(int device, int debugfs_fd, enum psr_mode mode)
 {
-	return psr_set(debugfs_fd, mode);
+	return psr_set(device, debugfs_fd, mode);
 }
 
-bool psr_disable(int debugfs_fd)
+bool psr_disable(int device, int debugfs_fd)
 {
 	/* Any mode different than PSR_MODE_1/2 will disable PSR */
-	return psr_set(debugfs_fd, -1);
+	return psr_set(device, debugfs_fd, -1);
 }
 
-bool psr_sink_support(int debugfs_fd, enum psr_mode mode)
+bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode)
 {
 	char buf[PSR_STATUS_MAX_LEN];
 	int ret;
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index 02ce760b2..b2afb6119 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -39,9 +39,9 @@ bool psr_disabled_check(int debugfs_fd);
 bool psr_wait_entry(int debugfs_fd, enum psr_mode mode);
 bool psr_wait_update(int debugfs_fd, enum psr_mode mode);
 bool psr_long_wait_update(int debugfs_fd, enum psr_mode mode);
-bool psr_enable(int debugfs_fd, enum psr_mode);
-bool psr_disable(int debugfs_fd);
-bool psr_sink_support(int debugfs_fd, enum psr_mode);
+bool psr_enable(int device, int debugfs_fd, enum psr_mode);
+bool psr_disable(int device, int debugfs_fd);
+bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode);
 bool psr2_wait_su(int debugfs_fd, uint16_t *num_su_blocks);
 
 #endif
diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 2dd6191d6..3a3027291 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -291,7 +291,7 @@ static void require_dc_counter(int debugfs_fd, int dc_flag)
 static void setup_dc3co(data_t *data)
 {
 	data->op_psr_mode = PSR_MODE_2;
-	psr_enable(data->debugfs_fd, data->op_psr_mode);
+	psr_enable(data->drm_fd, data->debugfs_fd, data->op_psr_mode);
 	igt_require_f(psr_wait_entry(data->debugfs_fd, data->op_psr_mode),
 		      "PSR2 is not enabled\n");
 }
@@ -408,25 +408,25 @@ int main(int argc, char *argv[])
 	igt_describe("In this test we make sure that system enters DC3CO "
 		     "when PSR2 is active and system is in SLEEP state");
 	igt_subtest("dc3co-vpb-simulation") {
-		igt_require(psr_sink_support(data.debugfs_fd, PSR_MODE_2));
+		igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd, PSR_MODE_2));
 		test_dc3co_vpb_simulation(&data);
 	}
 
 	igt_describe("This test validates display engine entry to DC5 state "
 		     "while PSR is active");
 	igt_subtest("dc5-psr") {
-		igt_require(psr_sink_support(data.debugfs_fd, PSR_MODE_1));
+		igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd, PSR_MODE_1));
 		data.op_psr_mode = PSR_MODE_1;
-		psr_enable(data.debugfs_fd, data.op_psr_mode);
+		psr_enable(data.drm_fd, data.debugfs_fd, data.op_psr_mode);
 		test_dc_state_psr(&data, CHECK_DC5);
 	}
 
 	igt_describe("This test validates display engine entry to DC6 state "
 		     "while PSR is active");
 	igt_subtest("dc6-psr") {
-		igt_require(psr_sink_support(data.debugfs_fd, PSR_MODE_1));
+		igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd, PSR_MODE_1));
 		data.op_psr_mode = PSR_MODE_1;
-		psr_enable(data.debugfs_fd, data.op_psr_mode);
+		psr_enable(data.drm_fd, data.debugfs_fd, data.op_psr_mode);
 		igt_require_f(igt_pm_pc8_plus_residencies_enabled(data.msr_fd),
 			      "PC8+ residencies not supported\n");
 		test_dc_state_psr(&data, CHECK_DC6);
diff --git a/tests/kms_busy.c b/tests/kms_busy.c
index be4273bc4..222612e79 100644
--- a/tests/kms_busy.c
+++ b/tests/kms_busy.c
@@ -374,20 +374,20 @@ igt_main
 
 		igt_subtest_f("extended-modeset-hang-oldfb-with-reset-%s-pipe-%s",
 				e->name, kmstest_pipe_name(n)) {
-			igt_set_module_param_int("force_reset_modeset_test", 1);
+			igt_set_module_param_int(display.drm_fd, "force_reset_modeset_test", 1);
 
 			test_hang(&display, eb_ring(e), n, true, false);
 
-			igt_set_module_param_int("force_reset_modeset_test", 0);
+			igt_set_module_param_int(display.drm_fd, "force_reset_modeset_test", 0);
 		}
 
 		igt_subtest_f("extended-modeset-hang-newfb-with-reset-%s-pipe-%s",
 				e->name, kmstest_pipe_name(n)) {
-			igt_set_module_param_int("force_reset_modeset_test", 1);
+			igt_set_module_param_int(display.drm_fd, "force_reset_modeset_test", 1);
 
 			test_hang(&display, eb_ring(e), n, true, true);
 
-			igt_set_module_param_int("force_reset_modeset_test", 0);
+			igt_set_module_param_int(display.drm_fd, "force_reset_modeset_test", 0);
 		}
 
 		igt_fixture {
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c
index 143be3e37..7eba4ac5d 100644
--- a/tests/kms_fbcon_fbt.c
+++ b/tests/kms_fbcon_fbt.c
@@ -89,7 +89,7 @@ static void teardown_drm(struct drm_info *drm)
 	drm->fd = -1;
 }
 
-static bool fbc_supported_on_chipset(int debugfs_fd)
+static bool fbc_supported_on_chipset(int device, int debugfs_fd)
 {
 	char buf[128];
 	int ret;
@@ -266,9 +266,9 @@ static bool psr_is_disabled(int debugfs_fd)
 	return r;
 }
 
-static bool psr_supported_on_chipset(int debugfs_fd)
+static bool psr_supported_on_chipset(int device, int debugfs_fd)
 {
-	return psr_sink_support(debugfs_fd, PSR_MODE_1);
+	return psr_sink_support(device, debugfs_fd, PSR_MODE_1);
 }
 
 static bool psr_wait_until_update(struct drm_info *drm)
@@ -276,30 +276,30 @@ static bool psr_wait_until_update(struct drm_info *drm)
 	return psr_long_wait_update(drm->debugfs_fd, PSR_MODE_1);
 }
 
-static void disable_features(int debugfs_fd)
+static void disable_features(int device, int debugfs_fd)
 {
-	igt_set_module_param_int("enable_fbc", 0);
-	if (psr_sink_support(debugfs_fd, PSR_MODE_1))
-		psr_disable(debugfs_fd);
+	igt_set_module_param_int(device, "enable_fbc", 0);
+	if (psr_sink_support(device, debugfs_fd, PSR_MODE_1))
+		psr_disable(device, debugfs_fd);
 }
 
-static inline void fbc_modparam_enable(int debugfs_fd)
+static inline void fbc_modparam_enable(int device, int debugfs_fd)
 {
-	igt_set_module_param_int("enable_fbc", 1);
+	igt_set_module_param_int(device, "enable_fbc", 1);
 }
 
-static inline void psr_debugfs_enable(int debugfs_fd)
+static inline void psr_debugfs_enable(int device, int debugfs_fd)
 {
-	psr_enable(debugfs_fd, PSR_MODE_1);
+	psr_enable(device, debugfs_fd, PSR_MODE_1);
 }
 
 struct feature {
-	bool (*supported_on_chipset)(int debugfs_fd);
+	bool (*supported_on_chipset)(int device, int debugfs_fd);
 	bool (*wait_until_enabled)(int debugfs_fd);
 	bool (*is_disabled)(int debugfs_fd);
 	bool (*wait_until_update)(struct drm_info *drm);
 	bool (*connector_possible_fn)(drmModeConnectorPtr connector);
-	void (*enable)(int debugfs_fd);
+	void (*enable)(int device, int debugfs_fd);
 } fbc = {
 	.supported_on_chipset = fbc_supported_on_chipset,
 	.wait_until_enabled = fbc_wait_until_enabled,
@@ -322,10 +322,10 @@ static void subtest(struct drm_info *drm, struct feature *feature, bool suspend)
 
 	setup_drm(drm);
 
-	igt_require(feature->supported_on_chipset(drm->debugfs_fd));
+	igt_require(feature->supported_on_chipset(drm->fd, drm->debugfs_fd));
 
-	disable_features(drm->debugfs_fd);
-	feature->enable(drm->debugfs_fd);
+	disable_features(drm->fd, drm->debugfs_fd);
+	feature->enable(drm->fd, drm->debugfs_fd);
 
 	kmstest_unset_all_crtcs(drm->fd, drm->res);
 	wait_user("Modes unset.");
diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c
index ddbd97efd..b1a5bac19 100644
--- a/tests/kms_force_connector_basic.c
+++ b/tests/kms_force_connector_basic.c
@@ -53,7 +53,7 @@ static void reset_connectors(void)
 		drmModeFreeConnector(connector);
 	}
 
-	igt_set_module_param_int("load_detect_test", 0);
+	igt_set_module_param_int(drm_fd, "load_detect_test", 0);
 }
 
 static int opt_handler(int opt, int opt_index, void *data)
@@ -158,7 +158,7 @@ igt_main_args("", long_opts, help_str, opt_handler, NULL)
 		kmstest_set_vt_graphics_mode();
 		kmstest_unset_all_crtcs(drm_fd, res);
 
-		igt_set_module_param_int("load_detect_test", 1);
+		igt_set_module_param_int(drm_fd, "load_detect_test", 1);
 
 		plane_resources = drmModeGetPlaneResources(drm_fd);
 		igt_assert(plane_resources);
@@ -201,7 +201,7 @@ igt_main_args("", long_opts, help_str, opt_handler, NULL)
 		 */
 		temp = drmModeGetConnector(drm_fd, connector->connector_id);
 
-		igt_set_module_param_int("load_detect_test", 0);
+		igt_set_module_param_int(drm_fd, "load_detect_test", 0);
 
 		igt_assert(temp->connection != DRM_MODE_UNKNOWNCONNECTION);
 
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 5d55560d5..780fecfe8 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -938,8 +938,8 @@ static bool drrs_wait_until_rr_switch_to_low(void)
 	return igt_wait(is_drrs_low(), 5000, 1);
 }
 
-#define fbc_enable() igt_set_module_param_int("enable_fbc", 1)
-#define fbc_disable() igt_set_module_param_int("enable_fbc", 0)
+#define fbc_enable() igt_set_module_param_int(drm.fd, "enable_fbc", 1)
+#define fbc_disable() igt_set_module_param_int(drm.fd, "enable_fbc", 0)
 #define drrs_enable()	drrs_set(1)
 #define drrs_disable()	drrs_set(0)
 
@@ -1135,7 +1135,7 @@ static bool disable_features(const struct test_mode *t)
 
 	fbc_disable();
 	drrs_disable();
-	return psr.can_test ? psr_disable(drm.debugfs) : false;
+	return psr.can_test ? psr_disable(drm.fd, drm.debugfs) : false;
 }
 
 static void *busy_thread_func(void *data)
@@ -1427,7 +1427,7 @@ static void setup_psr(void)
 		return;
 	}
 
-	if (!psr_sink_support(drm.debugfs, PSR_MODE_1)) {
+	if (!psr_sink_support(drm.fd, drm.debugfs, PSR_MODE_1)) {
 		igt_info("Can't test PSR: not supported by sink.\n");
 		return;
 	}
@@ -1725,7 +1725,7 @@ static bool enable_features_for_test(const struct test_mode *t)
 	if (t->feature & FEATURE_FBC)
 		fbc_enable();
 	if (t->feature & FEATURE_PSR)
-		ret = psr_enable(drm.debugfs, PSR_MODE_1);
+		ret = psr_enable(drm.fd, drm.debugfs, PSR_MODE_1);
 	if (t->feature & FEATURE_DRRS)
 		drrs_enable();
 
diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
index 065fc2df8..4f4c56087 100644
--- a/tests/kms_panel_fitting.c
+++ b/tests/kms_panel_fitting.c
@@ -231,7 +231,7 @@ static void test_atomic_fastset(data_t *data)
 
 	/* Until this is force enabled, force modeset evasion. */
 	if (stat("/sys/module/i915/parameters/fastboot", &sb) == 0)
-		igt_set_module_param_int("fastboot", 1);
+		igt_set_module_param_int(data->drm_fd, "fastboot", 1);
 
 	igt_require(display->is_atomic);
 	igt_require(intel_gen(intel_get_drm_devid(display->drm_fd)) >= 5);
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index 13ed02f46..f40902fbb 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -195,7 +195,7 @@ static void fill_render(data_t *data, uint32_t handle, unsigned char color)
 static bool sink_support(data_t *data, enum psr_mode mode)
 {
 	return data->with_psr_disabled ||
-	       psr_sink_support(data->debugfs_fd, mode);
+	       psr_sink_support(data->drm_fd, data->debugfs_fd, mode);
 }
 
 static bool psr_wait_entry_if_enabled(data_t *data)
@@ -219,7 +219,7 @@ static bool psr_enable_if_enabled(data_t *data)
 	if (data->with_psr_disabled)
 		return true;
 
-	return psr_enable(data->debugfs_fd, data->op_psr_mode);
+	return psr_enable(data->drm_fd, data->debugfs_fd, data->op_psr_mode);
 }
 
 static inline void manual(const char *expected)
@@ -525,7 +525,7 @@ igt_main_args("", long_options, help_str, opt_handler, &data)
 
 	igt_fixture {
 		if (!data.with_psr_disabled)
-			psr_disable(data.debugfs_fd);
+			psr_disable(data.drm_fd, data.debugfs_fd);
 
 		close(data.debugfs_fd);
 		drm_intel_bufmgr_destroy(data.bufmgr);
diff --git a/tests/kms_psr2_su.c b/tests/kms_psr2_su.c
index 9f40c7355..a834a96e3 100644
--- a/tests/kms_psr2_su.c
+++ b/tests/kms_psr2_su.c
@@ -243,7 +243,8 @@ igt_main
 		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
 		kmstest_set_vt_graphics_mode();
 
-		igt_require_f(psr_sink_support(data.debugfs_fd, PSR_MODE_2),
+		igt_require_f(psr_sink_support(data.drm_fd,
+					       data.debugfs_fd, PSR_MODE_2),
 			      "Sink does not support PSR2\n");
 
 		data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
@@ -253,7 +254,8 @@ igt_main
 		display_init(&data);
 
 		/* Test if PSR2 can be enabled */
-		igt_require_f(psr_enable(data.debugfs_fd, PSR_MODE_2),
+		igt_require_f(psr_enable(data.drm_fd,
+					 data.debugfs_fd, PSR_MODE_2),
 			      "Error enabling PSR2\n");
 		data.op = FRONTBUFFER;
 		prepare(&data);
-- 
2.26.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t 3/3] lib: Cleanup __igt_params_open()
  2020-05-19  6:34 [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Chris Wilson
  2020-05-19  6:34 ` [igt-dev] [PATCH i-g-t 2/3] Always pass device to igt_params_set Chris Wilson
@ 2020-05-19  6:34 ` Chris Wilson
  2020-05-19  7:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Patchwork
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2020-05-19  6:34 UTC (permalink / raw)
  To: igt-dev; +Cc: Jani Nikula, Chris Wilson

The device always exist, so use it to derive the module name required to
lookup either the debugfs params directory or the sysfs module parameters.

Fixes: 2f5cee33ce55 ("igt/params: use igt_params_set_save for igt_set_module_param*")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 lib/igt_params.c | 165 +++++++++--------------------------------------
 1 file changed, 29 insertions(+), 136 deletions(-)

diff --git a/lib/igt_params.c b/lib/igt_params.c
index 3decc5b2a..c06416988 100644
--- a/lib/igt_params.c
+++ b/lib/igt_params.c
@@ -80,9 +80,18 @@ static void igt_params_exit_handler(int sig)
  * Notice that this function is called by igt_set_module_param(), so that one -
  * or one of its wrappers - is the only function the test programs need to call.
  */
-static void igt_params_save(int dir, const char *path, const char *name)
+static void igt_params_save(int dir, const char *name)
 {
 	struct module_param_data *data;
+	char path[PATH_MAX];
+	char buf[80];
+	int len;
+
+	snprintf(buf, sizeof(buf), "/proc/self/fd/%d", dir);
+	len = readlink(buf, path, sizeof(path) - 1);
+	if (len < 0)
+		return;
+	path[len] = '\0';
 
 	/* Check if this parameter is already saved. */
 	for (data = module_params; data != NULL; data = data->next)
@@ -110,175 +119,59 @@ static void igt_params_save(int dir, const char *path, const char *name)
 }
 
 /**
- * __igt_params_open:
- * @device: fd of the device or -1 for default
- * @outpath: full path to the sysfs directory if not NULL
- * @param: name of parameter of interest
- *
- * Find parameter of interest and return parameter directory fd, parameter
- * is first searched at debugfs/dri/N/<device>_params and if not found will
- * look for parameter at /sys/module/<device>/parameters.
- *
- * Giving -1 here for default device will search for matching device from
- * debugfs/dri/N where N go from 0 to 63. First device found from debugfs
- * which exist also at /sys/module/<device> will be 'default'.
- * Default device will only be used for sysfs, not for debugfs.
+ * igt_params_open:
+ * @device: fd of the device
  *
- * If outpath is not NULL caller is responsible to free given pointer.
+ * This opens the module parameters directory (under sysfs) corresponding
+ * to the device for use with igt_sysfs_set() and igt_sysfs_get().
  *
  * Returns:
- * Directory fd, or -1 on failure.
+ * The directory fd, or -1 on failure.
  */
-static int __igt_params_open(int device, char **outpath, const char *param)
+int igt_params_open(int device)
 {
+	drm_version_t version;
 	int dir, params = -1;
-	struct stat buffer;
-	char searchname[64];
-	char searchpath[PATH_MAX];
-	char *foundname, *ctx;
+	char path[PATH_MAX];
+	char name[32] = "";
+
+	memset(&version, 0, sizeof(version));
+	version.name_len = sizeof(name);
+	version.name = name;
+	if (ioctl(device, DRM_IOCTL_VERSION, &version))
+		return -1;
 
 	dir = igt_debugfs_dir(device);
 	if (dir >= 0) {
-		int devname;
-
-		devname = openat(dir, "name", O_RDONLY);
-		igt_require_f(devname >= 0,
-		              "Driver need to name itself in debugfs!");
-
-		read(devname, searchname, sizeof(searchname));
-		close(devname);
-
-		foundname = strtok_r(searchname, " ", &ctx);
-		igt_require_f(foundname,
-		              "Driver need to name itself in debugfs!");
-
-		snprintf(searchpath, PATH_MAX, "%s_params", foundname);
-		params = openat(dir, searchpath, O_RDONLY);
-
-		if (params >= 0) {
-			char *debugfspath = malloc(PATH_MAX);
-
-			igt_debugfs_path(device, debugfspath, PATH_MAX);
-			if (param != NULL) {
-				char filepath[PATH_MAX];
-
-				snprintf(filepath, PATH_MAX, "%s/%s",
-					 debugfspath, param);
-
-				if (stat(filepath, &buffer) == 0) {
-					if (outpath != NULL)
-						*outpath = debugfspath;
-					else
-						free(debugfspath);
-				} else {
-					free(debugfspath);
-					close(params);
-					params = -1;
-				}
-			} else if (outpath != NULL) {
-				/*
-				 * Caller is responsible to free this.
-				 */
-				*outpath = debugfspath;
-			} else {
-				free(debugfspath);
-			}
-		}
+		snprintf(path, PATH_MAX, "%s_params", name);
+		params = openat(dir, path, O_RDONLY);
 		close(dir);
 	}
 
 	if (params < 0) { /* builtin? */
-		drm_version_t version;
-		char name[32] = "";
-		char path[PATH_MAX];
-
-		if (device == -1) {
-			/*
-			 * find default device
-			 */
-			int file, i;
-			const char *debugfs_root = igt_debugfs_mount();
-
-			igt_assert(debugfs_root);
-
-			for (i = 0; i < 63; i++) {
-				char testpath[PATH_MAX];
-
-				snprintf(searchpath, PATH_MAX,
-					 "%s/dri/%d/name", debugfs_root, i);
-
-				file = open(searchpath, O_RDONLY);
-
-				if (file < 0)
-					continue;
-
-				read(file, searchname, sizeof(searchname));
-				close(file);
-
-				foundname = strtok_r(searchname, " ", &ctx);
-				if (!foundname)
-					continue;
-
-				snprintf(testpath, PATH_MAX,
-					 "/sys/module/%s/parameters",
-					 foundname);
-
-				if (stat(testpath, &buffer) == 0 &&
-				    S_ISDIR(buffer.st_mode)) {
-					snprintf(name, sizeof(name), "%s",
-						 foundname);
-					break;
-				}
-			}
-		} else {
-			memset(&version, 0, sizeof(version));
-			version.name_len = sizeof(name);
-			version.name = name;
-			ioctl(device, DRM_IOCTL_VERSION, &version);
-		}
 		snprintf(path, sizeof(path), "/sys/module/%s/parameters", name);
 		params = open(path, O_RDONLY);
-		if (params >= 0 && outpath)
-			*outpath = strdup(path);
 	}
 
 	return params;
 }
 
-/**
- * igt_params_open:
- * @device: fd of the device
- *
- * This opens the module parameters directory (under sysfs) corresponding
- * to the device for use with igt_sysfs_set() and igt_sysfs_get().
- *
- * Returns:
- * The directory fd, or -1 on failure.
- */
-int igt_params_open(int device)
-{
-	return __igt_params_open(device, NULL, NULL);
-}
-
 __attribute__((format(printf, 3, 0)))
 static bool __igt_params_set(int device, const char *parameter,
 			     const char *fmt, va_list ap, bool save)
 {
-	char *path = NULL;
 	int dir;
 	int ret;
 
-	dir = __igt_params_open(device, save ? &path : NULL, parameter);
+	dir = igt_params_open(device);
 	if (dir < 0)
 		return false;
 
 	if (save)
-		igt_params_save(dir, path, parameter);
+		igt_params_save(dir, parameter);
 
 	ret = igt_sysfs_vprintf(dir, parameter, fmt, ap);
-
 	close(dir);
-	free(path);
 
 	return ret > 0;
 }
-- 
2.26.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion
  2020-05-19  6:34 [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Chris Wilson
  2020-05-19  6:34 ` [igt-dev] [PATCH i-g-t 2/3] Always pass device to igt_params_set Chris Wilson
  2020-05-19  6:34 ` [igt-dev] [PATCH i-g-t 3/3] lib: Cleanup __igt_params_open() Chris Wilson
@ 2020-05-19  7:17 ` Patchwork
  2020-05-19  8:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-05-19  7:17 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion
URL   : https://patchwork.freedesktop.org/series/77390/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8498 -> IGTPW_4581
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/index.html

Known issues
------------

  Here are the changes found in IGTPW_4581 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@execlists:
    - fi-cfl-8700k:       [PASS][1] -> [INCOMPLETE][2] ([i915#656])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/fi-cfl-8700k/igt@i915_selftest@live@execlists.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/fi-cfl-8700k/igt@i915_selftest@live@execlists.html

  
  [i915#656]: https://gitlab.freedesktop.org/drm/intel/issues/656


Participating hosts (52 -> 43)
------------------------------

  Missing    (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-hsw-4770 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5659 -> IGTPW_4581

  CI-20190529: 20190529
  CI_DRM_8498: 1493c649ae92207a758afa50a639275bd6c80e2e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4581: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/index.html
  IGT_5659: 66ab5e42811fee3dea8c21ab29e70e323a0650de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion
  2020-05-19  6:34 [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Chris Wilson
                   ` (2 preceding siblings ...)
  2020-05-19  7:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Patchwork
@ 2020-05-19  8:44 ` Patchwork
  2020-05-20  9:34 ` [igt-dev] [PATCH i-g-t 1/3] " Juha-Pekka Heikkila
  2020-05-26 13:04 ` Jani Nikula
  5 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-05-19  8:44 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion
URL   : https://patchwork.freedesktop.org/series/77390/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8498_full -> IGTPW_4581_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with IGTPW_4581_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_4581_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_4581_full:

### IGT changes ###

#### Warnings ####

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-iclb:         [SKIP][1] ([i915#658]) -> [SKIP][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-iclb6/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-iclb3/igt@i915_pm_dc@dc3co-vpb-simulation.html

  
Known issues
------------

  Here are the changes found in IGTPW_4581_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_atomic_transition@plane-toggle-modeset-transition:
    - shard-snb:          [PASS][3] -> [SKIP][4] ([fdo#109271])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-snb5/igt@kms_atomic_transition@plane-toggle-modeset-transition.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-snb6/igt@kms_atomic_transition@plane-toggle-modeset-transition.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x64-random:
    - shard-kbl:          [PASS][5] -> [FAIL][6] ([i915#54] / [i915#93] / [i915#95]) +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-64x64-random.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl6/igt@kms_cursor_crc@pipe-a-cursor-64x64-random.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-apl:          [PASS][7] -> [DMESG-WARN][8] ([i915#180])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl8/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl1/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding:
    - shard-kbl:          [PASS][9] -> [FAIL][10] ([i915#54])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl4/igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl6/igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding.html
    - shard-apl:          [PASS][11] -> [FAIL][12] ([i915#54])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl7/igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl3/igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding.html

  * igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled:
    - shard-kbl:          [PASS][13] -> [FAIL][14] ([fdo#108145] / [i915#177] / [i915#52] / [i915#54] / [i915#93] / [i915#95])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl3/igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl4/igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled.html
    - shard-apl:          [PASS][15] -> [FAIL][16] ([fdo#108145] / [i915#52] / [i915#54] / [i915#95])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl7/igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl1/igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled.html

  * igt@kms_hdmi_inject@inject-audio:
    - shard-tglb:         [PASS][17] -> [SKIP][18] ([i915#433])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-tglb7/igt@kms_hdmi_inject@inject-audio.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-tglb1/igt@kms_hdmi_inject@inject-audio.html

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
    - shard-kbl:          [PASS][19] -> [FAIL][20] ([i915#53] / [i915#93] / [i915#95])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl2/igt@kms_pipe_crc_basic@hang-read-crc-pipe-a.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl6/igt@kms_pipe_crc_basic@hang-read-crc-pipe-a.html
    - shard-apl:          [PASS][21] -> [FAIL][22] ([i915#53] / [i915#95])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl6/igt@kms_pipe_crc_basic@hang-read-crc-pipe-a.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl3/igt@kms_pipe_crc_basic@hang-read-crc-pipe-a.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
    - shard-kbl:          [PASS][23] -> [DMESG-WARN][24] ([i915#180])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html

  * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-mid:
    - shard-kbl:          [PASS][25] -> [FAIL][26] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl2/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-mid.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl3/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-mid.html
    - shard-apl:          [PASS][27] -> [FAIL][28] ([fdo#108145] / [i915#265] / [i915#95])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl6/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-mid.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl2/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-mid.html

  * igt@kms_psr@psr2_sprite_render:
    - shard-iclb:         [PASS][29] -> [SKIP][30] ([fdo#109441]) +2 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-iclb2/igt@kms_psr@psr2_sprite_render.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-iclb7/igt@kms_psr@psr2_sprite_render.html

  
#### Possible fixes ####

  * igt@gen9_exec_parse@allowed-all:
    - shard-apl:          [DMESG-WARN][31] ([i915#1436] / [i915#716]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl1/igt@gen9_exec_parse@allowed-all.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl3/igt@gen9_exec_parse@allowed-all.html

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-tglb:         [SKIP][33] ([i915#1904]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-tglb8/igt@i915_pm_dc@dc3co-vpb-simulation.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-tglb2/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@kms_color@pipe-c-degamma:
    - shard-apl:          [FAIL][35] ([i915#71]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl2/igt@kms_color@pipe-c-degamma.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl6/igt@kms_color@pipe-c-degamma.html
    - shard-glk:          [FAIL][37] ([i915#71]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-glk1/igt@kms_color@pipe-c-degamma.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-glk5/igt@kms_color@pipe-c-degamma.html
    - shard-kbl:          [FAIL][39] ([i915#71]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl3/igt@kms_color@pipe-c-degamma.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl3/igt@kms_color@pipe-c-degamma.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen:
    - shard-kbl:          [FAIL][41] ([i915#54] / [i915#93] / [i915#95]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-64x64-onscreen.html

  * igt@kms_cursor_crc@pipe-a-cursor-suspend:
    - shard-kbl:          [DMESG-WARN][43] ([i915#180]) -> [PASS][44] +4 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-suspend.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-suspend.html

  * igt@kms_fbcon_fbt@psr-suspend:
    - shard-tglb:         [FAIL][45] ([i915#1121]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-tglb2/igt@kms_fbcon_fbt@psr-suspend.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-tglb5/igt@kms_fbcon_fbt@psr-suspend.html

  * {igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a1}:
    - shard-glk:          [FAIL][47] ([i915#79]) -> [PASS][48]
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-glk9/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a1.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-glk1/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a1.html

  * {igt@kms_flip@flip-vs-suspend-interruptible@c-dp1}:
    - shard-apl:          [DMESG-WARN][49] ([i915#180]) -> [PASS][50] +2 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl8/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html

  * igt@kms_plane_cursor@pipe-a-overlay-size-64:
    - shard-apl:          [FAIL][51] ([i915#1559] / [i915#95]) -> [PASS][52] +1 similar issue
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl3/igt@kms_plane_cursor@pipe-a-overlay-size-64.html
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl2/igt@kms_plane_cursor@pipe-a-overlay-size-64.html
    - shard-kbl:          [FAIL][53] ([i915#1559] / [i915#93] / [i915#95]) -> [PASS][54] +1 similar issue
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl7/igt@kms_plane_cursor@pipe-a-overlay-size-64.html
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl6/igt@kms_plane_cursor@pipe-a-overlay-size-64.html

  * igt@kms_psr@no_drrs:
    - shard-iclb:         [FAIL][55] ([i915#173]) -> [PASS][56]
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-iclb1/igt@kms_psr@no_drrs.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-iclb4/igt@kms_psr@no_drrs.html

  * igt@kms_psr@psr2_suspend:
    - shard-iclb:         [SKIP][57] ([fdo#109441]) -> [PASS][58]
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-iclb7/igt@kms_psr@psr2_suspend.html
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-iclb2/igt@kms_psr@psr2_suspend.html

  * {igt@perf@polling-parameterized}:
    - shard-tglb:         [FAIL][59] ([i915#1542]) -> [PASS][60]
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-tglb1/igt@perf@polling-parameterized.html
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-tglb5/igt@perf@polling-parameterized.html

  
#### Warnings ####

  * igt@i915_pm_dc@dc6-psr:
    - shard-tglb:         [SKIP][61] ([i915#468]) -> [FAIL][62] ([i915#454])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-tglb2/igt@i915_pm_dc@dc6-psr.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-tglb6/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_pm_rc6_residency@rc6-idle:
    - shard-iclb:         [WARN][63] ([i915#1515]) -> [FAIL][64] ([i915#1515])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-iclb6/igt@i915_pm_rc6_residency@rc6-idle.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-iclb1/igt@i915_pm_rc6_residency@rc6-idle.html

  * igt@kms_content_protection@atomic:
    - shard-apl:          [DMESG-FAIL][65] ([fdo#110321]) -> [TIMEOUT][66] ([i915#1319])
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl7/igt@kms_content_protection@atomic.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl7/igt@kms_content_protection@atomic.html

  * igt@kms_content_protection@legacy:
    - shard-apl:          [FAIL][67] ([fdo#110321] / [fdo#110336]) -> [TIMEOUT][68] ([i915#1319])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-apl6/igt@kms_content_protection@legacy.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-apl8/igt@kms_content_protection@legacy.html

  * igt@kms_content_protection@lic:
    - shard-kbl:          [FAIL][69] ([fdo#110321]) -> [TIMEOUT][70] ([i915#1319])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8498/shard-kbl3/igt@kms_content_protection@lic.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/shard-kbl1/igt@kms_content_protection@lic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
  [fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
  [i915#1121]: https://gitlab.freedesktop.org/drm/intel/issues/1121
  [i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#1515]: https://gitlab.freedesktop.org/drm/intel/issues/1515
  [i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
  [i915#1559]: https://gitlab.freedesktop.org/drm/intel/issues/1559
  [i915#173]: https://gitlab.freedesktop.org/drm/intel/issues/173
  [i915#177]: https://gitlab.freedesktop.org/drm/intel/issues/177
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1904]: https://gitlab.freedesktop.org/drm/intel/issues/1904
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
  [i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
  [i915#53]: https://gitlab.freedesktop.org/drm/intel/issues/53
  [i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#71]: https://gitlab.freedesktop.org/drm/intel/issues/71
  [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (11 -> 8)
------------------------------

  Missing    (3): pig-skl-6260u pig-glk-j5005 pig-icl-1065g7 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5659 -> IGTPW_4581
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_8498: 1493c649ae92207a758afa50a639275bd6c80e2e @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4581: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/index.html
  IGT_5659: 66ab5e42811fee3dea8c21ab29e70e323a0650de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4581/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion
  2020-05-19  6:34 [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Chris Wilson
                   ` (3 preceding siblings ...)
  2020-05-19  8:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2020-05-20  9:34 ` Juha-Pekka Heikkila
  2020-05-26 13:04 ` Jani Nikula
  5 siblings, 0 replies; 7+ messages in thread
From: Juha-Pekka Heikkila @ 2020-05-20  9:34 UTC (permalink / raw)
  To: igt-dev

Series

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>


On 19.5.2020 9.34, Chris Wilson wrote:
> The debugfs modparams are more picky and refuse to do the implicit
> unsigned conversion.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/i915/gem_ctx_persistence.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
> index ce9f02350..4a1ef0f27 100644
> --- a/tests/i915/gem_ctx_persistence.c
> +++ b/tests/i915/gem_ctx_persistence.c
> @@ -1127,7 +1127,7 @@ igt_main
>   		igt_require_gem(i915);
>   
>   		/* Restore the reset modparam if left clobbered */
> -		igt_assert(igt_params_set(i915, "reset", "%d", -1));
> +		igt_assert(igt_params_set(i915, "reset", "%u", -1));
>   
>   		enable_hangcheck(i915);
>   		igt_install_exit_handler(exit_handler);
> 

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion
  2020-05-19  6:34 [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Chris Wilson
                   ` (4 preceding siblings ...)
  2020-05-20  9:34 ` [igt-dev] [PATCH i-g-t 1/3] " Juha-Pekka Heikkila
@ 2020-05-26 13:04 ` Jani Nikula
  5 siblings, 0 replies; 7+ messages in thread
From: Jani Nikula @ 2020-05-26 13:04 UTC (permalink / raw)
  To: Chris Wilson, igt-dev; +Cc: Chris Wilson

On Tue, 19 May 2020, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> The debugfs modparams are more picky and refuse to do the implicit
> unsigned conversion.

I was wondering about this until I realized "reset" in i915_params.h has
type unsigned int, while the module param in i915_params.c has type
int. It's not that the debugfs is more picky, it's just that they have
different types!

BR,
Jani.


>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/i915/gem_ctx_persistence.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
> index ce9f02350..4a1ef0f27 100644
> --- a/tests/i915/gem_ctx_persistence.c
> +++ b/tests/i915/gem_ctx_persistence.c
> @@ -1127,7 +1127,7 @@ igt_main
>  		igt_require_gem(i915);
>  
>  		/* Restore the reset modparam if left clobbered */
> -		igt_assert(igt_params_set(i915, "reset", "%d", -1));
> +		igt_assert(igt_params_set(i915, "reset", "%u", -1));
>  
>  		enable_hangcheck(i915);
>  		igt_install_exit_handler(exit_handler);

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2020-05-26 13:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19  6:34 [igt-dev] [PATCH i-g-t 1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Chris Wilson
2020-05-19  6:34 ` [igt-dev] [PATCH i-g-t 2/3] Always pass device to igt_params_set Chris Wilson
2020-05-19  6:34 ` [igt-dev] [PATCH i-g-t 3/3] lib: Cleanup __igt_params_open() Chris Wilson
2020-05-19  7:17 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] i915/gem_ctx_persistence: Use "%u" for -1u conversion Patchwork
2020-05-19  8:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-05-20  9:34 ` [igt-dev] [PATCH i-g-t 1/3] " Juha-Pekka Heikkila
2020-05-26 13:04 ` Jani Nikula

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.