[igt-dev] [PATCH i-g-t] tests/kms_psr2_sf: Enable selective fetch
José Roberto de Souza
jose.souza at intel.com
Thu Feb 4 14:08:41 UTC 2021
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 at intel.com>
Cc: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya at intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at 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
More information about the igt-dev
mailing list