From: Riana Tauro <riana.tauro@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>,
<igt-dev@lists.freedesktop.org>
Cc: badal.nilawar@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/xe_pm : Add support to disable all crtc
Date: Wed, 28 Jun 2023 16:47:51 +0530 [thread overview]
Message-ID: <8dea5f19-66c1-39d1-3e51-a95852ce7ef3@intel.com> (raw)
In-Reply-To: <20230627112244.3847791-2-anshuman.gupta@intel.com>
Hi Anshuman
On 6/27/2023 4:52 PM, Anshuman Gupta wrote:
> xe_pm d3 test requires to disable all crtc in order to enter
> to d3 state therefore, adding the support to disable all crtc.
>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
> tests/xe/xe_pm.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/tests/xe/xe_pm.c b/tests/xe/xe_pm.c
> index 23b8246ed..c71fce892 100644
> --- a/tests/xe/xe_pm.c
> +++ b/tests/xe/xe_pm.c
> @@ -34,6 +34,7 @@ typedef struct {
> int fd_xe;
> struct pci_device *pci_xe;
> struct pci_device *pci_root;
> + igt_display_t display;
> } device_t;
>
> /* runtime_usage is only available if kernel build CONFIG_PM_ADVANCED_DEBUG */
> @@ -150,6 +151,23 @@ static bool out_of_d3(device_t device, enum igt_acpi_d_state state)
> return true;
> }
>
> +static void disable_all_crtc(device_t *device)
> +{
> + if (!drmModeGetResources(device->fd_xe))
> + return;
> +
> + igt_display_require(&device->display, device->fd_xe);
> + igt_modeset_disable_all_outputs(&device->display);
> +}
> +
> +static void display_fini(device_t *device)
> +{
> + if (!drmModeGetResources(device->fd_xe))
> + return;
> +
> + igt_display_fini(&device->display);
> +}
> +
> /**
> * SUBTEST: %s-basic
> * Description: set GPU state to %arg[1] and test suspend/autoresume
> @@ -378,6 +396,7 @@ igt_main
>
> get_d3cold_allowed(device.pci_xe, d3cold_allowed);
> igt_assert(igt_setup_runtime_pm(device.fd_xe));
> + disable_all_crtc(&device);
Should this be added in setup_d3 instead of fixture? The suspend tests
will also be executed with crtc disabled otherwise
Thanks
Riana
> }
>
> for (const struct s_state *s = s_states; s->name; s++) {
> @@ -438,6 +457,7 @@ igt_main
> }
>
> igt_fixture {
> + display_fini(&device);
> set_d3cold_allowed(device.pci_xe, d3cold_allowed);
> igt_restore_runtime_pm();
> xe_device_put(device.fd_xe);
next prev parent reply other threads:[~2023-06-28 11:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 11:22 [igt-dev] [PATCH i-g-t 0/2] vram d3cold threshold test Anshuman Gupta
2023-06-27 11:22 ` [igt-dev] [PATCH i-g-t 1/2] tests/xe_pm : Add support to disable all crtc Anshuman Gupta
2023-06-28 11:17 ` Riana Tauro [this message]
2023-06-28 11:23 ` Gupta, Anshuman
2023-06-27 11:22 ` [igt-dev] [PATCH i-g-t 2/2] test/xe_pm: Add vram_d3cold_threshold subtest Anshuman Gupta
2023-06-27 13:07 ` [igt-dev] ✗ Fi.CI.BUILD: failure for vram d3cold threshold 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=8dea5f19-66c1-39d1-3e51-a95852ce7ef3@intel.com \
--to=riana.tauro@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@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