igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_psr2_sf: Enable selective fetch
@ 2021-02-04 14:08 José Roberto de Souza
  2021-02-04 15:11 ` Petri Latvala
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: José Roberto de Souza @ 2021-02-04 14:08 UTC (permalink / raw)
  To: igt-dev

Reload driver enabling PSR2 selective fetch to start to have
some tests coverage of this feature by CI.

Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 tests/kms_psr2_sf.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/kms_psr2_sf.c b/tests/kms_psr2_sf.c
index 296ed8476..751d6ff03 100644
--- a/tests/kms_psr2_sf.c
+++ b/tests/kms_psr2_sf.c
@@ -24,6 +24,7 @@
 
 #include "igt.h"
 #include "igt_sysfs.h"
+#include "igt_kmod.h"
 #include "igt_psr.h"
 #include <errno.h>
 #include <stdbool.h>
@@ -544,6 +545,14 @@ static void cleanup(data_t *data)
 	igt_remove_fb(data->drm_fd, &data->fb_test);
 }
 
+static void reload_driver(bool enable_sel_fetch)
+{
+	const char *params = enable_sel_fetch ? "enable_psr2_sel_fetch=1" : "";
+
+	igt_i915_driver_unload();
+	igt_assert_eq(igt_i915_driver_load(params), 0);
+}
+
 igt_main
 {
 	data_t data = {};
@@ -552,6 +561,9 @@ igt_main
 	igt_fixture {
 		int r;
 
+		/* TODO: drop this as soon driver enables it by default */
+		reload_driver(true);
+
 		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
 		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
 		kmstest_set_vt_graphics_mode();
@@ -645,5 +657,7 @@ igt_main
 		close(data.debugfs_fd);
 		drm_intel_bufmgr_destroy(data.bufmgr);
 		display_fini(&data);
+
+		reload_driver(false);
 	}
 }
-- 
2.30.0

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

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

end of thread, other threads:[~2021-02-05  7:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-04 14:08 [igt-dev] [PATCH i-g-t] tests/kms_psr2_sf: Enable selective fetch José Roberto de Souza
2021-02-04 15:11 ` Petri Latvala
2021-02-04 15:17   ` Souza, Jose
2021-02-05  7:34     ` Petri Latvala
2021-02-04 15:48 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-02-04 21:14 ` [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;
as well as URLs for NNTP newsgroup(s).