summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-05-08tests/amdgpu/vce_enc: disable motion vector testVitaly Prosyak1-2/+8
Temporarily disable verification due to ongoing investigation to figure out the root cause of the error. The comparison would continue, but assert is commented out. Cc: Leo Liu <leo.liu@amd.com> Cc: Ruijing Dong <ruijing.dong@amd.com> Cc: Michael Strawbridge <michael.strawbridge@amd.com> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2024-05-08tests/amdgpu/vce_enc: rename fileVitaly Prosyak2-1/+1
It was a typo , now rename amd_vce_dec.c to amd_vce_enc.c Cc: Leo Liu <leo.liu@amd.com> Cc: Ruijing Dong <ruijing.dong@amd.com> Cc: Michael Strawbridge <michael.strawbridge@amd.com> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2024-05-08gputop: Allow to set delay intervalLucas De Marchi2-2/+20
Like `top` and `htop`, allow to pass -d, --delay =SEC[.TENTHS] as argument. Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Link: https://lore.kernel.org/r/20240501173303.115737-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-08gputop: Allow to limit number of executionsLucas De Marchi1-2/+14
Add argument to limit number of executions, similar to the one accepted by `top`. This allows testing changes and optimizations more easily. Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Link: https://lore.kernel.org/r/20240501173303.115737-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-08gputop: Add option parsingLucas De Marchi1-0/+51
Add skeleton for option parsing, with just a -h/--help to be used for additional options later. Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Link: https://lore.kernel.org/r/20240501173303.115737-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-08gputop: print percentage numberLucas De Marchi1-4/+6
Besides printing the bar, also print the raw number for easy visualization of small quantities. While at it, make sure gputop still works with small console widths. v2: Use %5.1f instead of %.1f so it also aligns the non-decimal part Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Link: https://lore.kernel.org/r/20240501173303.115737-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-08tests/intel: add other missing core tests to xe_test_config.jsonMauro Carvalho Chehab4-1/+4
All core tests are used to check Xe functionality. Add them to the Xe testplan configuration. Also, add descriptions for simple tests to the right place, as otherwise warnings will be produced: Warning: igt@core_getclient Description documentation is missing Warning: igt@core_getstats Description documentation is missing Warning: igt@core_setmaster_vs_auth Description documentation is missing As each subtest requires its own description. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2024-05-08tests/intel/xe_debugfs: Extend gt test to check pat entryJanga Rahul Kumar1-0/+5
Read and dump pat debugfs entry. Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com> Reviewed-by: Priyanka Dandamudi <Priyanka.dandamudi@intel.com>
2024-05-07tests/intel/xe_exec_queue_property: move skip into subtestKamil Konieczny1-4/+10
Skips in fixture are safe to use just after begin of igt_main() when they be working for all subtests. Later on, when used in fixture they can mislead developers reading logs, so move one into respective subtest. v2: use bool var instead of fd (Zbigniew) Cc: Sai Gowtham Ch <sai.gowtham.ch@intel.com> Cc: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com> Cc: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2024-05-07tests/intel/xe_pm: Add mocs S2-idle/S3/S4 suspend resume testJanga Rahul Kumar1-10/+19
Add test to check mocs values are retained over S2-idle/S3/S4 suspend resume states. Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
2024-05-07tests/intel/xe_pm: Add mocs runtime suspend resume testJanga Rahul Kumar1-0/+43
Add test to check mocs values are retained over runtime suspend/resume. Cc: Badal Nilawar <badal.nilawar@intel.com> Cc: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
2024-05-07tests/intel/xe_debugfs: Extend gt test to check mocs entryJanga Rahul Kumar1-0/+5
Read and dump mocs debugfs entry. Cc: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com> Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
2024-05-07tests/intel: Change sys/signal.h to signal.hReagan Bohan5-5/+5
sys/signal.h is non standard, emits a warning on musl libc and is inconsistent with other files (which use just signal.h). Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-05-07tools: use poll.h in includesReagan Bohan4-4/+4
sys/poll.h is non-standard and including it on musl produces a warning. Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-05-07tests: use poll.h in includesReagan Bohan22-22/+22
sys/poll.h is non-standard and including it on musl produces a warning. Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-05-07runner: use poll.h in includesReagan Bohan1-1/+1
sys/poll.h is non-standard and including it on musl produces a warning. Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-05-07benchmarks: use poll.h in includesReagan Bohan2-2/+2
sys/poll.h is non-standard and including it on musl produces a warning. Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-05-07lib: use poll.h in includesReagan Bohan3-3/+3
sys/poll.h is non-standard and including it on musl produces a warning. Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-05-07meson: Define _LARGEFILE64_SOURCE for musl libcReagan Bohan1-0/+2
musl libc expects this macro to be defined when using the types off64_t and ino64_t. This does not affect glibc. Signed-off-by: Reagan Bohan <reagan@ourmail.work> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-05-06tests/intel/xe_pm: S4 to go up to devices onlyLucas De Marchi1-7/+14
Testing S4 (hibernation) is typically painful as there's mixed support in OS versions and platforms in CI. Doing the entire dance of saving the image to swap (which sometimes is a swapfile) and communicate that to the kernel that is going to be booted (without initrd in the CI case) is often a case of problems. Main goal of xe_pm is to test if the xe driver and the graphics card are working correctly, not that all the farm of machines correctly handle all the corner cases (which is even more problematic as we test early rc kernels). Stop doing that and rather switch to going up to device shutdown + platform low power state (the default in /sys/power/disk). If that is acceptable and work out great, we may even do that unconditionally, passing SUSPEND_TEST_DEVICES as it should work in other cases too. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1043 Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://lore.kernel.org/r/20240503224745.14890-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-06lib/igt_aux: Name function according to sysfs fileLucas De Marchi1-5/+10
Let's follow the sysfs filename that is being written/read so it's not misinterpreted as something else: at first I thought it was dealing with /sys/power/state, which it's not. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://lore.kernel.org/r/20240503224745.14890-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-06tests/intel/xe_pm: Reword *-basic descriptionLucas De Marchi1-1/+1
It doesn't make much sense to say the CPU is going to be put in D* state. Reword it so the CPU and GPU states are better captured. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://lore.kernel.org/r/20240503224745.14890-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-06lib/intel_ctx: Propagate error from __intel_ctx_xe_exec wait timeoutMaarten Lankhorst1-1/+1
Any wait timeouts are currently ignored, which might cause silent failures in test. Be more noisy about them. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
2024-05-06tests/meson.build: Generate test-list for cross buildVignesh Raman1-16/+10
test-list.txt and test-list-full.txt are not generated for cross-builds and they are required by drm-ci for testing. Commit 485bcb98182d ("tests/meson.build: only generate testlists on native builds") disables generating .testlist files for cross-builds since the binaries cannot be executed but test-list.txt and test-list-full.txt generation shouldn't require that. So generate them for cross-builds. Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-05-06igt_core: Update doc on generated test-list.txtGustavo Sousa1-5/+4
Commit e72686b83b0b ("tests: create a single combined test list") updated the build to generate a single test-list.txt instead of the two single-tests.txt and multi-tests.txt files. Update the documentation in igt_core.c to reflect that. Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20240503115545.44784-2-gustavo.sousa@intel.com
2024-05-06lib/gpu_cmds: be ready to use xe2 gpgpu fill on newer platformsDominik Grzegorzek1-2/+2
Doing xe2 gpgpu pipeline implementation we mostly taken into account possibility of reusing the implementation for future platforms. But not everywhere. Make it common. Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com> Acked-by: Christoph Manszewski <christoph.manszewski@intel.com> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Link: https://lore.kernel.org/r/20240425121337.433948-1-dominik.grzegorzek@intel.com
2024-05-03lib/i915/perf: Fix warning on codegenLucas De Marchi1-6/+6
For a normal string, it's not correct to use just one backslash as escape char as that conflicts with Python's escape. Use raw strings for the regex patterns to avoid this problem. Fix the following warnings that starts showing up with Python 3.12 (see https://docs.python.org/3/whatsnew/3.12.html#other-language-changes): [4/1809] Generating lib/i915-perf-registers-hsw with a custom command /home/ldmartin/p/igt-gpu-tools/lib/i915/perf-configs/codegen.py:165: SyntaxWarning: invalid escape sequence '\$' m = re.search('\$GtSlice([0-9]+)XeCore([0-9]+)$', name) /home/ldmartin/p/igt-gpu-tools/lib/i915/perf-configs/codegen.py:168: SyntaxWarning: invalid escape sequence '\$' m = re.search('\$GtSlice([0-9]+)$', name) /home/ldmartin/p/igt-gpu-tools/lib/i915/perf-configs/codegen.py:171: SyntaxWarning: invalid escape sequence '\$' m = re.search('\$GtSlice([0-9]+)DualSubslice([0-9]+)$', name) /home/ldmartin/p/igt-gpu-tools/lib/i915/perf-configs/codegen.py:341: SyntaxWarning: invalid escape sequence '\$' m = re.search('\$GtSlice([0-9]+)$', name) /home/ldmartin/p/igt-gpu-tools/lib/i915/perf-configs/codegen.py:344: SyntaxWarning: invalid escape sequence '\$' m = re.search('\$GtSlice([0-9]+)DualSubslice([0-9]+)$', name) /home/ldmartin/p/igt-gpu-tools/lib/i915/perf-configs/codegen.py:347: SyntaxWarning: invalid escape sequence '\$' m = re.search('\$GtSlice([0-9]+)XeCore([0-9]+)$', name) Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://lore.kernel.org/r/20240501070145.49810-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-03lib/igt_drm_clients: lazy stat processLucas De Marchi1-25/+25
Only try to get task data like pid and name when that is required. Typically most of the processes in a system don't have a drm fd open. So only open and use /proc/<pid>/stat when it's needed. For the data below, system is running with just a single drm client: Before: Performance counter stats for './build/tools/gputop -d 0.1 -n 10': 507.19 msec task-clock # 0.334 CPUs utilized 29 context-switches # 57.178 /sec 4 cpu-migrations # 7.887 /sec 75 page-faults # 147.874 /sec (...) 1.518253637 seconds time elapsed 0.007989000 seconds user 0.503351000 seconds sys After: Performance counter stats for './build/tools/gputop -d 0.1 -n 10': 384.01 msec task-clock # 0.275 CPUs utilized 17 context-switches # 44.270 /sec 1 cpu-migrations # 2.604 /sec 74 page-faults # 192.705 /sec (...) 1.397640800 seconds time elapsed 0.008106000 seconds user 0.385048000 seconds sys Looking only at the execution time of igt_drm_clients_scan() over 10 runs. Before: 47138890 nsec After: 33978388 nsec So in both methods it shows a ~25% speedup. It is expected that in a system with more clients this won't be as high. Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Link: https://lore.kernel.org/r/20240501174001.121324-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-03tests/kms_async_flips: Allow the first async flip to change modifierVille Syrjälä1-9/+20
The kernel will now allow the first async flip to change the modifier. Test that it works as indended: first async flip the attempts to change the modifier will succeed, and subsequent async flips that attempt the same will fail. Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2024-05-03tests/kms_async_flips: Extend the "async flip needs an extra frame" logicVille Syrjälä1-20/+30
Soon i915 will be converting the first async flip always to a sync flip on SKL+. The reason being that Xorg/modesetting typically attempts to change the modifier when it issues the first async flip, and we can't do that with an actual async flip. Extend the logic to consider all platforms that need the extra frame, which will now be: - BDW-GLK due to the async flip hw double buffer fail - SKL+ to change the modifier - ADL+ to optimize watermarks/DDB Note that the 'AT_LEAST_GEN(devid, 12)' already included TGL in this logic despite the kernel not actually forcing any sync flips on it previously. So only ICL was being correctly excluded here. Also BDW wasn't being included despite needing it due to the double buffer fail. Reviewed-by: Vandita Kulkarni <vandita.kulkarni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2024-05-03tests/intel/xe_compute_preempt: Check skip condition from parent processNakshtra Goyal1-0/+1
Check test is supported on a platform or not from parent process and run test once from parent process before creating child processes as skip check is not allowed from child processes Signed-off-by: Nakshtra Goyal <nakshtra.goyal@intel.com> Reviewed-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
2024-05-02tests/intel/xe_gt_freq: Check for RPe freq updatesVinay Belgaumkar1-0/+7
Pcode can dynamically update RPe frequency. Use the latest value in tests that check it. Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2024-05-01tools/gputop: Extract clrscr()Lucas De Marchi1-3/+7
Make it clear what the CSI is doing. Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://lore.kernel.org/r/20240430190150.3654507-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-01tools/gputop: Extract method to update console sizeLucas De Marchi1-11/+19
Cleanup the mainloop moving the console size handling to a helper functions. Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://lore.kernel.org/r/20240430190150.3654507-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-01lib/igt_drm_fdinfo: Stop ignoring space where not neededLucas De Marchi1-6/+4
strto[ul]l() family of functions already ignore leading spaces. There's no need to be explicit. Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://lore.kernel.org/r/20240430190150.3654507-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-01lib/igt_drm_fdinfo: Detect invalid drm-client-idLucas De Marchi1-2/+4
Use strtol() for string to long conversion which allows us to detect if there was an invalid number. It also has the advantage that it already ignores leading spaces. Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://lore.kernel.org/r/20240430190150.3654507-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-01lib/igt_drm_fdinfo: Assert pdev is not truncatedLucas De Marchi1-0/+1
Since strncpy() may truncate the output, just assert we have enough room for the string. It's not a big problem since we always copy 1 byte less than the capacity and info->pdev is zero-allocated. But we may as well be sure we aren't truncating it. Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Link: https://lore.kernel.org/r/20240430190150.3654507-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-05-01lib/igt_drm_fdinfo: Fix wrong name len assertLucas De Marchi1-2/+3
When parsing engine name, at this point we have something like: "drm-engine-render: 232409619162 ns" ^ ^ | | name p We are copying the engine name to the final destination, but strlen(name) will actually contain the entire string. Since we already know the name length, calculated previously, just use it for copying the string. Since each name is 256-bytes long, the assert doesn't trigger easily, but it's better to be correct. And more efficient. Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://lore.kernel.org/r/20240430190150.3654507-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-04-30tests/amdgpu: improve fuzzing testVitaly Prosyak1-2/+4
Improve cs wait for fuzzing test by using all possible IP blocks. Due to some IP blocks being different for different ASICs's the return code for ioctl DRM_IOCTL_AMDGPU_WAIT_CS is ignored. Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian Koenig <christian.koenig@amd.com> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com> Cc: Jesse Zhang <Jesse.Zhang@amd.com> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Jesse Zhang <Jesse.Zhang@amd.com>
2024-04-29intel_reg: Move decoding behind an optionLucas De Marchi1-11/+30
Decoding the register can be only as good as the reg_spec being used. The current builtin register spec is not that. Move that decoding behind an option to make it better for the normal case when running from the repo checkout where the external reg spec is not available. Passing any of --decode, --all, --spec brings the old behavior back: $ sudo ./build/tools/intel_reg --decode read 0x2358 Warning: stat '/usr/local/share/igt-gpu-tools/registers' failed: No such file or directory. Using builtin register spec. (0x00002358): 0x00000000 vs the new behavior: $ sudo ./build/tools/intel_reg --decode read 0x2358 (0x00002358): 0x00000000 We could probably reduce the leading space since we won't have any name, but that can be improved later. v2: Instead of removing the warning, move the whole decoding logic behind a command line option v3: Some commands also imply --decode Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com> Link: https://lore.kernel.org/r/20240426153352.3209972-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-04-29intel_reg: Reorder commands and annotate ones needing reg specLucas De Marchi1-10/+14
Group together the commands that operate with a reg spec and annotate those that will implicitly enable a future --decode option. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Link: https://lore.kernel.org/r/20240426153352.3209972-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
2024-04-26tests/intel: Put multiGPU tests in MultiGPU subcategory documentationKatarzyna Piecielska2-0/+4
Some of multiGPU tests were having CMD submission subcategory. Let's fix that and have all multiGPU tests in one subcategory. Signed-off-by: Katarzyna Piecielska <katarzyna.piecielska@intel.com> Cc: Aditya Chauhan <aditya.chauhan@intel.com> Acked-by: Aditya Chauhan <Aditya.chauhan@intel.com>
2024-04-25tests/intel/*.json: remove some uneeded whitespacesMauro Carvalho Chehab3-5/+5
To make the file more uniform, remove some extra whitespaces after a couple of field names at those files. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-04-25tests/intel/kms_test_config.json: fix indentationMauro Carvalho Chehab1-3/+3
There are some wrong indentation at Run Type. Fix it. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-04-24tests/intel/gem_exec_capture: fix use of uninitialized hang varPeter Senna Tschudin1-1/+1
The function main has a variable igt_hang_t hang defined, and it is currently used by igt_disallow_hang(). However igt_disallow_hang() is using the variable uninitialized making valgrind unhappy: Syscall param ioctl(generic) points to uninitialised byte(s) at 0x4ACD3ED: ioctl (in /usr/lib64/libc.so.6) by 0x49ACF4F: drmIoctl (xf86drm.c:704) by 0x488AF46: __gem_context_set_param (gem_context.c:260) by 0x48A540A: igt_disallow_hang (igt_gt.c:236) by 0x4013D7: __igt_unique____real_main959 (gem_exec_capture.c:1069) by 0x401242: main (gem_exec_capture.c:959) Address 0x1fff0001b0 is on thread 1's stack in frame #3, created by igt_disallow_hang (igt_gt.c:224) Uninitialised value was created by a stack allocation at 0x401340: __igt_unique____real_main959 (gem_exec_capture.c:960) This patch sets the content of the variable hang with the return value of igt_allow_hang() following what is used elsewhere in the code. After this patch valgrind does not complain about the error listed. Signed-off-by: Peter Senna Tschudin <me@petersenna.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2024-04-24tests/intel/xe_wedged: Test wedged_mode=1 after had toggled mode=2Rodrigo Vivi1-0/+14
Let's toggle between different modes. Suggested-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://lore.kernel.org/r/20240423222220.1285742-4-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2024-04-24tests/intel/xe_wedged: Introduce test for wedged_mode=2Rodrigo Vivi1-0/+69
In this mode, selected with debugfs, the GPU will be declared as wedged at any timeout. So, let's also introduce a command that will surely timeout. Based on the xe_exec_threads hang. Then we confirm the GPU is back alive after a rebind. Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://lore.kernel.org/r/20240423222220.1285742-3-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2024-04-24tests/intel/xe_wedged: Also add a simple exec to confirm GPU healthRodrigo Vivi1-0/+90
Besides confirming that the rebind puts the device in a state where we can send IOCTLs, let's also ensure it can really perform some basic exec functions. Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://lore.kernel.org/r/20240423222220.1285742-2-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2024-04-24tests/intel/xe_wedged: Introduce a new test for Xe device wedged stateRodrigo Vivi2-0/+109
Let's inject a gt_reset failure that will put Xe device in the new wedged state, then we confirm the IOCTL is blocked and we reload the driver to get back to a clean state for other test execution, since wedged state in Xe is a final state that can only be cleared with a device rebind/reprobe. The fault injection of this test is entirely based on xe_uevent provided by Himal. v2: Use rebind instead of module reload (Lucas) And other improvements also pointed out by Lucas. Cc: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Acked-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://lore.kernel.org/r/20240423222220.1285742-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2024-04-24tests/intel: Put "Run type" highest in i915 documentation hierarchyKatarzyna Piecielska1-33/+33
Let's put "Run type" at highest place in i915 documentation hierarchy. It will be reflected in html generated documentation. v2: move only required fields under 'Run type' Signed-off-by: Katarzyna Piecielska <katarzyna.piecielska@intel.com> Cc: Kamil Konieczny <kamil.konieczny@intel.com> Cc: Jari Tahvanainen <jari.tahvanainen@intel.com> Cc: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com> Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>