From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: petri.latvala@intel.com, igt-dev@lists.freedesktop.org,
badal.nilawar@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t v3 7/8] i915_pm_rpm: Extend gem_execbuf test with D3Cold
Date: Wed, 4 May 2022 13:54:58 -0400 [thread overview]
Message-ID: <YnK98pYt4cZnQXJU@intel.com> (raw)
In-Reply-To: <20220504135900.13806-8-anshuman.gupta@intel.com>
On Wed, May 04, 2022 at 07:28:59PM +0530, Anshuman Gupta wrote:
> Added d3cold dynamic subtest to gem_execbuf with device class
> memory region. It test both D3Cold-{VRAM_SR, Off} by using
> d3cold_sr_lmem_threshold i915_params debugfs.
>
> v2:
> - Two different subtest d3cold-off and d3cold-vrsr. [Rodrigo]
> v3:
> - Skip the d3cold-vram-sr test when lmem_threshold is not available.
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> tests/i915/i915_pm_rpm.c | 34 ++++++++++++++++++++++++++++++++--
> 1 file changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index b16d61643..a062fde88 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -1350,10 +1350,11 @@ static void submit_blt_cmd(uint32_t dst_handle, int dst_size,
> }
>
> /* Make sure we can submit a batch buffer and verify its result. */
> -static void gem_execbuf_subtest(struct drm_i915_gem_memory_class_instance *mem_regions)
> +static void gem_execbuf_subtest(struct drm_i915_gem_memory_class_instance *mem_regions, bool d3cold)
> {
> int x, y;
> uint32_t handle;
> + struct pci_device *root;
> int bpp = 4;
> int pitch = 128 * bpp;
> int dst_size = 128 * 128 * bpp; /* 128x128 square */
> @@ -1375,6 +1376,9 @@ static void gem_execbuf_subtest(struct drm_i915_gem_memory_class_instance *mem_r
> memset(cpu_buf, 0, dst_size);
> gem_write(drm_fd, handle, 0, cpu_buf, dst_size);
>
> + if (d3cold)
> + root = setup_d3cold_and_get_root_port();
> +
> /* Now suspend and try it. */
> disable_all_screens_and_wait(&ms_data);
>
> @@ -1383,8 +1387,15 @@ static void gem_execbuf_subtest(struct drm_i915_gem_memory_class_instance *mem_r
> &presumed_offset);
> igt_assert(wait_for_suspended());
>
> + if (d3cold)
> + igt_assert(wait_for_d3cold(root));
> +
> gem_read(drm_fd, handle, 0, cpu_buf, dst_size);
> igt_assert(wait_for_suspended());
> +
> + if (d3cold)
> + igt_assert(wait_for_d3cold(root));
> +
> for (y = 0; y < 128; y++) {
> for (x = 0; x < 128; x++) {
> uint32_t px = cpu_buf[y * 128 + x];
> @@ -1423,6 +1434,9 @@ static void gem_execbuf_subtest(struct drm_i915_gem_memory_class_instance *mem_r
>
> disable_all_screens_and_wait(&ms_data);
>
> + if (d3cold)
> + igt_assert(wait_for_d3cold(root));
> +
> memset(cpu_buf, 0, dst_size);
> gem_read(drm_fd, handle, 0, cpu_buf, dst_size);
> for (y = 0; y < 128; y++) {
> @@ -2182,7 +2196,23 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
> igt_subtest_with_dynamic("gem-execbuf") {
> for_each_memory_region(r, drm_fd) {
> igt_dynamic_f("%s", r->name)
> - gem_execbuf_subtest(&r->ci);
> + gem_execbuf_subtest(&r->ci, false);
> +
> + if (r->ci.memory_class == I915_MEMORY_CLASS_SYSTEM)
> + continue;
> +
> + igt_dynamic_f("%s-%s", "d3cold-off", r->name) {
> + if (lmem_threshold >= 0)
> + set_d3cold_sr_lmem_threshold(debugfs, 300);
> +
> + gem_execbuf_subtest(&r->ci, true);
> + }
> +
> + igt_dynamic_f("%s-%s", "d3cold-vrsr", r->name) {
> + igt_require(lmem_threshold >= 0);
> + set_d3cold_sr_lmem_threshold(debugfs, 0);
> + gem_execbuf_subtest(&r->ci, true);
> + }
> }
> }
> igt_subtest("gem-idle")
> --
> 2.26.2
>
next prev parent reply other threads:[~2022-05-04 17:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-04 13:58 [igt-dev] [PATCH i-g-t v3 0/8] D3Cold Tool & IGT Anshuman Gupta
2022-05-04 13:58 ` [igt-dev] [PATCH i-g-t v3 1/8] test/i915_pm_rpm: Add placement to gem-{mmap-type, execbuf} Anshuman Gupta
2022-05-04 13:58 ` [igt-dev] [PATCH i-g-t v3 2/8] lib/igt_device: Get gfx PCI card root port Anshuman Gupta
2022-05-04 13:58 ` [igt-dev] [PATCH i-g-t v3 3/8] lib/igt_pm: D3Cold runtime pm infrastructure Anshuman Gupta
2022-05-04 18:05 ` Rodrigo Vivi
2022-05-04 13:58 ` [igt-dev] [PATCH i-g-t v3 4/8] tools: Add intel_pm_rpm tool Anshuman Gupta
2022-05-04 13:58 ` [igt-dev] [PATCH i-g-t v3 5/8] i915_pm_rpm: Add D3Cold basic subtest Anshuman Gupta
2022-05-04 13:58 ` [igt-dev] [PATCH i-g-t v3 6/8] i915_pm_rpm: Extend gem_exec_stress test with D3Cold Anshuman Gupta
2022-05-04 17:54 ` Rodrigo Vivi
2022-05-04 13:58 ` [igt-dev] [PATCH i-g-t v3 7/8] i915_pm_rpm: Extend gem_execbuf " Anshuman Gupta
2022-05-04 17:54 ` Rodrigo Vivi [this message]
2022-05-04 13:59 ` [igt-dev] [PATCH i-g-t v3 8/8] i915_pm_rpm: Extend gem-mmap-type " Anshuman Gupta
2022-05-04 17:55 ` Rodrigo Vivi
2022-05-04 14:58 ` [igt-dev] ✗ Fi.CI.BAT: failure for D3Cold Tool & IGT (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=YnK98pYt4cZnQXJU@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@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