mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-25 00:36:16 +00:00
tests/gem_softpin: New tests for softpin feature
These tests exercise the userptr ioctl to create shared buffers between CPU and GPU. They contain error and normal usage scenarios. They also contain a couple of stress tests which copy buffers between CPU and GPU. These tests rely on the softpin patch in order to pin buffers to a certain VA. Caveat: These tests were designed to run on 64-bit system. Future work includes adding logic to ensure these tests can run on 32-bit systems with PPGTT support. Some tests are currently disabled for 32-bit systems for that reason. v2: Added cc and signed-off-by fields v3: Fixed review comments, added helper functions. Removed userptr error scenarios covered by existing userptr tests. Modified stress test to have 100K buffers, it now runs for ~30 mins, checks every element has been written to correctly, and pins buffers at different VMAs. v4: Changed name to gem_softpin v5: More fixes. Removed the file based tests, will move them to userptr tests. Added a function that validates appropriate PPGTT support before running tests. Optimized stack space and memory footprint in stress test. Removed the eviction test, will add it back after verifying proper functionality. v6: Split basic test into userptr and bo Fixed some coding style issues. v7: Enhanced invalid vma pinning test to verify 32-bit PPGTT functionality. Enabled the test for 32-bit PPGTT systems, and verify pinning fails above 32-bit addresses. Enhanced the high adress pinning test to ensure pinning fails when EXEC_OBJECT_PINNED flag is not used. Some more cosmetic fixes to close buffer handles. Changed userptr function to used synchronized operations. v8: Minor change to high address pinning test as per comment. v9: Skip the tests if softpin support is not present. v10: Removed trailing white spaces. v11: Keep alphabetical order in Makefile and gitignore; update error code returned while trying to pin above the max vm size (EINVAL); test attempt to pin above 4GB without the support 48b flag. Cc: Michel Thierry <michel.thierry@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Signed-off-by: Michel Thierry <michel.thierry@intel.com> (v11) Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
This commit is contained in:
parent
89bcdb9022
commit
be2d5188f6
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -101,6 +101,7 @@ gem_seqno_wrap
|
||||
gem_set_tiling_vs_blt
|
||||
gem_set_tiling_vs_gtt
|
||||
gem_set_tiling_vs_pwrite
|
||||
gem_softpin
|
||||
gem_storedw_batches_loop
|
||||
gem_streaming_writes
|
||||
gem_stress
|
||||
|
@ -58,6 +58,7 @@ TESTS_progs_M = \
|
||||
gem_reset_stats \
|
||||
gem_ringfill \
|
||||
gem_set_tiling_vs_blt \
|
||||
gem_softpin \
|
||||
gem_stolen \
|
||||
gem_storedw_batches_loop \
|
||||
gem_streaming_writes \
|
||||
|
1084
tests/gem_softpin.c
Normal file
1084
tests/gem_softpin.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user