Age | Commit message (Collapse) | Author |
|
[Why]
Having a test that iterates through different link
settings and performs link training with them is useful
and currently missing from IGT.
[How]
Add a link settings test and its required helper functions.
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Eryk Brol <eryk.brol@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
Add tests to check Freesync capability reporting after system resume
from suspend.
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
These new tests only check if frame rate range is within legal range.
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
Freesync capability is parsed from EDID and reported to debugfs. The
new tests check if the parsing is correct by overriding EDID with golden
sample.
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
Check for memory leaks in these two cases:
- Connector EDID parsing after suspend-resume
- Triggerring of connector hotplugs
Depends on CONFIG_HAVE_DEBUG_KMEMLEAK=y in kernel config.
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
Test if ASSR is correctly enabled/disabled after suspend and DPMS.
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
Check if ASSR is correctly disabled or enabled on DP/eDP links.
Currrently the tests are verified to work on AMD hardware but failing
on some others, so they are AMD-specific for the time being.
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
[Why]
There is a debugfs entry to trigger software hotplugs. We can use this
for IGT tests.
[How]
Add hotplug test for all connectors, hotplug after suspend.
Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
Use the definition from kernel headers.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Written totally blind but I'm pretty sure it's right.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
|
|
Test to ensure unloading and loading of amdgpu driver works
Tested on:
ASIC: NAVI14
Changes since v1:
* Added documentaion
* Updated commit message
Signed-off-by: Victor Lu <victorchengchi.lu@amd.com>
Co-developed-by: Anson Jacob <Anson.Jacob@amd.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Mark Yacoub <markyacoub@google.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
|
|
Add a wrapper for gem_create_ext ioctl (a version of gem_create that
accepts extensions). In preparation for the driver change implementing it,
a local definition of its id and necessary structs have been added,
which are to be erased as soon as those definitions
appear in the i915_drm.h file.
The new ioctl wrapper is added to a separate file.
For consistency the wrapper of the old ioctl, gem_create
is moved from ioctl_wrappers to gem_create.
Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Chris P Wilson <chris.p.wilson@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
This test makes sure:
* the clock is running at the expected rate
* (potential) power gating has no effect on the clock
v2:
- use signed integer for the gpu timestamp diff (Bas)
v3:
- add test and subtest descriptions (Arek)
- split the fast and long tests in different subtests (Martin)
- use igt_stats to compute actual statistics (Chris)
v4:
- call igt_stats_fini() after finishing with the stats (Petri)
v5:
- add a human-readable text to asserts (Petri)
- assert directly on the function call, not its return value (Petri)
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
|
|
Having a test fail with "r != 0" is not helpful, and forces developers
to open the source code of IGT to figure out what this actually means.
This commit changes these asserts so as the function call that failed
is in the stack trace, and adds a human-readable explanation of what
failed.
Suggested-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
|
|
This will soon be followed by more amd_query_info tests, and the basic
file is already big-enough.
v2:
- add test and subtest descriptions (Arek)
- add the new file to autotools (Petri)
v3:
- fix compilation using autotools (Petri)
Signed-off-by: Martin Peres <martin.peres@mupuf.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
|
|
Improve the differentiation between the legacy ring selector ABI and the
more recent engine selection API.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
|
|
In some sandboxes the toolchain complains about missing
braces around initializer, however, using an empty
initializer is enough to shut out the compiler.
../tests/kms_plane_cursor.c: In function '__real_main_302':
../tests/kms_plane_cursor.c:305:2 error: missing braces around
initializer [-Werror=missing-braces]
data_t data = { 0 };
v2:
Use an empty initializer { } instead of { 0 } <Petri Latvala>
Signed-off-by: Carlos Santa <carlos.santa@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
The function igt_put_cairo_ctx currently requires three parameters, but only
one of them is used in it. This patch removes the useless parameters, making
the code more readable and cohesive. It also applies the change to all
occurrences of the function in the code.
Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
igt_require_gem() is a pecularity of i915/, move it out of the core.
Similar opportunistic move of gem_reopen_driver() and
gem_quiescent_gpu().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Some time ago amdgpu changed their ABI to reject unknown compute rings,
so we should query the available set prior to execution.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
Provide the iterator name as an explicit macro parameter so that it is
known to the caller, and allows for them to properly nest loops over all
engines.
Fixes:
../tests/i915/gem_exec_schedule.c: In function ‘semaphore_noskip’:
../lib/igt_gt.h:84:44: warning: declaration of ‘e__’ shadows a previous local [-Wshadow]
for (const struct intel_execution_engine *e__ = intel_execution_engines;\
^~~
../tests/i915/gem_exec_schedule.c:653:2: note: in expansion of macro ‘for_each_physical_engine’
for_each_physical_engine(i915, other) {
^~~~~~~~~~~~~~~~~~~~~~~~
../lib/igt_gt.h:84:44: note: shadowed declaration is here
for (const struct intel_execution_engine *e__ = intel_execution_engines;\
^~~
../tests/i915/gem_exec_schedule.c:652:2: note: in expansion of macro ‘for_each_physical_engine’
for_each_physical_engine(i915, engine) {
^~~~~~~~~~~~~~~~~~~~~~~~
../tests/i915/gem_exec_schedule.c: In function ‘measure_semaphore_power’:
../lib/igt_gt.h:84:44: warning: declaration of ‘e__’ shadows a previous local [-Wshadow]
for (const struct intel_execution_engine *e__ = intel_execution_engines;\
^~~
../tests/i915/gem_exec_schedule.c:1740:3: note: in expansion of macro ‘for_each_physical_engine’
for_each_physical_engine(i915, engine) {
^~~~~~~~~~~~~~~~~~~~~~~~
../lib/igt_gt.h:84:44: note: shadowed declaration is here
for (const struct intel_execution_engine *e__ = intel_execution_engines;\
^~~
../tests/i915/gem_exec_schedule.c:1719:2: note: in expansion of macro ‘for_each_physical_engine’
for_each_physical_engine(i915, signaler) {
^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
|
|
These just break the build on debian-mason-arm and debian-meson-mips
and aren't needed in the first place.
Cc: Dingchen Zhang <dingchen.zhang@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
|
|
To validate the AMDGPU bypass mode feature.
Generate DP test patterns, program the pipe and check if
the CRCs of framebuffer and DP receiver match.
v2: use the DPRX pipe crc source directly (Nicholas)
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Nick Kazlauskas <Nicholas.Kazlauskas@amd.com>
Signed-off-by: Dingchen Zhang <dingchen.zhang@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
|
|
The DRM color management pipeline doesn't directly map to AMD hardware
so creative solutions to implementing CRTC regamma, CTM and gamma were
needed for both DCE and DCN. A few mistakes were made in the process
that weren't caught by kms_color@ tests:
- Can't get linear degamma output without setting a custom degamma
- Can't specify a non-linear degamma that produces correct output
- Can't specify a correct gamma when a linear degamma is used
These are caused by using implicit sRGB degamma then sRGB gamma when no
matrices are set. This produces visually correct output when using a
CTM with no matrices set, but it's also technically the incorrect
output according to the DRM API documentation.
These tests help verify that AMDGPU follows the DRM spec when it comes
to setting linear/bypass gamma and regamma LUT.
The existing kms_color@ tests are written correctly already, so
anything that looks shared in these is really just to verify that we're
no longer doing any strange test specific workarounds outside of the
spec or documentation.
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
|
|
This patch addresses a few problems:
1. Inner loop that iterates over the properties uses the same iterator
as the outer loop over connectors. If the eDP panel isn't on the first
output, then it won't be checked and the tests will skip.
2. We can get null pointer deferences if any of the DRM calls return
NULL.
3. The proplist isn't freed after being acquired.
These can be fixed by using the kmstest_get_property helper to
get the prop_id. The prop_id and KMS connector ID are then stored
for use later in the test when we need to set the ABM level.
All the necessary cached state has been placed into a data structure and
many callsites have been updated to make use of this.
Cc: David Francis <david.francis@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: David Francis <david.francis@amd.com>
|
|
Just use the normal library function, with the normal warning message
for an unmatched GPU so that CI buglog can filter it.
References: https://bugs.freedesktop.org/show_bug.cgi?id=109315
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Martin Peres <martin.peres@free.fr>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Fixes: 738f43a54d62 ("tests/amdgpu: Add test for Adaptive Backlight Management")
Reported-by: gitlab-CI
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: David Francis <David.Francis@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
Adaptive Backlight Management (ABM) is a power-saving
feature on AMD ASICs that reduces backlight while increasing
pixel contrast and luminance. This test confirms that
ABM is present and enabled, and that backlight performance
is sane. It uses AMD-specific debugfs entries to
read the backlight PWM values.
It has 5 subtests:
dpms_cycle
Sets brightness to half, then confirms that value is restored
after dpms off and then on.
backlight_monotonic_basic
Sets brightness to ten different values, confirming that
higher brightness values are brighter.
backlight_monotonic_abm
Same as backlight_monotonic_basic, but with abm enabled.
abm_enabled
Sets abm to its four intensity levels, confirming that
abm reduces the backlight, and the reduction is greater
for higher abm level.
abm_gradual
Sets abm to off and then maximum intensity, confirming
that brightness decreases continually over the first
second and eventually reaches the target value.
This test takes 30s to run.
v2: make sure that dpms is cycled on the eDP display
Signed-off-by: David Francis <David.Francis@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
|
|
amdgpu has started to report out of space after creating a few contexts.
This is not the scope of this test as here we are just verifying that
fences created in amd can be imported and used for synchronisation by
i915 and for that we just need at least one context created!
References: https://bugs.freedesktop.org/show_bug.cgi?id=109049
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We can already move all the tests with distinct prefixes: gem_, gen3_
and i915_.
pm_ and drv_ tests will follow in batches, so we can do the
adjustments in the reporting/filtering layer of the CI system.
v2: Fix test-list.txt generation with meson
v3: Fix docs build (Petri)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Martin Peres <martin.peres@linux.intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Tested-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
So they are located close to the definitions of the corresponding
install_dirs and can be reused easily.
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Create and export an amdgpu bo into i915 so that we can try and
invalidate the i915_bo->pages from inside the shrinker, teaching lockdep
about that linkage.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
|
|
AMDGPU tests were reusing rpath set in tests/meson.build, which does not
account for the extra level of nesting, so let's define a new one.
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
If we allow 5s (+20% systematic error) to construct the fences, we may
reasonably assume that it will take equally as long to consume them. As
we only have 10s before the vgem fence times out, there is no margin of
safety. Err on the side of safety and reduce it down to 2s, we won't test
importing as many fences simultaneously, but after the first full pages
we should be good at spotting errors!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The amdgpu tests in tests/amdgpu got installed directly into
$libexecdir before, but test-list.txt still referred to them as
amdgpu/$testname.
This fixes running scripts/run-tests.sh -l with the install directory
as IGT_TEST_ROOT and, I can imagine, actually running them from
install directory (untested). It also removes one FIXME comment for an
internet point.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Reviewed-by: Katarzyna Dec <katarzyna.dec@intel.com>
|
|
We current have a single for_each_engine() iterator which we use to
generate both a set of uABI engines and a set of physical engines.
Determining what uABI ring-id corresponds to an actual HW engine is
tricky, so pull that out to a library function and introduce
for_each_physical_engine() for cases where we want to issue requests
once on each HW ring (avoiding aliasing issues).
v2: Remember can_store_dword for gem_sync
v3: Find more open-coded for_each_physical
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
This patch adds a context creation ioctl wrapper that returns the error
for the caller to consume. Multiple tests that implemented this already,
have been changed to use the new library function.
v2:
- Add gem_require_contexts() to check for contexts support (Chris)
v3:
- Add gem_has_contexts to check for contexts support and change
gem_require_contexts to skip if contests support is not available.
(Chris)
v4:
- Cosmetic changes and use lib function in gem_ctx_create where
possible. (Michal)
v5:
- Use gem_contexts_require() in tests and fixtures. (Chris)
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We have it. Daniel Stone said the #ifdef HAVE_CONFIG_H comes from the
X11 transition to the modular build, where in the imake -> modular
build transition config.h wasn't universally available. Now we just
make this a requirement (so yeah Android better generate one too).
v2: Improve commit message a bit.
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Rather than have the code in multiple locations, put a copy in lib/
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
amdgpu/amd_basic.c: In function ‘amdgpu_semaphore_test’:
amdgpu/amd_basic.c:555:9: error: missing braces around initializer [-Werror=missing-braces]
struct amdgpu_cs_request ibs_request[2] = {0};
^
amdgpu/amd_basic.c:555:9: error: (near initialization for ‘ibs_request[0]’) [-Werror=missing-braces]
amdgpu/amd_basic.c:556:9: error: missing braces around initializer [-Werror=missing-braces]
struct amdgpu_cs_ib_info ib_info[2] = {0};
^
amdgpu/amd_basic.c:556:9: error: (near initialization for ‘ib_info[0]’) [-Werror=missing-braces]
amdgpu/amd_basic.c: In function ‘amdgpu_command_submission_multi_fence_wait_all’:
amdgpu/amd_basic.c:1210:9: error: missing braces around initializer [-Werror=missing-braces]
struct amdgpu_cs_request ibs_request[2] = {0};
^
amdgpu/amd_basic.c:1210:9: error: (near initialization for ‘ibs_request[0]’) [-Werror=missing-braces]
amdgpu/amd_basic.c:1212:9: error: missing braces around initializer [-Werror=missing-braces]
struct amdgpu_cs_fence fence_status[2] = {0};
^
amdgpu/amd_basic.c:1212:9: error: (near initialization for ‘fence_status[0]’) [-Werror=missing-braces]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
A bare bones test to execute nothing; a starting point to learn the
interface and to reveal the first limitations of amdgpu.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Simple copy and replace of the CUnit tests inside libdrm to form a basis
for further prime integration testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|