Age | Commit message (Collapse) | Author | Files | Lines |
|
Synch with kernel commit that uses common PCI ID macros:
3c1d5ced18db ("drm/i915/gsc: ARL-H and ARL-U need a newer GSC FW.")
Refactor lib to use new macro definitions and pciids.h header file.
Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@linux.intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
|
|
For development purposes, sometimes it is useful to have a way of
running custom scripts at certain points of test executions. A
real-world example I bumped into recently is to collect information from
sysfs before and after running each entry of a testlist.
While it is possible for the user to handcraft a script that calls each
test with the correct actions before and after execution, we can provide
a better experience by adding built-in support for running hooks during
test execution.
That would be even better when adding the same kind of support for
igt_runner (which is done in an upcoming change), since the user can
also nicely resume with igt_resume with the hook already setup in case a
crash happens during execution of the test list.
As such provide implement support for hooks, integrate it into
igt_core and expose the functionality via --hook CLI option on test
executables.
v2:
- s/igt_hook_init/igt_hook_create/ (Lucas)
- Use SPDX License Identifier instead of license text. (Lucas)
- Do not rely on hard-coded length 3 when generating full test name.
(Lucas)
- Do not pollute current environment variables when running hooks.
(Lucas)
- Change hook string in run_tests_and_match_env() to use "printf"
instead of "echo" to be compatible with CI environment.
v3:
- igt_hook_create() only errors out for invalid input.
- Use igt_hook_free() instead of simply free() in the error path for
common_init().
- Go back to the simpler logic for calling hooks instead of using
fork: setenv() calls followed by system().
- Change igt_hook_create() to return error number and receive
reference to destination pointer instead of the opposite. (Lucas)
- Remove checks for non-existing negative return of igt_hook_create().
(Lucas)
- s/igt_hook_push_evt/igt_hook_event_notify/. (Lucas)
- Simplify call sites for igt_hook_event_notify() by allowing argument
to igt_hook to be NULL and using compount literals for the event
struct. (Lucas)
- Fix style for igt_hook_calc_test_fullname_size(). (Lucas)
v4:
- Remove needless parentheses. (Lucas)
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> # v3
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20240814204822.95283-2-gustavo.sousa@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
|
|
The previous links to the chamelium documentation
and setup instructions were no longer working.
Update with new valid links.
Cc: Rob Clark <robdclark@gmail.com>
Cc: Rob Clark <robdclark@chromium.org>
Cc: Helen Koike <helen.koike@collabora.com>
Cc: Daniel Stone <daniels@collabora.com>
Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
|
|
Add custom phony targets to create testlists to be used by Intel-CI.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
|
|
The KMS JSON file contains some tests that can optionally be disabled.
When those are disabled, the code can't check for missing documents,
as the JSON file specifies both enabled and disabled tests.
Detect that to avoid build problems.
While here, remove a left-over dictionary (xe_test_dict).
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Fork gen9_media.h from gen8_media.h with the gen9 definitions that were
in that header and with a new struct gen9_surface_state. Although the
surface state is the same as for gen8, the meaning of at least mocs is
different. As a follow up the mocs definition will change for gen9 and
above.
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
|
|
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>
|
|
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>
|
|
This reverts commit 7298b872cc63e65e577d10fa06c8559c5e104547.
|
|
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>
|
|
With the introduction of Lunar Lake, igt won't be able to just re-use
i915_pciids.h for both drivers anymore since the support for LNL is only
coming with the xe module. Copy xe_pciids.h from the drm-xe-next branch
(up to commit b9c9020fc816 ("drm/xe/pvc: Use fast copy engines as
migrate engine on PVC") and start including it where needed. This brings
all the LNL PCI IDs.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
|
|
In-order to organize tests in a better way, move all intel
specific tests (includes i915, xe & kms) to a new directory
called "tests/intel".
V2: - Rebase
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
As this testplan is specific to the Intel hardware, the correct
place for it is inside the tests/i915/.
V2: - Fix the included files path
V3: - Rebase
Cc: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
As testplan documentation is ready for all kms tests, update the
testplan config to make sure we are not missing the documentation
all the kms tests.
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Add some documentation describing how to document tests,
with both the legacy way and via testplan.
Acked-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
This change broke igt build when building without chamelium
This reverts commit 00bc4cf384382018ebe6f333e4d53849c883445b.
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Acked-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
|
|
As testplan documentation is ready for all kms tests, update the
testplan config to make sure we are not missing the documentation
all the kms tests.
V2, V3, V4, V5: - Rebase
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Let's dynamically create testlists during build time, as this
can speed up a lot the validation check for testplan.
Ideally, all it would need to to that would be to use this
logic at the end of tests/meson.build:
foreach testexe : test_executables
prog = testexe.name()
output = prog.split('/').get(-1) + '.testlist'
custom_target(output,
build_by_default : true,
command : [ testexe, '--show-testlist'],
capture : true,
output : output)
Unfortunately, this requies Meson >= 0.54. So, we need to add
one custom_target per executable() call.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Migrate i915/i915_blt -> intel_blt as a preparation step before
extending to support xe. It is a simple move of files and rename
of i915 -> fd field.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Reviewed-by: Karolina Stolarek <karolina.stolarek@intel.com>
|
|
Now that i915 is fully documented, check it at build time.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Prepare to support documenting the i915 tests via in-code macros, in a
similar way to how Xe tests are documented.
For now, don't enable checking i915 documentation here, as this
may consume a lot of build time on desktops.
Please notice that we had to exclude documentation for
gem_concurrent_all.c, as there are too many subtests there:
${build}/tests/gem_concurrent_all --list|wc -l
428400
Adding documentation for all of them (even with wildcards) would
produce a very big document, seriously affecting build time.
Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Old meson 0.47.2 do not support dictionary adding so fix
testplan building.
Cc: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Acked-by: Petri Latvala <adrinael@adrinael.net>
|
|
The Xe driver is currently under heavy development and has not
merged upstream yet. While merging doesn't happen, the API may
still change, as upstream may request changes on it and/or
driver developers may need to tweak some API bits.
While this is happening, incompatible API changes may still
happen. As IGT is distributed on some distros, placing Xe
tests on binaries is not a good idea, as such tests may fail
when the final version gets released.
So, add a build option to allow disabling Xe driver builds.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Add testplan support for kms tests.
The documentation for kms tests will be like:
/**
* TEST: Test foo.
* Category: Display
*
* SUBTEST: bar
* Description: bar description
* Test category: functionality test
* Run type: BAT
* Functionality: dp
* Mega feature: DP 2.0
*/
V2: - Empty 'extra_args' to avoid failures for missing docs
- Use wildcards instead of adding full list of files
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
When doing cross-compilation, the binaries won't likely run at
the builder machine. So, it is not possible to verify if there are
documentation gaps.
On such cases, skip checking it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
|
|
There's no need to actually call IGT runner to get test lists.
Remove such dependency, in order to speedup --check.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
|
|
While the runner is built by default, if jsonc is not found, it
won't be build. This will cause the documentation validation test
to cause the build to fail.
Prevent that by adding an extra check if jsonc is found, as this
is the same condition that it is used to build igt_runner.
While here, also ensure that igt_doc.py will depend on having the
igt_runner already compiled, when the --check option is used.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
If the tests are build too, check if the documentation match
the name of the tests.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
|
|
This is not available at the builtin python libraries. Avoid
needing it in order to make easier to build with Ubuntu 18.04.
So, use the suggestion for which() from:
https://stackoverflow.com/questions/377017/test-if-executable-exists-in-python
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Currently, Sphinx 1.6 fails to build the documentation and produces
an ugly warning.
Add compatibility bits to avoid it.
Reported-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
As other meson.build files are using tabs to align, replace
spaces with tabs here too.
Just cosmetic changes.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Use the more portable join_paths() macro.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Simplify the checks inside testplan/meson.build and ensure that
it will only build if option build_testplan is selected, by moving
such check to docs/meson.build.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Currently, this holds just a variable used by testplan. Drop it,
cleaning up the building system.
This change allows building the testplan documentation without
needing to build tests.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
The requirement for having gtk-doc is specific to
docs/reference/igt-gpu-tools.
Moved the code to be there. This lets build testplan docs
without needing gtk-doc (nor having the IGT executables).
It should be noticed that testplan indirectly depends on
build_tests, for one reason only: the tests subdir is only
included if build_tests is true. Without it, the xe_test_config
variable will be undefined, as it is declared inside a tests
subdir.
To ensure that the variable is declared we need to add an extra
test for the testplan subdir.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
PDF files are easier to share, and it costs almost nothing to
produce them with Sphinx, via rst2pdf. Added support for it
if rst2pdf is installed.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Add the remaining changes at meson for it to build Xe documentation.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Produce documentation from igt_doc.py markups inside the Xe driver
at build time.
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
[Why]
kms_chamelium tests file has grown so much and became a bit big to
manage.
Splitting specific tests like we do for kms_ tests into separate files
puts logically related functionalities into the same place so tests are
more clear.
[How]
Split kms_chamelium into 4 different tests, each testing something
specific. The tests are:
1. kms_chamelium_audio
2. kms_chamelium_edid
3. kms_chamelium_frames
4. kms_chamelium_hpd
5. kms_chamelium_color which used to be kms_color_chamelium but renamed
for consistency.
All common code lives in kms_chamelium_helper and the function names
have a chamelium_ prefix.
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
So we can use this across different tests.
v2
- Add docs for everything (Petri)
- Add missing copyright and fix headers slightly (Kamil)
v3:
- Just return true/false, for the has() family of functions, instead
of tripping up an assert() (Kamil)
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
|
|
No reason to hide the pipe CRC code inside the debugfs stuff.
The fact that pipe CRCs are operated through debugfs is just
an irrelevant implementation detail.
Fixed up the few cases that don't include igt.h with this cocci:
@find@
identifier ID;
@@
igt_crc_t ID;
@has_include@
@@
(
#include "igt_pipe_crc.h"
|
#include "igt.h"
)
@depends on find && !has_include@
@@
#include "igt_kms.h"
+ #include "igt_pipe_crc.h"
v2: better cocci to catch lib/igt_chamelium.c
v3: Rebase and roll on doc fix from Petri
v4: Use SPDX stuff
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
1. Introduce Chamelium V3 hardware
2. Update Chamelium ports map
Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Adding crc32 calculation on gpu gives us new possibility to verify data
integrity without relying on trust cpu mapping is correct.
Patch introduces calculating crc32 on DG2 only. On older gens ALU
(MI_MATH) doesn't support bit-shifting instructions as well as multiply
or divide. Emulating n-bit shifts cost hundred of instructions with
predicated SRM (works on render engine only). Another limitation is lack
of indexed load / store. On DG2 we can use WPARID and CS_MI_ADDRESS_OFFSET
to achieve indexed operation on memory.
Due to performance reasons (cpu crc32 calculation even on WC memory is
still much faster than on gpu, also depends on calculated object memory
region) calculation will complete in reasonable of time only for few MiB.
v2: - use registers relative to engine to allow run on all engines (Chris)
- use predication instead of memory access to get better performance
(Chris)
- add location where crc32 implementation comes from (Petri)
v4: - use common crc32 table from igt_crc
- add docs
v5: - change BIT(n) to informative macros (Zbigniew)
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add crc32 table for on-cpu crc calculation function. Other tables and
algorithms should be added here allowing reuse tables for in-gpu crc
calculation.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
If a DUT has Chamelium ports connected via an adapter (for example, DP
on the Chamelium side -> DP-HDMI adapter -> HDMI on the DUT), this will
usually cause many tests to fail. If mismatching port types are found
on both sides, the tests will now be aborted with a warning.
This behavior can be overridden with a new AdapterAllowed config value,
which must be set in [Chamelium:PORT] blocks in .igtrc.
Signed-off-by: Ryszard Knop <ryszard.knop@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add documentation bits for the code_coverage_parse_info.
While here, also drop the extensions from the scripts that were renamed.
Reviewed-by: Ch Sai Gowtham <sai.gowtham.ch@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Document the IGT runner features related to code coverage data capture.
Acked-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
|
|
Blitter commands became complicated thus manual bitshifting is error
prone and hard debugable - XY_BLOCK_COPY_BLT is the best example -
in extended version (for DG2+) it takes 20 dwords of command data.
To avoid mistakes and dozens of arguments for command library provides
input data in more structured form.
Currently supported commands:
- XY_BLOCK_COPY_BLT:
a) TGL/DG1 uses shorter version of command which doesn't support
compression
b) DG2+ command is extended and supports compression
- XY_CTRL_SURF_COPY_BLT
- XY_FAST_COPY_BLT
Source, destination and batchbuffer are provided to blitter functions
as objects (structs). This increases readability and allows use same
object in many functions. Only drawback of such attitude is some fields
used in one function may be ignored in another. As an example is
blt_copy_object which contains a lot of information about gem object.
In block-copy all of data are used but in fast-copy only some of them
(fast-copy doesn't support compression).
v2-v3: address review comments (Kamil)
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
|
|
Handling batchbuffers with softpin requires tracking its state otherwise
we can write to inflight batchbuffer and encounter gpu hang. Gem pool
adds such tracking (similar to libdrm bo cache) and provides free and
ready to use bo. If pool has no free bo new one is created what means pool
can be growing during test execution. When test completes freeing buffers
and memory is called from igt_core so no additional cleanup is necessary.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
|
|
Split the readN()/writeN() helpers out into an igt_io module, so they
can be re-used by tests.
Signed-off-by: Rob Clark <robdclark@chromium.org>
|