Skip to contentSkip to conversation

tests/amdgpu: fix VM test issue

PATCH Superseded Jesse Zhang 2 participants 3 messages Dec 15, 2023

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tests/amdgpu: fix VM test issue

Test case name:igt@amdgpu/amd_vm@amdgpu-vm-unaligned-map
Fail error: "Starting subtest: amdgpu-vm-unaligned-map
(amd_vm:8876) CRITICAL: Test assertion failure function amdgpu_vm_unaligned_map, file ../tests/amdgpu/amd_vm.c:131:
(amd_vm:8876) CRITICAL: Failed assertion: r == 0
(amd_vm:8876) CRITICAL: Last errno: 12, Cannot allocate memory
(amd_vm:8876) CRITICAL: error: -12 != 0
Subtest amdgpu-vm-unaligned-map failed.

Because of some device don't have lots of memories, such as mobile devices. So change test memory size for them.

Cc Vitaly Prosyak <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Christian Koenig <[email protected]>
Cc Kamil Konieczny <[email protected]>
---
 tests/amdgpu/amd_vm.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
tests/amdgpu/amd_vm.c +11 -4
index 11be25ae8..d0cf3676d 100644
@@ -115,11 +115,11 @@ amdgpu_vmid_reserve_test(amdgpu_device_handle device_handle,
 static void
 amdgpu_vm_unaligned_map(amdgpu_device_handle device_handle)
 {
-	const uint64_t map_size = (4ULL << 30) - (2 << 12);
+	uint64_t map_size = (4ULL << 30) - (2 << 12);
 	struct amdgpu_bo_alloc_request request = {};
 	amdgpu_bo_handle buf_handle;
 	amdgpu_va_handle handle;
-	uint64_t vmc_addr;
+	uint64_t vmc_addr, alignment = 1ULL << 30;
 	int r;
 
 	request.alloc_size = 4ULL << 30;
@@ -127,11 +127,18 @@ amdgpu_vm_unaligned_map(amdgpu_device_handle device_handle)
 	request.preferred_heap = AMDGPU_GEM_DOMAIN_VRAM;
 	request.flags = AMDGPU_GEM_CREATE_NO_CPU_ACCESS;
 
-	r = amdgpu_bo_alloc(device_handle, &request, &buf_handle);
+	if (-ENOMEM == amdgpu_bo_alloc(device_handle, &request, &buf_handle)) {
+		/* Try allocate on the device of small memory */
+		request.alloc_size = 4ULL << 20;
+		map_size = (4ULL << 20) - (2 << 12);
+		alignment = 4ULL << 20;
+		r = amdgpu_bo_alloc(device_handle, &request, &buf_handle);
+	}
+
 	igt_assert_eq(r, 0);
 
 	r = amdgpu_va_range_alloc(device_handle, amdgpu_gpu_va_range_general,
-				4ULL << 30, 1ULL << 30, 0, &vmc_addr,
+				request.alloc_size, alignment, 0, &vmc_addr,
 				&handle, 0);
 	igt_assert_eq(r, 0);
 
Signature · 1 line
2.25.1
#1 lore raw

✓ CI.xeBAT: success for tests/amdgpu: fix VM test issue (rev2)

== Series Details ==

== Series Details ==

Series: tests/amdgpu: fix VM test issue (rev2)
URL : https://patchwork.freedesktop.org/series/127794/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_7643_BAT -> XEIGTPW_10425_BAT
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (4 -> 4)
------------------------------

No changes in participating hosts

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@kms_flip@basic-flip-vs-wf_vblank@d-edp1:
- bat-adlp-7: [PASS][1] -> [FAIL][2] ([Intel XE#480]) +1 other test fail
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-adlp-7/igt@kms_flip@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10425/bat-adlp-7/igt@kms_flip@[email protected]

* igt@xe_prime_self_import@basic-with_fd_dup:
- bat-atsm-2: [PASS][3] -> [FAIL][4] ([Intel XE#999])
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-atsm-2/igt@xe_prime_self_import@basic-with_fd_dup.html
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10425/bat-atsm-2/igt@xe_prime_self_import@basic-with_fd_dup.html

#### Possible fixes ####

* igt@kms_cursor_legacy@basic-flip-before-cursor-atomic:
- bat-adlp-7: [FAIL][5] ([i915#2346]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-adlp-7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10425/bat-adlp-7/igt@[email protected]

* igt@kms_flip@basic-flip-vs-wf_vblank:
- bat-dg2-oem2: [FAIL][7] ([Intel XE#480]) -> [PASS][8] +1 other test pass
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-dg2-oem2/igt@kms_flip@basic-flip-vs-wf_vblank.html
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10425/bat-dg2-oem2/igt@kms_flip@basic-flip-vs-wf_vblank.html

* igt@kms_frontbuffer_tracking@basic:
- bat-adlp-7: [DMESG-FAIL][9] ([Intel XE#1033]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-adlp-7/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10425/bat-adlp-7/igt@[email protected]

* igt@xe_create@create-execqueues-noleak:
- bat-adlp-7: [FAIL][11] ([Intel XE#524]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7643/bat-adlp-7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10425/bat-adlp-7/igt@[email protected]

[Intel XE#1033]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1033
[Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
[Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524
[Intel XE#999]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/999
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346

Build changes
-------------

* IGT: IGT_7643 -> IGTPW_10425
* Linux: xe-577-5cd1893366708380854f4694ae57417192458a6b -> xe-579-6154a8abd3c0766b93740feb7e0268ae3f425849

IGTPW_10425: 10425
IGT_7643: ced22f8bf4263ff395dc852c86b682e62a7a1c1b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-577-5cd1893366708380854f4694ae57417192458a6b: 5cd1893366708380854f4694ae57417192458a6b xe-579-6154a8abd3c0766b93740feb7e0268ae3f425849: 6154a8abd3c0766b93740feb7e0268ae3f425849

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10425/index.html

#2 lore raw

✗ Fi.CI.BAT: failure for tests/amdgpu: fix VM test issue (rev2)

In reply to Jesse Zhang
== Series Details ==

== Series Details ==

Series: tests/amdgpu: fix VM test issue (rev2)
URL : https://patchwork.freedesktop.org/series/127794/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14024 -> IGTPW_10425
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_10425 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10425, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/index.html

Participating hosts (38 -> 36)
------------------------------

Missing (2): bat-kbl-2 fi-snb-2520m

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_suspend@basic-s3-without-i915:
- bat-adlp-11: [PASS][1] -> [ABORT][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14024/bat-adlp-11/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/bat-adlp-11/igt@[email protected]

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s0@lmem0:
- bat-dg2-9: [PASS][3] -> [INCOMPLETE][4] ([i915#9275])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14024/bat-dg2-9/igt@gem_exec_suspend@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/bat-dg2-9/igt@gem_exec_suspend@[email protected]

* igt@gem_huc_copy@huc-copy:
- fi-kbl-7567u: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#2190])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/fi-kbl-7567u/igt@[email protected]

* igt@kms_pm_backlight@basic-brightness@edp-1:
- bat-rplp-1: NOTRUN -> [ABORT][6] ([i915#8668])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/bat-rplp-1/igt@kms_pm_backlight@[email protected]

#### Possible fixes ####

* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- bat-rplp-1: [ABORT][7] ([i915#8668]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14024/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]

#### Warnings ####

* igt@kms_dsc@dsc-basic:
- bat-rpls-2: [SKIP][9] ([i915#3555] / [i915#3840]) -> [SKIP][10] ([i915#3555] / [i915#3840] / [i915#9886])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14024/bat-rpls-2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/bat-rpls-2/igt@[email protected]
- bat-jsl-1: [SKIP][11] ([i915#3555]) -> [SKIP][12] ([i915#3555] / [i915#9886])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14024/bat-jsl-1/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/bat-jsl-1/igt@[email protected]
- bat-jsl-3: [SKIP][13] ([i915#3555]) -> [SKIP][14] ([i915#3555] / [i915#9886])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14024/bat-jsl-3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/bat-jsl-3/igt@[email protected]

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

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#9275]: https://gitlab.freedesktop.org/drm/intel/issues/9275
[i915#9886]: https://gitlab.freedesktop.org/drm/intel/issues/9886

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_7643 -> IGTPW_10425

CI-20190529: 20190529
CI_DRM_14024: 525c53d6256c9c65884a28385351097e8aba6057 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10425: 10425
IGT_7643: ced22f8bf4263ff395dc852c86b682e62a7a1c1b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10425/index.html