From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "Thasleem, Mohammed" <mohammed.thasleem@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 2/2] tests/i915/i915_pm_dc: Add DC6 PSR test for mtl
Date: Mon, 27 Mar 2023 10:26:07 +0000 [thread overview]
Message-ID: <e282213dabed513c03e02d922d773b8b7ee6a327.camel@intel.com> (raw)
In-Reply-To: <20230315210147.19557-3-mohammed.thasleem@intel.com>
On Thu, 2023-03-16 at 02:31 +0530, Mohammed Thasleem wrote:
> The flow for DC6 validation has changed for MTL.
> DC6 state achieved based on PKGC10 entry.
> This test validates PKGC10 entry and confirm DC6 achieved.
Can you please clarify in commit message why this has changed? Using
PKGC10 as indicator for DC6 entry is much more error prone. There are
much more possible blockers for PKGC* state entry compared to DC* state
entry. You should have good reasoning for your change.
>
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
> ---
> tests/i915/i915_pm_dc.c | 54
> ++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 53 insertions(+), 1 deletion(-)
>
> diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
> index 322a0c60..ed573ce6 100644
> --- a/tests/i915/i915_pm_dc.c
> +++ b/tests/i915/i915_pm_dc.c
> @@ -407,6 +407,38 @@ static void dpms_on(data_t *data)
> (IGT_RUNTIME_PM_STATUS_ACTIVE));
> }
>
> +static void psr_pkc_enable(data_t *data)
I think this naming doesn't make sense. Anyways, eventually this
function is doing same thing as:
kmstest_set_connector_dpms(data->drm_fd, data->display.outputs-
>config.connector, DRM_MODE_DPMS_OFF);
So maybe you could directly do that instead of splitting this into it's
own function? I.e. loop below doesn't make sense.
> +{
> + igt_output_t *output;
> +
> + for_each_connected_output(&data->display, output) {
> + drmModeConnectorPtr c = output->config.connector;
> +
> + if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
> + continue;
> +
> + kmstest_set_connector_dpms(data->drm_fd,
> + data->display.outputs-
> >config.connector,
> + DRM_MODE_DPMS_OFF);
As mentioned above this loop doesn't make sense. Maybe you wanted :
kmstest_set_connector_dpms(data->drm_fd, c, DRM_MODE_DPMS_OFF);
?
> + }
> +}
> +
> +static void psr_pkc_disable(data_t *data)
> +{
> + igt_output_t *output;
> +
> + for_each_connected_output(&data->display, output) {
> + drmModeConnectorPtr c = output->config.connector;
> +
> + if (c->connector_type == DRM_MODE_CONNECTOR_eDP)
> + continue;
> +
> + kmstest_set_connector_dpms(data->drm_fd,
> + data->display.outputs-
> >config.connector,
> + DRM_MODE_DPMS_ON);
> + }
> +}
> +
> static void test_dc_state_dpms(data_t *data, int dc_flag)
> {
> uint32_t dc_counter;
> @@ -551,6 +583,23 @@ static void test_pkc_state_dpms(data_t *data)
> dpms_on(data);
> }
>
> +static void test_pkc_state_psr(data_t *data)
Would it make more sense to differentiate in test_dc_state_psr instead
of having own function?
> +{
> + unsigned int timeout_msec = 30;
> + unsigned int prev_value = 0, cur_value = 0;
> +
> + prev_value = read_pkc_state_value(data->pmc_fd);
> + setup_output(data);
> + setup_primary(data);
> + igt_assert(psr_wait_entry(data->debugfs_fd, data-
> >op_psr_mode));
> + psr_pkc_enable(data);
> + cleanup_dc_psr(data);
> + igt_wait((cur_value = read_pkc_state_value(data->pmc_fd)),
> + timeout_msec * 1000, 100);
I think you want to have:
igt_wait((cur_value = read_pkc_state_value(data->pmc_fd)) >
prev_value,timeout_msec * 1000, 100);
> + igt_assert_f(cur_value > prev_value, "PK10 is not
> achieived.\n");
> + psr_pkc_disable(data);
> +}
> +
> static void kms_poll_state_restore(int sig)
> {
> int sysfs_fd;
> @@ -609,7 +658,10 @@ igt_main
> psr_enable(data.drm_fd, data.debugfs_fd,
> data.op_psr_mode);
> igt_require_f(igt_pm_pc8_plus_residencies_enabled(dat
> a.msr_fd),
> "PC8+ residencies not supported\n");
> - test_dc_state_psr(&data, CHECK_DC6);
> + if (intel_display_ver(data.devid) == 14)
> + test_pkc_state_psr(&data);
> + else
> + test_dc_state_psr(&data, CHECK_DC6);
> }
>
> igt_describe("This test validates display engine entry to DC5
> state "
BR,
Jouni Högander
next prev parent reply other threads:[~2023-03-27 10:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-15 21:01 [igt-dev] [PATCH i-g-t 0/2] tests/i915/i915_pm_dc: Add DC6 test for mtl Mohammed Thasleem
2023-03-15 21:01 ` [igt-dev] [PATCH i-g-t 1/2] tests/i915/i915_pm_dc: Add DC6 DPMS " Mohammed Thasleem
2023-03-21 22:56 ` Imre Deak
2023-03-27 19:30 ` [igt-dev] [PATCH v3 " Mohammed Thasleem
2023-03-28 19:34 ` Imre Deak
2023-03-15 21:01 ` [igt-dev] [PATCH i-g-t 2/2] tests/i915/i915_pm_dc: Add DC6 PSR " Mohammed Thasleem
2023-03-27 10:26 ` Hogander, Jouni [this message]
2023-04-04 12:10 ` Hogander, Jouni
2023-03-15 22:05 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/i915_pm_dc: Add DC6 test for mtl (rev2) Patchwork
2023-03-16 6:25 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-03-27 19:57 ` [igt-dev] ✗ Fi.CI.BUILD: failure for tests/i915/i915_pm_dc: Add DC6 test for mtl (rev3) 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=e282213dabed513c03e02d922d773b8b7ee6a327.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mohammed.thasleem@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