igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it
@ 2018-08-07 15:57 Chris Wilson
  2018-08-07 17:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2018-08-07 15:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Create and export an amdgpu bo into i915 so that we can try and
invalidate the i915_bo->pages from inside the shrinker, teaching lockdep
about that linkage.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
 tests/amdgpu/amd_prime.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
index 9bf298a41..bda0ce83d 100644
--- a/tests/amdgpu/amd_prime.c
+++ b/tests/amdgpu/amd_prime.c
@@ -392,6 +392,35 @@ static void amd_to_i915(int i915, int amd, amdgpu_device_handle device)
 				 ib_result_mc_address, 4096);
 }
 
+static void shrink(int i915, int amd, amdgpu_device_handle device)
+{
+	struct amdgpu_bo_alloc_request request = {
+		.alloc_size = 1024 * 1024 * 4,
+		.phys_alignment = 4096,
+		.preferred_heap = AMDGPU_GEM_DOMAIN_GTT,
+	};
+	amdgpu_bo_handle bo;
+	uint32_t handle;
+	int dmabuf;
+
+	igt_assert_eq(amdgpu_bo_alloc(device, &request, &bo), 0);
+	amdgpu_bo_export(bo,
+			 amdgpu_bo_handle_type_dma_buf_fd,
+			 (uint32_t *)&dmabuf);
+	amdgpu_bo_free(bo);
+
+	handle = prime_fd_to_handle(i915, dmabuf);
+	close(dmabuf);
+
+	/* Populate the i915_bo->pages. */
+	gem_set_domain(i915, handle, I915_GEM_DOMAIN_GTT, 0);
+
+	/* Now evict them, establishing the link from i915:shrinker to amd. */
+	igt_drop_caches_set(i915, DROP_SHRINK_ALL);
+
+	gem_close(i915, handle);
+}
+
 igt_main
 {
 	amdgpu_device_handle device;
@@ -420,6 +449,9 @@ igt_main
 	igt_subtest("amd-to-i915")
 		amd_to_i915(i915, amd, device);
 
+	igt_subtest("shrink")
+		shrink(i915, amd, device);
+
 	igt_fixture {
 		amdgpu_device_deinitialize(device);
 		close(amd);
-- 
2.18.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it
  2018-08-07 15:57 [Intel-gfx] [PATCH i-g-t] igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it Chris Wilson
@ 2018-08-07 17:33 ` Patchwork
  2018-08-07 18:26 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2018-08-08 12:49 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-08-07 17:33 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it
URL   : https://patchwork.freedesktop.org/series/47823/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4612 -> IGTPW_1687 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/47823/revisions/1/mbox/

== Known issues ==

  Here are the changes found in IGTPW_1687 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      {fi-cfl-8109u}:     PASS -> DMESG-FAIL (fdo#106560)

    igt@drv_selftest@live_workarounds:
      fi-bdw-5557u:       PASS -> DMESG-FAIL (fdo#107292)

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
      {fi-byt-clapper}:   PASS -> FAIL (fdo#107362)

    igt@kms_pipe_crc_basic@read-crc-pipe-c-frame-sequence:
      fi-skl-guc:         PASS -> FAIL (fdo#103191)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    
    ==== Possible fixes ====

    igt@drv_selftest@live_workarounds:
      {fi-bsw-kefka}:     DMESG-FAIL (fdo#107292) -> PASS

    igt@kms_chamelium@common-hpd-after-suspend:
      fi-skl-6700k2:      INCOMPLETE (fdo#105524, k.org#199541, fdo#104108) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       DMESG-FAIL (fdo#106103, fdo#102614) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#105524 https://bugs.freedesktop.org/show_bug.cgi?id=105524
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
  fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
  fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  k.org#199541 https://bugzilla.kernel.org/show_bug.cgi?id=199541


== Participating hosts (53 -> 48) ==

  Missing    (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u 


== Build changes ==

    * IGT: IGT_4586 -> IGTPW_1687

  CI_DRM_4612: 54b418b10dad143d1bbe7708de5bbf3344164303 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1687: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1687/
  IGT_4586: 57caaf440520e397403d898e1d3f1d65ef7b79e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@amdgpu/amd_prime@shrink

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1687/issues.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it
  2018-08-07 15:57 [Intel-gfx] [PATCH i-g-t] igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it Chris Wilson
  2018-08-07 17:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-08-07 18:26 ` Patchwork
  2018-08-08 12:49 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-08-07 18:26 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it
URL   : https://patchwork.freedesktop.org/series/47823/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4586_full -> IGTPW_1687_full =

== Summary - WARNING ==

  Minor unknown changes coming with IGTPW_1687_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_1687_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/47823/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in IGTPW_1687_full:

  === IGT changes ===

    ==== Warnings ====

    igt@perf_pmu@rc6:
      shard-kbl:          SKIP -> PASS

    igt@perf_pmu@rc6-runtime-pm-long:
      shard-apl:          PASS -> SKIP +1
      shard-glk:          PASS -> SKIP +1
      shard-hsw:          PASS -> SKIP +1

    igt@pm_rc6_residency@rc6-accuracy:
      shard-kbl:          PASS -> SKIP +2

    
== Known issues ==

  Here are the changes found in IGTPW_1687_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-kbl:          PASS -> INCOMPLETE (fdo#106886, fdo#103665)

    igt@gem_exec_parallel@default-contexts:
      shard-snb:          PASS -> INCOMPLETE (fdo#105411)

    igt@kms_cursor_legacy@all-pipes-torture-bo:
      shard-glk:          PASS -> DMESG-WARN (fdo#107122)

    igt@kms_cursor_legacy@pipe-c-torture-move:
      shard-apl:          PASS -> DMESG-WARN (fdo#107122) +1

    igt@kms_fbcon_fbt@fbc-suspend:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@pm_rpm@dpms-mode-unset-non-lpsp:
      shard-apl:          PASS -> FAIL (fdo#106539)
      shard-kbl:          PASS -> FAIL (fdo#106539)
      shard-hsw:          PASS -> FAIL (fdo#106539)
      shard-glk:          PASS -> FAIL (fdo#106539)

    
    ==== Possible fixes ====

    igt@gem_softpin@noreloc-s3:
      shard-glk:          FAIL (fdo#103375) -> PASS

    igt@kms_available_modes_crc@available_mode_test_crc:
      shard-snb:          FAIL (fdo#106641) -> PASS

    igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
      shard-kbl:          INCOMPLETE (fdo#103665) -> PASS

    igt@kms_rotation_crc@primary-rotation-180:
      shard-snb:          FAIL (fdo#103925) -> PASS

    igt@kms_setmode@basic:
      shard-kbl:          FAIL (fdo#99912) -> PASS

    igt@perf_pmu@init-wait-rcs0:
      shard-snb:          INCOMPLETE (fdo#105411) -> PASS

    igt@pm_rpm@dpms-mode-unset-lpsp:
      shard-glk:          FAIL (fdo#106539) -> SKIP +1
      shard-apl:          FAIL (fdo#106539) -> SKIP +1
      shard-kbl:          FAIL (fdo#106539) -> SKIP +1

    igt@pm_rpm@modeset-lpsp-stress:
      shard-hsw:          FAIL (fdo#106539) -> SKIP +1

    igt@pm_rps@min-max-config-loaded:
      shard-glk:          FAIL (fdo#107466) -> PASS

    igt@testdisplay:
      shard-glk:          DMESG-WARN (fdo#105763) -> PASS

    
  fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103925 https://bugs.freedesktop.org/show_bug.cgi?id=103925
  fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
  fdo#106539 https://bugs.freedesktop.org/show_bug.cgi?id=106539
  fdo#106641 https://bugs.freedesktop.org/show_bug.cgi?id=106641
  fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
  fdo#107122 https://bugs.freedesktop.org/show_bug.cgi?id=107122
  fdo#107466 https://bugs.freedesktop.org/show_bug.cgi?id=107466
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * IGT: IGT_4586 -> IGTPW_1687
    * Linux: CI_DRM_4606 -> CI_DRM_4612

  CI_DRM_4606: 603c0696f3c56d3f1e47c283de897448473c9041 @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_4612: 54b418b10dad143d1bbe7708de5bbf3344164303 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_1687: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1687/
  IGT_4586: 57caaf440520e397403d898e1d3f1d65ef7b79e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_1687/shards.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it
  2018-08-07 15:57 [Intel-gfx] [PATCH i-g-t] igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it Chris Wilson
  2018-08-07 17:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2018-08-07 18:26 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2018-08-08 12:49 ` Tvrtko Ursulin
  2 siblings, 0 replies; 4+ messages in thread
From: Tvrtko Ursulin @ 2018-08-08 12:49 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx; +Cc: igt-dev, Daniel Vetter, Tvrtko Ursulin


On 07/08/2018 16:57, Chris Wilson wrote:
> Create and export an amdgpu bo into i915 so that we can try and
> invalidate the i915_bo->pages from inside the shrinker, teaching lockdep
> about that linkage.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> ---
>   tests/amdgpu/amd_prime.c | 32 ++++++++++++++++++++++++++++++++
>   1 file changed, 32 insertions(+)
> 
> diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
> index 9bf298a41..bda0ce83d 100644
> --- a/tests/amdgpu/amd_prime.c
> +++ b/tests/amdgpu/amd_prime.c
> @@ -392,6 +392,35 @@ static void amd_to_i915(int i915, int amd, amdgpu_device_handle device)
>   				 ib_result_mc_address, 4096);
>   }
>   
> +static void shrink(int i915, int amd, amdgpu_device_handle device)
> +{
> +	struct amdgpu_bo_alloc_request request = {
> +		.alloc_size = 1024 * 1024 * 4,
> +		.phys_alignment = 4096,
> +		.preferred_heap = AMDGPU_GEM_DOMAIN_GTT,
> +	};
> +	amdgpu_bo_handle bo;
> +	uint32_t handle;
> +	int dmabuf;
> +
> +	igt_assert_eq(amdgpu_bo_alloc(device, &request, &bo), 0);
> +	amdgpu_bo_export(bo,
> +			 amdgpu_bo_handle_type_dma_buf_fd,
> +			 (uint32_t *)&dmabuf);
> +	amdgpu_bo_free(bo);
> +
> +	handle = prime_fd_to_handle(i915, dmabuf);
> +	close(dmabuf);
> +
> +	/* Populate the i915_bo->pages. */
> +	gem_set_domain(i915, handle, I915_GEM_DOMAIN_GTT, 0);
> +
> +	/* Now evict them, establishing the link from i915:shrinker to amd. */
> +	igt_drop_caches_set(i915, DROP_SHRINK_ALL);
> +
> +	gem_close(i915, handle);
> +}
> +
>   igt_main
>   {
>   	amdgpu_device_handle device;
> @@ -420,6 +449,9 @@ igt_main
>   	igt_subtest("amd-to-i915")
>   		amd_to_i915(i915, amd, device);
>   
> +	igt_subtest("shrink")
> +		shrink(i915, amd, device);
> +
>   	igt_fixture {
>   		amdgpu_device_deinitialize(device);
>   		close(amd);
> 

Well, I am not familiar with the admgpu API, but it looks believable and 
knowing you got a Hades Canyon I trust it works.

Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-08-08 12:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-07 15:57 [Intel-gfx] [PATCH i-g-t] igt/amd_prime: Link an amdgpu bo into i915 and try to shrink it Chris Wilson
2018-08-07 17:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-08-07 18:26 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-08-08 12:49 ` [igt-dev] [PATCH i-g-t] " Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).