From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: igt-dev@lists.freedesktop.org
Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: [PATCH i-g-t 2/2] tests/intel/kms_ccs: add hiberbate test
Date: Tue, 3 Dec 2024 11:24:18 +0200 [thread overview]
Message-ID: <20241203092418.3454357-3-juhapekka.heikkila@gmail.com> (raw)
In-Reply-To: <20241203092418.3454357-1-juhapekka.heikkila@gmail.com>
Add hibernate test which bring entire system down for short
hibernate. This mode is added to suspend tests to be run
manually with '-r' flag because this is not ci friendly test,
on hibernate ci would lose connection to the hibernated box.
For this test to work kernel resume point need to be set, from
kernel command line is checked if there is found something along
the lines of "resume=/dev/nvme0n1p2" or so to verify hibernate
will be successful.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
tests/intel/kms_ccs.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
index 3e9a57863..d720de04a 100644
--- a/tests/intel/kms_ccs.c
+++ b/tests/intel/kms_ccs.c
@@ -190,6 +190,7 @@ typedef struct {
bool user_seed;
enum igt_commit_style commit;
int fb_list_length;
+ bool do_hibernate;
struct {
struct igt_fb fb;
int width, height;
@@ -839,8 +840,17 @@ static bool try_config(data_t *data, enum test_fb_flags fb_flags,
if (ret == 0 && !(fb_flags & TEST_BAD_ROTATION_90) && crc) {
if (data->flags & TEST_SUSPEND && fb_flags & FB_COMPRESSED) {
- igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
- SUSPEND_TEST_NONE);
+ if (data->do_hibernate) {
+ igt_require_f(igt_pm_check_hibernation_support(),
+ "Kernel is not cofigured for resume\n");
+ igt_require_f(igt_pm_ensure_grub_boots_same_kernel(),
+ "Couldn't find correct kernel in grub.cfg\n");
+ igt_system_suspend_autoresume(SUSPEND_STATE_DISK,
+ SUSPEND_TEST_NONE);
+ } else {
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+ }
/* on resume check flat ccs is still compressed */
if (is_xe_device(data->drm_fd) &&
@@ -1044,6 +1054,9 @@ static int opt_handler(int opt, int opt_index, void *opt_data)
data->user_seed = true;
data->seed = strtoul(optarg, NULL, 0);
break;
+ case 'r':
+ data->do_hibernate = true;
+ break;
default:
return IGT_OPT_HANDLER_ERROR;
}
@@ -1056,9 +1069,10 @@ static data_t data;
static const char *help_str =
" -c\t\tCheck the presence of compression meta-data\n"
" -s <seed>\tSeed for random number generator\n"
+" -r\t\tOn suspend test do full hibernate with reboot\n"
;
-igt_main_args("cs:", NULL, help_str, opt_handler, &data)
+igt_main_args("csr:", NULL, help_str, opt_handler, &data)
{
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
--
2.45.2
next prev parent reply other threads:[~2024-12-03 9:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 9:24 [PATCH i-g-t 0/2] Add hibernate helpers and kms_ccs hibernate test Juha-Pekka Heikkila
2024-12-03 9:24 ` [PATCH i-g-t 1/2] lib/igt_pm: Add helpers for hibernating kernel Juha-Pekka Heikkila
2024-12-05 21:49 ` Rodrigo Vivi
2024-12-03 9:24 ` Juha-Pekka Heikkila [this message]
2024-12-05 21:52 ` [PATCH i-g-t 2/2] tests/intel/kms_ccs: add hiberbate test Rodrigo Vivi
2024-12-03 13:41 ` ✗ i915.CI.BAT: failure for Add hibernate helpers and kms_ccs hibernate test Patchwork
2024-12-03 14:26 ` ✓ Xe.CI.BAT: success " Patchwork
2024-12-03 15:32 ` ✗ Xe.CI.Full: failure " Patchwork
2024-12-03 19:41 ` ✓ i915.CI.BAT: success for Add hibernate helpers and kms_ccs hibernate test (rev2) Patchwork
2024-12-03 19:52 ` ✗ Xe.CI.BAT: failure " Patchwork
2024-12-03 20:57 ` ✗ i915.CI.Full: " Patchwork
2024-12-03 21:05 ` ✗ Xe.CI.Full: " 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=20241203092418.3454357-3-juhapekka.heikkila@gmail.com \
--to=juhapekka.heikkila@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
/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