All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] tests/i915_pm_rpm: use device coherent mapping instead of mmap_gtt
Date: Mon, 16 Mar 2020 23:11:09 +0530	[thread overview]
Message-ID: <20200316174109.GA17722@intel.com> (raw)
In-Reply-To: <21b7a8754e777213b9e81b0e0b1385801c8c1139.1583975712.git.ashutosh.dixit@intel.com>

On 2020-03-11 at 18:17:14 -0700, Ashutosh Dixit wrote:
> From: Ramalingam C <ramalingam.c@intel.com>
> 
> Since on new discrete GPUs we dont have the mappable aperture, if that
> is acceptable for the test purpose, we should use GEM_MMAP_OFFSET.
> Hence using gem_mmap_device_coherent() which wraps the mmap options in
> the order of gem_mmap_offset / gem_mmap / mmap_gtt
> 
> In case of fencing/gtt related tests, we mandate the existance of the
> mmap_gtt.
> 
> v2:
>   3 tests are skipped based on mappable aperture and tiling support
> 
> v3: check for fences before enabling tiling (Ashutosh)
> 
> v4: s/gem_set_tiling/__gem_set_tiling/ (Chris)
> 
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Thanks for the review Ashutosh. Merged this patch.

-Ram
> Signed-off--by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  tests/i915/i915_pm_rpm.c | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index 9118e8953..7c2ef3bf1 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -1559,7 +1559,7 @@ static void fill_igt_fb(struct igt_fb *fb, uint32_t color)
>  	int i;
>  	uint32_t *ptr;
>  
> -	ptr = gem_mmap__gtt(drm_fd, fb->gem_handle, fb->size, PROT_WRITE);
> +	ptr = gem_mmap__device_coherent(drm_fd, fb->gem_handle, 0, fb->size, PROT_WRITE);
>  	for (i = 0; i < fb->size/sizeof(uint32_t); i++)
>  		ptr[i] = color;
>  	igt_assert(munmap(ptr, fb->size) == 0);
> @@ -1629,7 +1629,7 @@ static void cursor_subtest(bool dpms)
>  	 * hopefully it has some fences around it. */
>  	rc = drmModeRmFB(drm_fd, cursor_fb3.fb_id);
>  	igt_assert_eq(rc, 0);
> -	gem_set_tiling(drm_fd, cursor_fb3.gem_handle, false, cursor_fb3.strides[0]);
> +	__gem_set_tiling(drm_fd, cursor_fb3.gem_handle, false, cursor_fb3.strides[0]);
>  	igt_assert(wait_for_suspended());
>  
>  	rc = drmModeSetCursor(drm_fd, crtc_id, cursor_fb3.gem_handle,
> @@ -2051,8 +2051,10 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>  		gem_execbuf_subtest();
>  	igt_subtest("gem-idle")
>  		gem_idle_subtest();
> -	igt_subtest("gem-evict-pwrite")
> +	igt_subtest("gem-evict-pwrite") {
> +		gem_require_mappable_ggtt(drm_fd);
>  		gem_evict_pwrite_subtest();
> +	}
>  
>  	/* Planes and cursors */
>  	igt_subtest("cursor")
> @@ -2085,10 +2087,14 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>  		dpms_mode_unset_subtest(SCREEN_TYPE_LPSP);
>  	igt_subtest("dpms-mode-unset-non-lpsp")
>  		dpms_mode_unset_subtest(SCREEN_TYPE_NON_LPSP);
> -	igt_subtest("fences")
> +	igt_subtest("fences") {
> +		gem_require_mappable_ggtt(drm_fd);
>  		fences_subtest(false);
> -	igt_subtest("fences-dpms")
> +	}
> +	igt_subtest("fences-dpms") {
> +		gem_require_mappable_ggtt(drm_fd);
>  		fences_subtest(true);
> +	}
>  
>  	/* Modeset stress */
>  	igt_subtest("modeset-lpsp-stress")
> @@ -2129,10 +2135,14 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
>  		gem_execbuf_stress_subtest(rounds, WAIT_STATUS | WAIT_EXTRA);
>  
>  	/* power-wake reference tests */
> -	igt_subtest("pm-tiling")
> +	igt_subtest("pm-tiling") {
> +		gem_require_mappable_ggtt(drm_fd);
>  		pm_test_tiling();
> -	igt_subtest("pm-caching")
> +	}
> +	igt_subtest("pm-caching") {
> +		gem_require_mappable_ggtt(drm_fd);
>  		pm_test_caching();
> +	}
>  
>  	igt_fixture
>  		teardown_environment();
> -- 
> 2.25.0
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-03-16 17:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  5:44 [igt-dev] [PATCH i-g-t] tests/i915_pm_rpm: use device coherent mapping instead of mmap_gtt Ashutosh Dixit
2020-03-11  9:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2020-03-11  9:32 ` [igt-dev] [PATCH i-g-t] " Chris Wilson
2020-03-12  1:17 ` Ashutosh Dixit
2020-03-16 17:41   ` Ramalingam C [this message]
2020-03-12  2:03 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915_pm_rpm: use device coherent mapping instead of mmap_gtt (rev2) Patchwork
2020-03-12 19:44 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20200316174109.GA17722@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=ashutosh.dixit@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 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.