- Sep 26, 2023
-
-
Lionel Landwerlin authored
Signed-off-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-
Vitaly Prosyak authored
Add GFX11 to dispatch tests known as GPU reset with binary shaders. Improve GPU reset tests by validating flags, if no reset or reset is still in progress then avoid asserting the status. Use the amdgpu_cs_query_reset_state2 which is available on drmlib > 2.4.99. Remove dispatch tests from basic tests due to duplicate. v2: - restricted build for dispatch tests due to build failure for drmlib < 2.4.99 (Kamil) - spelling correction and formatting issues (Kamil) - improve comment (Luben) Cc: Jesse Zhang <Jesse.Zhang@amd.com> Cc: Luben Tuikov <luben.tuikov@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian Koenig <christian.koenig@amd.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by:
Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by:
Jesse Zhang <Jesse.Zhang@amd.com>
-
Vitaly Prosyak authored
Split GPU reset (known as deadlock) tests into command-based (deadlock) and the other using binary shaders (dispatch).The one of primary reasons for splitting is to use new functions like 'amdgpu_cs_query_reset_state2' in next commits. No functional change. Some code formatting improvements to meet IGT guidelines. Added igt_describe for GPU reset tests known now as deadlock and dispatch based tests. Cc: Luben Tuikov <luben.tuikov@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian Koenig <christian.koenig@amd.com> Cc: Jesse Zhang <Jesse.Zhang@amd.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by:
Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by:
Jesse Zhang <Jesse.Zhang@amd.com>
-
- Sep 25, 2023
-
-
Alex Hung authored
Add new subtests for DRM_FORMAT_XRGB2101010 when it is supported. The change also checks supported color formats and runs or skips accordingly. Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Signed-off-by:
Alex Hung <alex.hung@amd.com>
-
Alex Hung authored
Allow 10 bits (DRM_FORMAT_XRGB2101010) components to be hashed as well. Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Signed-off-by:
Alex Hung <alex.hung@amd.com>
-
Alex Hung authored
The function was implemented as a 32-bit hashing function. Commit 85f4c100 ("lib/igt_fb: Ignore the X component when computing CRC") broke this behavior by hashing 8-bit portions. Restore the 32-bit hasing behavior while still ignoring the X compoment. Reviewed-by:
Harry Wentland <harry.wentland@amd.com> Signed-off-by:
Alex Hung <alex.hung@amd.com>
-
Mauro Carvalho Chehab authored
Without that, extensions from other directories might be probed, which is not what we want to do. Such solution was imported from the Linux Kernel conf.py setting. Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Rahul Janga authored
Check correctness of tile_count info. v2: Use snprintf. (Kamil) v3: Add size param. (Kamil) Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Cc: Sai Gowtham Ch <sai.gowtham.ch@intel.com> Reviewed-by:
Sai Gowtham Ch <sai.gowtham.ch@intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by:
Janga Rahul Kumar <janga.rahul.kumar@intel.com>
-
- Sep 22, 2023
-
-
Rahul Janga authored
Correct the STATE_BASE_ADDRESS Instruction data size. Signed-off-by:
Janga Rahul Kumar <janga.rahul.kumar@intel.com> Reviewed-by:
Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
-
Add tests to verify fdinfo published by xe KMD with following subtests : @basic @drm-total-residents @drm-shared @drm-active Example fdinfo format: pos: 0 flags: 0100002 mnt_id: 23 ino: 1140 drm-driver: xe drm-client-id: 19 drm-pdev: 0000:4d:00.0 drm-total-system: 0 drm-shared-system: 0 drm-active-system: 0 drm-resident-system: 0 drm-purgeable-system: 0 drm-total-gtt: 4 KiB drm-shared-gtt: 0 drm-active-gtt: 0 drm-resident-gtt: 4 KiB drm-total-vram0: 20 KiB drm-shared-vram0: 0 drm-active-vram0: 0 drm-resident-vram0: 20 KiB drm-total-vram1: 20 KiB drm-shared-vram1: 0 drm-active-vram1: 0 drm-resident-vram1: 20 KiB TODO: drm-purgeable test is not possbile as we consider objects in system memory to be purgeable but current xe KMD does not allow BOs to be created in system memory (instead KMD creates it in XE_PL_TT which is VRAM backed system memory). V4: - Put pre_size checks - Rahul - Check all test for all regions - Rahul V3: - Expand basic test - Rahul - Use defined var at all places - Rahul - Update commit message - Rahul - Adapt spin_init API change V2: - Replace printf with igt_info - Kamil - run checkpatch - Kamil - use igt_assert_f - Kamil Reviewed-by:
Janga Rahul <Kumar<janga.rahul.kumar@intel.com> Signed-off-by:
Tejas Upadhyay <tejas.upadhyay@intel.com>
-
Juha-Pekka Heikkilä authored
on xe driver need to use blitter with all tiling modifiers Signed-off-by:
Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by:
Swati Sharma <swati2.sharma@intel.com>
-
Nirmoy Das authored
We do GGTT update on MTL using bcs engine, blocking that would fail the test so skip such subtests on bcs engine for MTL. Signed-off-by:
Nirmoy Das <nirmoy.das@intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
Nirmoy Das authored
We do GGTT update on MTL using bcs engine, blocking that would fail the test so skip such subtests on bcs engine for MTL. Signed-off-by:
Nirmoy Das <nirmoy.das@intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
Nirmoy Das authored
We do GGTT update on MTL using bcs engine, blocking that would fail the test so skip such subtests on bcs engine for MTL. Signed-off-by:
Nirmoy Das <nirmoy.das@intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
Nirmoy Das authored
On MTL GGTT updates happens through MI_UPDATE_GGTT command. Add a method to detect if a engine can block ggtt binder. Signed-off-by:
Nirmoy Das <nirmoy.das@intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
- Sep 21, 2023
-
-
Mauro Carvalho Chehab authored
Sometimes, multiple files may contain testlists and blocklists for the same name. Add support for it by placing such lists on an array, and storing one testlist dictionary per line. Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
- Sep 20, 2023
-
-
A prior(rps) test leaves the system in a bad state causing failures in the basic test. Set min/max to expected values before running it. Test will restore values at the end. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8670 Signed-off-by:
Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by:
Riana Tauro <riana.tauro@intel.com> Acked-by:
Rodrigo Vivi <rodrigo.vivi@intel.com>
-
Janusz Krzysztofik authored
If a user (an IGT test) doesn't provide a subtest name when calling igt_kunit() then we now use the requested kernel module name as IGT subtest name. Since names of kunit test modules usually end with a "_test" or "_kunit" suffix, those parts of the names don't carry any useful information. Strip those suffixes from IGT subtest names. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
- Sep 19, 2023
-
-
Janusz Krzysztofik authored
For igt_runner to be able to correlate a stream of IGT results from dynamic sub-subtests that correspond to individual kunit test cases, read by the igt_runner from stdout / stderr of the test process, with a stream of kernel messages read from /dev/kmsg, we need both result streams being fed with data in parallel. While our KTAP parser is currently started in the background and reads KTAP results from /dev/kmsg in parallel with execution of kunit tests performed by the kernel while we are loading a kunit test module, results from the parser are then only stored as intermediate data and not processed any further until the module loading completes. As a consequence, there is no synchronization between the two streams. Call the function that loads the kunit test module from a separate thread and process the intermediate results immediately, as soon as available from the background parser, without waiting for completion of module loading. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Acked-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
Current implementation of KTAP parser suffers from several issues: - works only with built-in kunit, can't parse KTAP output if modular, - in most cases, kernel messages that are not part of KTAP output but happen to appear in between break the parser, - results from parametrized test cases, not preceded with a "1..N" test plan, break the parser, - skips are not supported, reported as success, - IGT results from all 3 kunit test nesting levels, i.e., from parametrized subtests (should those were fixed to work correctly), test cases and test suites, are reported individually as if all those items were executed sequentially, all at the same level of nesting, which can be confusing to igt_runner, - subtest names mostly consist of kunit suite name and kunit test case name but not always, sometimes the first component is omited, - the parser is not only parsing the data, but also handles data input from a /dev/kmsg like source, which is integrated into it, making it hard if not impossible to feed KTAP data from different sources, including mock sources, - since the parser has been designed for running it in a separate thread, it's not possible to use igt_skip() nor igt_fail() and friends immediately when a result is available, only pass it to the main thread over a buffer. As a consequence, it is virtually impossible to synchronize IGT output with KTAP output. Fixing the existing parser occurred more complicated than re-implementing it from scratch. This patch provides a new implementation. Only results from kunit test cases are reported as results of IGT dynamic sub-subtests. Results from individual parametrized subtests have been considered problematic since many of them provide multi-word descriptions in place of single-word subtest names. If a parametrized test case fails then full KTAP output from its subtests, potentially mixed with accompanying kernel messages, is available in dmesg for analysis so users can still find out which individual subtests succeeded and which failed. Results from test suites level are also omitted in faith that IGT can handle aggregation of results from individual kunit test cases reported as IGT dynamic sub-subtests and report those aggregated results correctly as results from an IGT dynamic subtest. That 1:1 mapping of kunit test suites to IGT dynamic subtests now works perfectly for modules that provide only one test suite, which is the case for all kunit test modules now existing under drivers/gpu/drm, and the most common case among all kunit test modules in the whole kernel tree. New igt_ktap functions can be called directly from igt_kunit subtest body, but for this patch, the old igt_ktap_parser() function that runs in a separate thread has been preserved, only modified to use the new implementation and translate results from those new functions to legacy format. Unlike the former implementation, translation of kunit names to IGT names is handled outside the parser itself, though for now it is still performed inside the legacy igt_ktap_parser() function. For better readability of the patch, no longer used functions have been left untouched, only tagged with __maybe_unused to shut up compiler warnings / errors. Kunit library functions will be modified to use the new igt_ktap interface, and those old ktap functions removed by follow- up patches. A test with example subtests that feed igt_ktap_parse() function with some example data and verifies correctness of their parsing is also provided. v2: Fix incorrect and missing includes in the test source file, - add license and copyright clauses to the test source file. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Acked-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
For code simplicity and clarity, use existing IGT linked lists library instead of open coding a custom implementation of a list of KTAP results. While being at it, flatten the code by inverting a check for pending results. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Acked-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
Similar to how igt_kselftest() handles kernel taints, fail current dynamic sub-subtest and skip remaining ones when a kernel taint is detected during execution of kunit test cases. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
We obtain KTAP report from /dev/kmsg. That file is now opened from igt_ktest_begin(), a function originally designed for i915 selftests and now reused with kunit tests. The original intention of opening that file was to dump kernel messages to stderr on selftest error. For that purpose, the file is now opened in non-blocking mode so we don't end up waiting for more kernel messages than already available. Since our ktap parser code reuses the file descriptor, we now have to loop over EAGAIN responses, waiting for more KTAP data. Since we have no sleeps inside those loops, extremely high CPU usage can be observed. Simplify reading KTAP reports by first switching the file descriptor back to blocking mode. While being at it, fix read errors other than EPIPE likely unintentionally ignored when reading first line of KTAP data. v2: Drop EINTR handling as not applicable since SIGINT default signal handler kills the whole process anyway, - update commit description to also mention read error handling fix. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
Since we now call pthread_cancel() when we want to stop KTAP parser before it completes, and we take care of returning failure in that case as a result of KTAP parsing, we no longer need to check a flag that indicates whether we should continue parsing or return a failure. Drop that flag. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
For our KTAP parser to be running in parallel with kunit test module loading, we now start it in a separate thread before we load the module. If the module loading fails then we join the KTAP parser thread right after that failure. If the KTAP thread sleeps for some reason then we can fail to break the test immediately. Cancel the KTAP parser thread right after module load error and before joining it. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
While reading KTAP data from /dev/kmsg we now ignore EINTR failures that may occur during read() and we continue reading the data. No explanation has been provided on what that could be needed for. Since we use default SIGINT signal handler, read() should never fail with errno set to EINTR on user interrupt, only the whole process should be terminated. Drop checks for errno == EINTR as not applicable. v2: Drop handling of EINTR completely, update commit message and descripion. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Acked-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
After loading a kunit test module that executes some kunit test cases, we evaluate overall result of an IGT subtest that corresponds to that module based on an error code returned by kunit_parser_stop() helper, obtained from a .ret field of a ktap_args structure. That code is now assigned to that structure field right before completion of the KTAP parser thread start routine. If the thread is canceled for some reason then the return code will be undefined. Initialize the return code on KTAP parser startup with a value that indicates a failure, then change it to success when so indicated by result of KTAP parsing. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
In a body of a subtest with dynamic sub-subtests, it is illegal to call igt_fail() and its variants from outside of a dynamic sub-subtest body. On the other hand, it is perfectly legal to call either igt_skip() and friends or __igt_abort() or its variant from there. In the current implementation of igt_kunit(), there are several places where igt_fail() is called despite being illegal. Moreover, it is called with IGT_EXIT_ABORT as an argument with no good reason for using such aggressive method that forces CI to trigger system reboot (in most cases igt_runner can decide if abort is required). Follow igt_kselftests() pattern more closely, where similar setup and cleanup operations are performed but their potential errors are processed in a more friendly way. Move common cleanup and their corresponding setup steps out of the subtest body. Place the latter as requirements in a preceding igt_fixture section. Replace remaining illegal igt_fail() calls with more friendly skips. Let igt_runner decide if abort is needed. v2: Also call igt_skip() on igt_ktest_init() failure (Mauro), but then, initialize local tst structure when declaring it to avoid freeing a random pointer from igt_ktest_fini() when only listing subtests, - call igt_ktest_end() from igt_fixture so it is not unnecessarily called when only listing subtests. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Acked-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
- Sep 18, 2023
-
-
Janusz Krzysztofik authored
Calling igt_success() explicitly at the end of subtest body is not needed. Other calls to igt_success() can be usually avoided by inverting test result checks. Optimize the code that now calls igt_success(). Moreover, using more advanced variants of igt_skip() and igt_fail() where applicable makes the code more compact. Go for it. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
We obtain a kmod_module structure for kunit module in order to check if it is modular or built-in, then we never release that structure. Fix it. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Reviewed-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
Since kmod functions we use for module loading can process module dependencies, there is no need to load the "kunit" module explicitly before loading a kunit test module. For the same reason we already don't unload the "kunit" module explicitly on cleanup. Drop the unnecessary operation. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Acked-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Janusz Krzysztofik authored
In the process of reviewing patches that introduced kunit support, I asked once if we could use line buffered input instead of explicitly looking for newlines in kmsg data. While my idea was wrong because each read of raw data from /dev/kmsg always returns one full log record that always ends with a newline, conversion of /dev/kmsg file descriptor to a file stream with freopen() was added to the code. However, that file stream has never been used for line buffered input. While the file stream is passed to functions that actually read the data, there it is converted back to a file descriptor with fileno() and raw data is read with read(). Drop the unnecessary conversions and teach functions to accept and process just the file descriptor of /dev/kmsg. Signed-off-by:
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Acked-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Francois Dugast authored
The key XE_QUERY_CONFIG_MAX_ENGINE_PRIORITY has been added to the info array provided in struct drm_xe_query_config. It represents the value of the highest available exec queue priority. The existing test is extended to also print the value returned for this key. Signed-off-by:
Francois Dugast <francois.dugast@intel.com> Reviewed-by:
Janga Rahul <Kumar<janga.rahul.kumar@intel.com>
-
Add a test what runs a background load that is active approximately 1% of the time. Verify that we do enter GT-C6 the rest of the time and validate idle residency is within tolerance. v2: use start and end variables for residency add detailed comment (Badal) v3: run on a single instance of an engine belonging to gt (Anshuman) Signed-off-by:
Riana Tauro <riana.tauro@intel.com> Reviewed-by:
Badal Nilawar <badal.nilawar@intel.com>
-
- Sep 16, 2023
-
-
add memcpy shader for gfx11 Cc: Luben Tuikov <luben.tuikov@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian Koenig <christian.koenig@amd.com> v2 : added disassembly comments (Vitaly) Signed-off-by:
Jesse zhang <jesse.zhang@amd.com> Reviewed-by:
Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by:
Luben Tuikov <luben.tuikov@amd.com>
-
Due to CE is not available on gfx11, so skip CE subtest for gfx11. v2 : - code logic improvements(Vitaly) v3 : - formatting improvements(Luben) Cc: Luben Tuikov <luben.tuikov@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian Koenig <christian.koenig@amd.com> Signed-off-by:
Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by:
Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by:
Luben Tuikov <luben.tuikov@amd.com>
-
Starting subtest: userptr-with-IP-DMA Starting dynamic subtest: userptr (amd_basic:1766) amdgpu/amd_command_submission-CRITICAL: Test assertion failure function amdgpu_test_exec_cs_helper, file ../lib/amdgpu/amd_command_submission.c:84: (amd_basic:1766) amdgpu/amd_command_submission-CRITICAL: Failed assertion: r == 0 (amd_basic:1766) amdgpu/amd_command_submission-CRITICAL: Last errno: 62, Timer expired (amd_basic:1766) amdgpu/amd_command_submission-CRITICAL: error: -62 != 0 Stack trace: #0 ../lib/igt_core.c:1988 __igt_fail_assert() #1 ../lib/amdgpu/amd_command_submission.c:85 amdgpu_test_exec_cs_helper() #2 ../tests/amdgpu/amd_basic.c:308 __igt_unique____real_main623() #3 ../tests/amdgpu/amd_basic.c:623 main() #4 ../sysdeps/nptl/libc_start_call_main.h:58 __libc_start_call_main() #5 ../csu/libc-start.c:128 __libc_start_main@@GLIBC_2.34() #6 [_start+0x25] Due to the incorrect family_id, it result in the userptr test fail. So correct the initial value of the family id when setting up amdgpu blocks. v2 : - keep initialization of family_id to FAMILY_VI( Vitaly) - added comments (Vitaly) Cc: Luben Tuikov <luben.tuikov@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian Koenig <christian.koenig@amd.com> Signed-off-by:
Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by:
Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by:
Luben Tuikov <luben.tuikov@amd.com>
-
- Sep 15, 2023
-
-
Mauro Carvalho Chehab authored
Cross-building IGT is not too trivial, as one needs to prepare a sysroot directory containing not only glibc but also other libraries. Document how to do it for IGT. Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-
Mauro Carvalho Chehab authored
This reverts commit 7298b872.
-
Mauro Carvalho Chehab authored
Cross-building IGT is not too trivial, as one needs to prepare a sysroot directory containing not only glibc but also other libraries. Document how to do it for IGT. Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab@kernel.org>
-