summaryrefslogtreecommitdiff
path: root/tests/amdgpu
AgeCommit message (Collapse)Author
2019-04-18amdgpu/amd_abm: Fix getting and setting abm level propertyNicholas Kazlauskas
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>
2019-01-14amd: Use drm_open_driver(AMDGPU)Chris Wilson
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>
2019-01-14tests/amdgpu: Build amd_abm with meson tooPetri Latvala
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>
2019-01-08tests/amdgpu: Add test for Adaptive Backlight ManagementDavid Francis
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>
2018-12-17igt/amdgpu_amd_prime: Bail if we fail to create more contextsChris Wilson
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>
2018-10-23tests: Introduce i915 directoryArkadiusz Hiler
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>
2018-08-13meson: Define all the rpath_dirs in one placeArkadiusz Hiler
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>
2018-08-08igt/amd_prime: Link an amdgpu bo into i915 and try to shrink itChris Wilson
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>
2018-07-27amdgpu/meson: Set the correct rpathArkadiusz Hiler
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>
2018-07-04amdgpu/amd_prime: Reduce setup timeChris Wilson
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>
2018-04-19meson: Install amdgpu tests with their subdirectoryPetri Latvala
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>
2018-02-23Iterate over physical enginesChris Wilson
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>
2018-02-07lib: Move __gem_context_create to common ioctl wrapper library.Antonio Argenziano
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>
2017-09-08build: Nuke #ifdef HAVE_CONFIG_H cargo-cultDaniel Vetter
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>
2017-05-18lib: Refactor testing for ability to use MI_STORE_DATA_IMMChris Wilson
Rather than have the code in multiple locations, put a copy in lib/ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-13amdgpu/amd_cs_nop: Use a counter not seqnoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-13igt/amd_cs_nop: Spread submissions across multiple processesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-25igt/amdgpu: Fix compiler errorsChris Wilson
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>
2017-04-22igt: Add amd_prime for checking prime integrationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-22igt: Add basic amd_cs_nopChris Wilson
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>
2017-04-22igt: Import basic amdgpu tests from libdrmChris Wilson
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>