tests/xe/xe_exec_compute_mode: Test pinned userptr functionality
PATCH 1/1 tests/xe/xe_exec_compute_mode: Test pinned userptr functionality
Update the xe uapi definition and test the new XE_VM_BIND_FLAG_PIN flag with xe_exec_compute_mode . Compute mode VMs will initially be the main user of this flag.
--- include/drm-uapi/xe_drm.h | 18 +++++++++++ tests/xe/xe_exec_compute_mode.c | 54 +++++++++++++++++++++++++++------ 2 files changed, 63 insertions(+), 9 deletions(-)
include/drm-uapi/xe_drm.h +18 -0
@@ -631,6 +631,24 @@ struct drm_xe_vm_bind_op {* intended to implement VK sparse bindings. */ #define XE_VM_BIND_FLAG_NULL (0x1 << 19) +/* +* When the PIN flag is set, the user requests the underlying +* backing store of the vma to be pinned, that is, it will be +* resident while bound and the underlying physical memory +* will not change. For userptr VMAs this means that if the +* user performs an operation that changes the underlying +* pages of the CPU virtual space, the corresponding pinned +* GPU virtual space will not pick up the new memory unless +* an OP_UNMAP followed by a OP_MAP_USERPTR is performed. +* Pinned userptr memory is accounted in the same way as +* mlock(2), and if pinning fails the following error codes +* may be returned: +* -EINVAL: The memory region does not support pinning. +* -EPERM: The process is not permitted to pin. +* -ENOMEM: The pinning limit does not allow pinning. +* For userptr memory, CAP_IPC_LOCK will bypass the limit checking. +*/ +#define XE_VM_BIND_FLAG_PIN (0x1 << 20)/** @op: Operation to perform (lower 16 bits) and flags (upper 16 bits) */ __u32 op;
tests/xe/xe_exec_compute_mode.c +45 -9
93 lines not on this page · raw message
Signature · 1 line
2.41.0
Patchwork
CI[igt-dev] ✗ Fi.CI.BUILD: failure for tests/xe/xe_exec_compute_mode: Test pinned userptr functionality
== Series Details ==
== Series Details ==
Series: tests/xe/xe_exec_compute_mode: Test pinned userptr functionality
URL : https://patchwork.freedesktop.org/series/122760/
State : failure
== Summary ==
IGT patchset build failed on latest successful build 5d48d1fb231f449fe2f80cda14ea7a1ecfda59fa tests/amdgpu: Fix build error due to external file include
Tail of build.log:
Warning: igt@xe_uevent@fake_reset_uevent_listener Run type documentation is missing
Warning: igt@xe_vm@mmap-style-bind-all Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-either-side-full Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-either-side-partial Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-either-side-partial-hammer Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-either-side-partial-large-page-hammer Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-either-side-partial-split-page-hammer Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-end Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-front Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-many-all Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-many-either-side-partial Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-many-either-side-partial-hammer Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-one-partial Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-userptr-all Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-userptr-either-side-full Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-userptr-either-side-partial Functionality documentation is missing
Warning: igt@xe_vm@mmap-style-bind-userptr-one-partial Functionality documentation is missing
Warning: Missing documentation for igt@xe_exec_compute_mode@many-bindexecqueue-userptr-invalidate-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-bindexecqueue-userptr-invalidate-race-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-bindexecqueue-userptr-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-bindexecqueue-userptr-rebind-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-bindexecqueue-userptr-invalidate-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-bindexecqueue-userptr-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-bindexecqueue-userptr-rebind-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-userptr-invalidate-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-userptr-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-userptr-rebind-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-userptr-invalidate-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-userptr-invalidate-race-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-userptr-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@many-userptr-rebind-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@once-bindexecqueue-userptr-invalidate-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@once-bindexecqueue-userptr-invalidate-race-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@once-bindexecqueue-userptr-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@once-bindexecqueue-userptr-rebind-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@once-userptr-invalidate-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@once-userptr-invalidate-race-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@once-userptr-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@once-userptr-rebind-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@twice-bindexecqueue-userptr-invalidate-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@twice-bindexecqueue-userptr-invalidate-race-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@twice-bindexecqueue-userptr-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@twice-bindexecqueue-userptr-rebind-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@twice-userptr-invalidate-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@twice-userptr-invalidate-race-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@twice-userptr-pin
Warning: Missing documentation for igt@xe_exec_compute_mode@twice-userptr-rebind-pin [1621/1626] Generating kms_tests.rst with a custom command.
[1622/1626] Generating i915_tests.rst with a custom command.
ninja: build stopped: subcommand failed.