From: Anshuman Gupta <anshuman.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 6/6] i915/i915_pm_rpm: Add PC10 idle display on test
Date: Wed, 9 Dec 2020 21:36:42 +0530 [thread overview]
Message-ID: <20201209160642.6317-7-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20201209160642.6317-1-anshuman.gupta@intel.com>
Add a test which validates PC10 residencies with
psr idle display on.
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
tests/i915/i915_pm_rpm.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index d771d733..d2ea8d1b 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -79,6 +79,7 @@ enum pc8_status {
enum screen_type {
SCREEN_TYPE_LPSP,
SCREEN_TYPE_NON_LPSP,
+ SCREEN_TYPE_PSR,
SCREEN_TYPE_ANY,
};
@@ -128,6 +129,7 @@ struct modeset_params {
struct modeset_params lpsp_mode_params;
struct modeset_params non_lpsp_mode_params;
+struct modeset_params psr_mode_params;
struct modeset_params *default_mode_params;
static int modprobe(const char *driver)
@@ -293,6 +295,10 @@ static bool init_modeset_params_for_type(struct mode_set_data *data,
i915_output_is_lpsp_capable(drm_fd, output))
continue;
+ if (type == SCREEN_TYPE_PSR &&
+ !psr_sink_support(drm_fd, debugfs, PSR_MODE_1))
+ continue;
+
connector = c;
mode = igt_output_get_mode(output);
break;
@@ -327,6 +333,8 @@ static void init_modeset_cached_params(struct mode_set_data *data)
default_mode_params = &non_lpsp_mode_params;
else
default_mode_params = NULL;
+
+ init_modeset_params_for_type(data, &psr_mode_params, SCREEN_TYPE_PSR);
}
static bool set_mode_for_params(struct modeset_params *params)
@@ -358,6 +366,9 @@ static bool enable_one_screen_with_type(struct mode_set_data *data,
case SCREEN_TYPE_NON_LPSP:
params = &non_lpsp_mode_params;
break;
+ case SCREEN_TYPE_PSR:
+ params = &psr_mode_params;
+ break;
default:
igt_assert(0);
}
@@ -368,6 +379,12 @@ static bool enable_one_screen_with_type(struct mode_set_data *data,
return set_mode_for_params(params);
}
+static void enable_psr_screen(struct mode_set_data *data)
+{
+ psr_enable(drm_fd, debugfs, PSR_MODE_1);
+ igt_require(enable_one_screen_with_type(data, SCREEN_TYPE_PSR));
+}
+
static void enable_one_screen(struct mode_set_data *data)
{
/* SKIP if there are no connected screens. */
@@ -894,6 +911,12 @@ static void pc10_residency_subtest(bool display_on)
disable_all_screens_and_wait(&ms_data);
igt_assert_f(pc10_residency_changed(30),
"Machine is not reaching PC10 state with all screens disabled.\n");
+ } else {
+ /* check pc10 with psr screen */
+ enable_psr_screen(&ms_data);
+ igt_assert(psr_wait_entry(debugfs, PSR_MODE_1));
+ igt_assert_f(pc10_residency_changed(30),
+ "Machine is not reaching PC10 state with idle display on\n");
}
}
@@ -2136,6 +2159,8 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
pc8_residency_subtest(true);
igt_subtest("pc8-residency-display-off")
pc8_residency_subtest(false);
+ igt_subtest("pc10-residency-display-on")
+ pc10_residency_subtest(true);
igt_subtest("pc10-residency-display-off")
pc10_residency_subtest(false);
}
--
2.26.2
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-12-09 16:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 16:06 [igt-dev] [PATCH i-g-t 0/6] PC state igt test Anshuman Gupta
2020-12-09 16:06 ` [igt-dev] [PATCH i-g-t 1/6] i915/i915_pm_rpm: Enable PC8+ residency test Anshuman Gupta
2020-12-09 16:06 ` [igt-dev] [PATCH i-g-t 2/6] i915/i915_pm_rpm.c: create PC state subtest group Anshuman Gupta
2020-12-09 16:25 ` Chris Wilson
2020-12-09 16:25 ` Anshuman Gupta
2020-12-09 16:47 ` Chris Wilson
2020-12-10 5:02 ` Anshuman Gupta
2020-12-10 7:42 ` Chris Wilson
2021-01-21 19:55 ` Rodrigo Vivi
2021-01-22 5:46 ` Gupta, Anshuman
2020-12-09 16:06 ` [igt-dev] [PATCH i-g-t 3/6] i915/i915_pm_rpm: enable modeset-pc8-residency-stress test Anshuman Gupta
2020-12-09 16:06 ` [igt-dev] [PATCH i-g-t 4/6] i915/i915_pm_rpm: gem-execbuf-stress-pc8 use powetop Anshuman Gupta
2020-12-09 16:06 ` [igt-dev] [PATCH i-g-t 5/6] i915/i915_pm_rpm: Add PC10 display off test Anshuman Gupta
2020-12-09 16:06 ` Anshuman Gupta [this message]
2020-12-09 17:15 ` [igt-dev] ✗ Fi.CI.BAT: failure for PC state igt test 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=20201209160642.6317-7-anshuman.gupta@intel.com \
--to=anshuman.gupta@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