From: "José Roberto de Souza" <jose.souza@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/kms_psr2_sf: Enable selective fetch
Date: Thu, 4 Feb 2021 06:08:41 -0800 [thread overview]
Message-ID: <20210204140841.15972-1-jose.souza@intel.com> (raw)
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
next reply other threads:[~2021-02-04 14:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-04 14:08 José Roberto de Souza [this message]
2021-02-04 15:11 ` [igt-dev] [PATCH i-g-t] tests/kms_psr2_sf: Enable selective fetch 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210204140841.15972-1-jose.souza@intel.com \
--to=jose.souza@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox