aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* meson,configure: include config.h automaticallyEric Engestrom2018-03-209-36/+0
| | | | | | | | | This will prevent any more missing `#include "config.h"` bug, at the cost of having to recompile some files that didn't need to be when changing build options. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* tests/amdgpu: Fix misspellings of "suite"Michel Dänzer2018-03-022-12/+12
| | | | Acked-by: Christian König <christian.koenig@amd.com>
* test/amdgpu: disable bo eviction test by defaultChunming Zhou2018-03-011-0/+2
| | | | | | | | | | | if some system has no swap space and memory is less, than the test could fail. And bo eviction test takes much more time in some system, which effects automation test result and efficiency. So disable it by default now, only be used by developer manually. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: add bo eviction testChunming Zhou2018-02-082-1/+182
| | | | | | | | | | | | | for(( i=1; i < 100; i++)) do echo "Hello, Welcome $i times " sudo ./amdgpu_test -s 1 -t 5 done with above stricpt, run in two terminals, will reproduce Felix's swap leeking issue. Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: add missing config.h includeEmil Velikov2018-01-311-0/+4
| | | | | | | | | | | | | | | Otherwise we'll end up without the macros set during configure stage. And effectively error out in sanity tests such as the mmap static assert. To reproduce, do a multilib build - 32bit build on 64bit machine. Cc: Fabio Pedretti <pedretti.fabio@gmail.com> Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Fixes: 33dcc29f7cc ("amdgpu: Add VMID reservation per GPU context test.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104819 Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* tests/amdgpu: drop unused variablesEric Engestrom2018-01-297-14/+7
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* tests/amdgpu: add parentheses to make operation priority explicitEric Engestrom2018-01-291-1/+1
| | | | | | | | While at it, align with the other half on the next line. Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* amdgpu: Disable VM test suite by default for SI ASICsMichel Dänzer2018-01-263-1/+26
| | | | | | Hangs my Cape Verde. Acked-by: Christian König <christian.koenig@amd.com>
* amdgpu: Disable deadlock test suite by default for SI ASICsMichel Dänzer2018-01-261-1/+2
| | | | | | Hangs my Cape Verde. Acked-by: Christian König <christian.koenig@amd.com>
* amdgpu: Fix segfault in deadlock test.Andrey Grodzovsky2018-01-261-2/+2
| | | | | | | | If amdgpu_cs_query_fence_status terminates prematurely the BO sometimes is unmapped before helper thread writes a vlaue into it causing a segfault. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
* amdgpu: Update deadlock test to not assert on ECANCELEDAndrey Grodzovsky2018-01-261-2/+2
| | | | | | | | Kernel will abort jobs for guilty (causing GPU hang) context with -ECANCELED don't assert if that the case. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* amdgpu: Symlink .editorconfig to tests/amdgpuMichel Dänzer2018-01-181-0/+1
| | | | | | | In order to use consistent editorconfig settings in both amdgpu directories. Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Don't dereference device_handle after amdgpu_device_deinitializeMichel Dänzer2018-01-161-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Fixes use after free: ==2537== Invalid read of size 4 ==2537== at 0x1162C9: suite_deadlock_tests_enable (deadlock_tests.c:101) ==2537== by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421) ==2537== by 0x10B157: main (amdgpu_test.c:560) ==2537== Address 0x5e44f24 is 452 bytes inside a block of size 1,016 free'd ==2537== at 0x4C2BE1B: free (vg_replace_malloc.c:530) ==2537== by 0x504CD8B: amdgpu_device_reference (amdgpu_device.c:164) ==2537== by 0x504CD8B: amdgpu_device_deinitialize (amdgpu_device.c:307) ==2537== by 0x1162BB: suite_deadlock_tests_enable (deadlock_tests.c:97) ==2537== by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421) ==2537== by 0x10B157: main (amdgpu_test.c:560) ==2537== Block was alloc'd at ==2537== at 0x4C2CC05: calloc (vg_replace_malloc.c:711) ==2537== by 0x504CA5E: amdgpu_device_initialize (amdgpu_device.c:212) ==2537== by 0x116298: suite_deadlock_tests_enable (deadlock_tests.c:93) ==2537== by 0x10B157: amdgpu_disable_suits (amdgpu_test.c:421) ==2537== by 0x10B157: main (amdgpu_test.c:560) Reviewed-by: Christian König <christian.koenig@amd.com>
* Add meson build systemDylan Baker2018-01-121-0/+34
| | | | | | | | | | This patch adds a complete meson build system, including tests and install. It has the necessary hooks to allow it be used as a subproject for other meson based builds such as mesa. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* tests/amdgpu: execute copy linear on all the available ringsHawking Zhang2018-01-121-96/+104
| | | | | | | Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: execute const fill on all the available ringsHawking Zhang2018-01-121-70/+77
| | | | | | | Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: execute write linear on all the available ringsHawking Zhang2018-01-121-53/+58
| | | | | | | Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* test/amdgpu: fix compiler warningsChristian König2018-01-091-4/+4
| | | | | | | SWAP_32() should mask first and then shift. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tests/amdgpu: Add return CUE_SUCCESS to suite_vcn_tests_clean.Andrey Grodzovsky2017-12-151-0/+2
| | | | | | | | fixes: 806d0803600000faecb4025d8e9c7490cb097c25 (amdgpu: Use new suite/test disabling functionality.) bug: https://bugs.freedesktop.org/show_bug.cgi?id=104280 Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Remove dummy CU_ASSERT_EQUAL.Andrey Grodzovsky2017-12-121-2/+0
| | | | | | | Fixes test failure on rhel. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Qiang Yu <Qiang.Yu@amd.com>
* amdgpu: Add explicit dependency test.Andrey Grodzovsky2017-11-302-0/+282
| | | | | | | | | | | | | | | The test is as following: 1) Create context A & B 2) Send a command submission using context A which fires up a compute shader. 3) The shader wait a bit and then write a value to a memory location. 4) Send a command submission using context B which writes another value to the same memory location, but having an explicit dependency on the first command submission. 5) Wait with the CPU for both submissions to finish and inspect the written value. Test passes if the value seen in the memory location after both submissions is from command B. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* amdgpu: Dynamicly disable BO suite "Metadata" test.Andrey Grodzovsky2017-11-292-2/+3
| | | | | | | Disable the test instead of doing #ifdef 0 Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Switch amdgpu CS tests enabling to the new way.Andrey Grodzovsky2017-11-293-33/+38
| | | | | Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Disable deadlock test suite for Vega 10Andrey Grodzovsky2017-11-153-1/+25
| | | | | | | The test stalls the CP, until RCA is done the test is disabled to not disrupt regression testing. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
* amdgpu: Add memory over allocation test.Andrey Grodzovsky2017-11-141-0/+24
| | | | | | | | | | | | Allocates 1 TB of memory. Test is disabled by default since it's triggers OOM killer. v2: FIx the test to only alloc the BO and assert if return value not equal to -ENOMEM and remove test disable on start. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Move memory alloc tests in bo suite.Andrey Grodzovsky2017-11-132-49/+49
| | | | | Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Use new suite/test disabling functionality.Andrey Grodzovsky2017-11-136-134/+123
| | | | | | | | Switch from disabling tests during run to using the new disable API. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Add functions to disable suites and tests.Andrey Grodzovsky2017-11-132-18/+170
| | | | | | | | | | Suits are diasbled based on hooks they provide (e.g incompatible ASIC or missing blocks). Single tests are diasbled explicitly. Suit or test can be forced to execute even if disabled by adding -f flag after specifying suit [test] ids. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Fix wrappers for AMDGPU_VM IOCTL.Andrey Grodzovsky2017-11-031-2/+2
| | | | | | | | | Rmove amdgpu_context_handle from the interface and use amdgpu_device_handle instead. Uupdate VMID reservation test accordingly. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: Add VMID reservation per GPU context test.Andrey Grodzovsky2017-10-274-1/+175
| | | | | | | | | | | The test will Reserve a VMID, submit a command and unreserve the VMID. v2: Wrappers names were changed. Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: fix uvd enc data corruption issueJames Zhu2017-10-062-3/+5
| | | | | | | | | | In uvd encode parameter package, parameters input_pic_luma_pitch and input_pic_chroma_pitch should be picture width align with hardware alignment. The hardware alignment is 16 for amdgpu family earlier than AMDGPU_FAMILY_AI, and 256 for later than and including AMDGPU_FAMILY_AI. Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* tests/amdgpu: add new uvd enc support checkJames Zhu2017-10-061-6/+21
| | | | | | | | Query hardware IP information to find out if there are uvd encode rings ready for use in kernel driver. Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* amdgpu: Add deadlock detection test suit.Andrey Grodzovsky2017-10-044-2/+270
| | | | | | | | | | | | | | | | | | | Adding initial tests for locks detection when SW scheduler FIFO is full. The test works by submitting a batch of identical commands which make the CP stall waiting for condition to become true. The condition is later satisfied form a helper thread. Other events that happen during this time might create deadlock situations. One such example is GPU reset triggered by this stall when amdgpu_lockup_timeout != 0. v2: Increase the delay from 2 to 100 ms. Comment out the compute test until it's working. Typos fix. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* amdgpu: make userptr unit test more interestingChristian König2017-10-041-0/+8
| | | | | | | Do a fork() to force some MMU callbacks. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: add missing header to SOURCESAlex Deucher2017-08-311-1/+2
| | | | | | | | | Fixes the tarball generation. fixes: 9d133dd08720d80dfc8ce098bf0972 (tests/amdgpu: add uvd encode unit tests) bug: https://bugs.freedesktop.org/show_bug.cgi?id=102391 Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: add uvd encode unit testsBoyuan Zhang2017-08-166-1/+1050
| | | | | | Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Acked-by: Alex Deucher <alexander.deucher at amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* test/amdgpu: fix test failure for SIFlora Cui2017-08-043-124/+228
| | | | | | Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: bypass VCE tests on ravenHawking Zhang2017-08-041-0/+17
| | | | | | | | raven doesn't support VCE Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: bypass UVD CS tests on ravenHawking Zhang2017-08-041-0/+17
| | | | | | | | raven doesn't support UVD decode Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Xiaojie Yuan <Xiaojie.Yuan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: s/uvd_messages.h/decode_messages.h/ in Makefile.amMichel Dänzer2017-06-121-1/+1
| | | | | | | | | Fixes make distcheck with amdgpu enabled. Fixes: ec65d1980912 ("tests/amdgpu: rename uvd messages to decode messages") Trivial.
* tests/amdgpu: Fix device_id optionTom St Denis2017-06-061-9/+9
| | | | | | | | | | The device_id option [-d] was badly broken. This commit fixes the width (was 8 is now 16 bits) as well as enables searches without specifying a bus id. It was also comparing "dev" from the bus field which is not the PCI device id. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
* tests/amdgpu: implement vcn dec unit testsLeo Liu2017-06-052-3/+166
| | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: add vcn tests support and setsLeo Liu2017-06-054-1/+300
| | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: move decode sum to commonLeo Liu2017-06-052-1/+3
| | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: separate decode messagesLeo Liu2017-06-052-1/+5
| | | | | | | AVC decode messages will be common with VCN decode Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: rename uvd messages to decode messagesLeo Liu2017-06-052-5/+5
| | | | | | | It will be shared with VCN decode Signed-off-by: Leo Liu <leo.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* amdgpu: add a test for amdgpu_cs_wait_fencesNicolai Hähnle2017-04-181-0/+100
| | | | | | | Signed-off-by: monk.liu <Monk.Liu@amd.com> [v2: actually hook up the test case] Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: add Polaris12 support for cs testJunwei Zhang2017-03-271-4/+8
| | | | | | Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: add vce unit test support for vega10Leo Liu2017-03-271-12/+42
| | | | | | | | swizzle mode needs reference and input picture luma and chroma pitch aligned with 256 Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: add uvd unit test support for vega10Leo Liu2017-03-271-14/+23
| | | | | Signed-off-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>