Commit Graph

482 Commits (5f7deb50787b82038cc35fb1e31b761e33e5a341)

Author SHA1 Message Date
Dylan Baker 5f7deb5078 Add meson build system
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>
2018-01-12 09:40:48 -08:00
Hawking Zhang f115de819b tests/amdgpu: execute copy linear on all the available rings
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>
2018-01-12 12:17:24 -05:00
Hawking Zhang cbbb8a332d tests/amdgpu: execute const fill on all the available rings
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>
2018-01-12 12:15:40 -05:00
Hawking Zhang 168dbe9a0e tests/amdgpu: execute write linear on all the available rings
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>
2018-01-12 12:12:40 -05:00
Christian König de807d1a74 test/amdgpu: fix compiler warnings
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>
2018-01-09 17:15:13 +01:00
Andrey Grodzovsky 4f8e426884 tests/amdgpu: Add return CUE_SUCCESS to suite_vcn_tests_clean.
fixes: 806d080360 (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>
2017-12-15 13:30:53 -05:00
Andrey Grodzovsky 7f2993948c amdgpu: Remove dummy CU_ASSERT_EQUAL.
Fixes test failure on rhel.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Qiang Yu <Qiang.Yu@amd.com>
2017-12-12 09:25:50 -05:00
Andrey Grodzovsky bc21168fa9 amdgpu: Add explicit dependency test.
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>
2017-11-30 14:51:12 -05:00
Andrey Grodzovsky aeab24aa9e amdgpu: Dynamicly disable BO suite "Metadata" test.
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>
2017-11-29 10:31:10 -05:00
Andrey Grodzovsky 1a129004a8 amdgpu: Switch amdgpu CS tests enabling to the new way.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-11-29 10:31:00 -05:00
Andrey Grodzovsky 18ffe485cd amdgpu: Disable deadlock test suite for Vega 10
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>
2017-11-15 23:28:45 -05:00
Andrey Grodzovsky 9ad9b7e91e amdgpu: Add memory over allocation test.
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>
2017-11-14 14:26:25 +01:00
Andrey Grodzovsky 818a0d4245 amdgpu: Move memory alloc tests in bo suite.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2017-11-13 18:20:27 +01:00
Andrey Grodzovsky 806d080360 amdgpu: Use new suite/test disabling functionality.
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>
2017-11-13 18:20:22 +01:00
Andrey Grodzovsky 864219425d amdgpu: Add functions to disable suites and tests.
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>
2017-11-13 18:20:05 +01:00
Inki Dae be40710f06 exynos: change the license to X11/MIT
Change GPL license of Exynos related code to X11/MIT.

I'd like to keep a consistent license across all Exynos code
because License checker notices two more licenses exist
in libdrm.

For the license change I need to get your agree - all committers.
So please give me Acked-by if you agree with me.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Hyungwon Hwang <human.hwang@samsung.com>
Acked-by: SooChan Lim <sc1.lim@samsung.com>
Acked-by: Sangjin LEE <lsj119@samsung.com>
Acked-by: Boram Park <boram1288.park@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-11-07 11:19:58 +00:00
Andrey Grodzovsky f3091bac21 amdgpu: Fix wrappers for AMDGPU_VM IOCTL.
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>
2017-11-03 13:07:30 +01:00
Andrey Grodzovsky 33dcc29f7c amdgpu: Add VMID reservation per GPU context test.
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>
2017-10-27 18:26:08 +02:00
Ville Syrjälä ba68d7bf60 modetest: Allow full testing of primary planes
Allow the user to override the default configuration set by setcrtc
for the primary plane. On some hardware primary planes can be freely
positioned/sized, and it'd be nice if we can actually test that feature.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-10-19 19:16:16 +03:00
Kristian H. Kristensen 511c71c868 modetest: Decode IN_FORMATS plane blob property
This teaches modetest about the new IN_FORMATS blob and decodes the
blob to show supported formats and modifiers.

Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
2017-10-18 12:32:40 -07:00
James Zhu 2ecafcae8a tests/amdgpu: fix uvd enc data corruption issue
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>
2017-10-06 09:40:06 -04:00
James Zhu 657b09438b tests/amdgpu: add new uvd enc support check
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>
2017-10-06 09:40:06 -04:00
Andrey Grodzovsky 670db97dc3 amdgpu: Add deadlock detection test suit.
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>
2017-10-04 10:50:02 +02:00
Christian König 736ef0b61c amdgpu: make userptr unit test more interesting
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>
2017-10-04 10:47:49 +02:00
Alex Deucher 05a830d382 tests/amdgpu: add missing header to SOURCES
Fixes the tarball generation.

fixes: 9d133dd087 (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>
2017-08-31 10:23:18 -04:00
Jan Vesely 20138ea997 drmsltest: Check expected neighbours
Fixes: 7d8c946408
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-08-21 13:05:13 +01:00
Boyuan Zhang 9d133dd087 tests/amdgpu: add uvd encode unit tests
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>
2017-08-16 16:16:50 -04:00
Flora Cui e2b6785c5a test/amdgpu: fix test failure for SI
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>
2017-08-04 08:27:06 -04:00
Hawking Zhang 4d0e05eb2a tests/amdgpu: bypass VCE tests on raven
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>
2017-08-04 08:25:00 -04:00
Hawking Zhang 517df5f513 tests/amdgpu: bypass UVD CS tests on raven
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>
2017-08-04 08:24:51 -04:00
Michel Dänzer 57d67d55d3 tests/amdgpu: s/uvd_messages.h/decode_messages.h/ in Makefile.am
Fixes make distcheck with amdgpu enabled.

Fixes: ec65d19809 ("tests/amdgpu: rename uvd messages to decode
                      messages")

Trivial.
2017-06-12 17:16:47 +09:00
Tom St Denis b6f450e065 tests/amdgpu: Fix device_id option
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>
2017-06-06 12:14:13 -04:00
Leo Liu 16444e1061 tests/amdgpu: implement vcn dec unit tests
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-06-05 10:41:13 -04:00
Leo Liu c1f5eea50f tests/amdgpu: add vcn tests support and sets
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-06-05 10:41:13 -04:00
Leo Liu 01096f2122 tests/amdgpu: move decode sum to common
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
2017-06-05 10:41:13 -04:00
Leo Liu 1851f1b57a tests/amdgpu: separate decode messages
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>
2017-06-05 10:41:13 -04:00
Leo Liu ec65d19809 tests/amdgpu: rename uvd messages to decode messages
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>
2017-06-05 10:41:13 -04:00
Eric Anholt 2ee1fd2470 Add the DPI encoder/connector types to KMS utils.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-04-25 16:10:38 -07:00
Eric Anholt d75a7ef1d7 Add pl111 as a KMS driver for utils.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-04-25 16:10:33 -07:00
Ilia Mirkin 691a215799 modetest: fix printing of fourcc on BE machines
fourcc is not a string, it's a packed integer. This happens to work out
on LE, but gets reversed on BE.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2017-04-19 23:25:43 -04:00
Nicolai Hähnle 90c304584a amdgpu: add a test for amdgpu_cs_wait_fences
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>
2017-04-18 21:05:48 +02:00
Bernd Kuhls 6796859fcc tests/etnaviv: link against libdrm
Fixes link errors detected by buildroot autobuilders:

http://autobuild.buildroot.net/results/68a/68af62f4ab6944d326468818562c05fd5cc55b03/build-end.log

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100530
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:57:22 +01:00
Rob Herring c4d673acdc Android: fix building of modetest and proptest
These tests depend on tests/util/ headers, but expect the include path
to be tests/.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Seung-Woo Kim 2dc30dd527 tests/exynos: fix invalid code of error path in g2d test
This patch fixes invalid code of error path including NULL
deference and leak in g2d test.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Seung-Woo Kim a398adba7c tests/exynos: remove unused-function build warning
The function g2d_blend_test() is blocked to call because of
feature unsafety. This patch blocks with proper feature name
and also blocks the function itself to remove build warning.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03 17:46:06 +01:00
Junwei Zhang a784c38af7 tests/amdgpu: add Polaris12 support for cs test
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>
2017-03-27 21:42:07 +02:00
Leo Liu f810e31bcf tests/amdgpu: add vce unit test support for vega10
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>
2017-03-27 21:42:07 +02:00
Leo Liu 5a44f9e6c6 tests/amdgpu: add uvd unit test support for vega10
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-27 21:42:07 +02:00
Huang Rui fee173dc77 tests/amdgpu: fix the count number for vega10
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Ken Wang <Qingqing.Wang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-03-27 21:42:07 +02:00
Emil Velikov 07edf5d905 Remove unused tests/drmstat.c
Earlier commit removed all the legacy 'tests' but a file was left
danglig.

Fixes: 0c80fddd1d "tests: remove useless legacy tests"
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reported-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-02-01 22:09:42 +00:00