From: Imre Deak <imre.deak@intel.com>
To: Jyoti Yadav <jyoti.r.yadav@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v3 4/5] [intel-gfx] tests/pm_dc: Added test for DC5 during DPMS
Date: Wed, 21 Nov 2018 19:42:33 +0200 [thread overview]
Message-ID: <20181121174233.GH1830@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <1541244966-27134-5-git-send-email-jyoti.r.yadav@intel.com>
On Sat, Nov 03, 2018 at 07:36:05AM -0400, Jyoti Yadav wrote:
> Added new subtest for DC5 entry during DPMS on/off cycle.
> During DPMS on/off cycle DC5 counter is incremented.
>
> v2: Rename the subtest with meaningful name.
> v3: Rebased
>
> Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
> ---
> tests/pm_dc.c | 35 ++++++++++++++++++++++++++++++++++-
> 1 file changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/tests/pm_dc.c b/tests/pm_dc.c
> index 3ecfb1c..d47b837 100644
> --- a/tests/pm_dc.c
> +++ b/tests/pm_dc.c
> @@ -171,6 +171,29 @@ static void test_dc_state_psr(data_t *data, int dc_flag)
> check_dc_counter(data->drm_fd, dc_flag, dc_counter_before_psr);
> }
>
> +static void dpms_off_on(data_t *data)
> +{
> + for (int i = 0; i < data->display.n_outputs; i++) {
> + kmstest_set_connector_dpms(data->drm_fd, data->display.outputs[i].config.connector,
> + DRM_MODE_DPMS_OFF);
> + }
> + igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
> + for (int i = 0; i < data->display.n_outputs; i++) {
> + kmstest_set_connector_dpms(data->drm_fd, data->display.outputs[i].config.connector,
> + DRM_MODE_DPMS_ON);
> + }
> + igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_ACTIVE));
> +}
> +
> +static void test_dc_state_dpms(data_t *data, int dc_flag)
> +{
> + uint32_t dc_counter;
> +
> + dc_counter = read_dc_counter(data->drm_fd, dc_flag);
> + dpms_off_on(data);
> + check_dc_counter(data->drm_fd, dc_flag, dc_counter);
> +}
> +
> int main(int argc, char *argv[])
> {
> bool has_runtime_pm;
> @@ -208,13 +231,23 @@ int main(int argc, char *argv[])
> psr_enable(data.debugfs_fd);
> igt_require_f(edp_psr_sink_support(&data),
> "Sink does not support PSR\n");
> - /* Check DC5 counter is available for the platform.
> + /* Check DC6 counter is available for the platform.
Should be fixed in the patch adding this.
> * Skip the test if counter is not available.
> */
> read_dc_counter(data.drm_fd, CHECK_DC6);
> test_dc_state_psr(&data, CHECK_DC6);
> cleanup(&data);
> }
> +
> + igt_subtest("dc5-dpms") {
> + /* Check DC5 counter is available for the platform.
> + * Skip the test if counter is not available.
> + */
> + read_dc_counter(data.drm_fd, CHECK_DC5);
> + test_dc_state_dpms(&data, CHECK_DC5);
> + // cleanup(&data);
Leftover code.
> + }
> +
> igt_fixture {
> close(data.debugfs_fd);
> display_fini(&data);
> --
> 1.9.1
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-11-21 17:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-03 11:36 [igt-dev] [PATCH i-g-t v3 0/5] Added new test file pm_dc.c Jyoti Yadav
2018-11-03 11:36 ` [igt-dev] [PATCH i-g-t v3 1/5] [intel-gfx] lib/igt_pm: Moves Dmc_loaded() function into library Jyoti Yadav
2018-11-03 11:36 ` [igt-dev] [PATCH i-g-t v3 2/5] [intel-gfx] tests/pm_dc: Added new test to verify Display C States Jyoti Yadav
2018-11-21 17:39 ` Imre Deak
2018-11-03 11:36 ` [igt-dev] [PATCH i-g-t v3 3/5] [intel-gfx] tests/pm_dc: Added test for DC6 during PSR Jyoti Yadav
2018-11-21 17:40 ` Imre Deak
2018-11-03 11:36 ` [igt-dev] [PATCH i-g-t v3 4/5] [intel-gfx] tests/pm_dc: Added test for DC5 during DPMS Jyoti Yadav
2018-11-21 17:42 ` Imre Deak [this message]
2018-11-03 11:36 ` [igt-dev] [PATCH i-g-t v3 5/5] [intel-gfx] tests/pm_dc: Added test for DC6 " Jyoti Yadav
2018-11-21 17:43 ` Imre Deak
2018-11-03 12:25 ` [igt-dev] ✓ Fi.CI.BAT: success for Added new test file pm_dc.c (rev2) Patchwork
2018-11-03 13:43 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-11-21 18:10 ` Imre Deak
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=20181121174233.GH1830@ideak-desk.fi.intel.com \
--to=imre.deak@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jyoti.r.yadav@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.