Commit Graph

467 Commits (8affa2699587b8239135b75ade24ee837df1606c)

Author SHA1 Message Date
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
Alex Xie 8a89d5f620 amdgpu: A new option to run tests on render node
Tested:
1. As root, tests passed on primary.
2. As root, tests passed on render node.
   BO export/import test was skipped
3. As non-privileged user, tests failed on primary as expected.
4. As non-privileged user, tests passed on render node.
   BO export/import test was skipped

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-01-27 11:56:23 -05:00
Alex Xie 12dd7a2e9c amdgpu: A new option to choose which device to run most tests
This can be used to test multiple GPUs

v2: Use PCI bus ID and optional PCI device ID to choose device
    Add an option to display information of AMDGPU devices

Tested:
   ./amdgpu_test -p
   ./amdgpu_test
   ./amdgpu_test -b 1 #fail as expected
   ./amdgpu_test -b 6 #pass
   ./amdgpu_test -b -d 1 #fail as expected
   ./amdgpu_test -b -d 0 #pass

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-01-27 11:55:28 -05:00
Alex Xie 5e0f7c5c65 amdgpu: verify the tested device
Verify the vender ID and driver name.
Open all AMDGPU devices.
Provide an option to open render node.

Tested as root: PASS
Tested as non-privileged user:
All tests failed as expected

v2: Return value in the ene of function amdgpu_open_devices.
    Check the return value of amdgpu_open_devices.
    amdgpu_test is not for USB device for the time being.
    Get the name of node from function drmGetDevices2.
    Drop the legacy drmAvailable() from the test.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-01-27 11:53:26 -05:00
Tomasz Figa 8ef7e5b702 tests: Use -pthread in CFLAGS instead of -lpthread
-lpthread is not always a valid flag to pull pthread support, especially
on Android it will fail to link due to a missing libpthread.so. The more
generic way to build-in pthread support is to use the -pthread CFLAG, so
let's use it instead.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
[Emil Velikov: rebase on top of previous commit]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-01-27 16:18:02 +00:00
Emil Velikov 58459a57fa tests/nouveau: automake: fold C and CPP flags
Since we don't have any C++ souces this should be a no-op. Folding the
two seems to be the common practise throughout the repo.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-01-27 16:15:45 +00:00
Emil Velikov 03d2e91d00 android: introduce Android.common.mk to reduce boilerplate
... across the makefiles. Currently this isn't much but that will change
shortly.

As an added bonus this fixes all present and future cases where we've
forgotten to strip out the headers from LOCAL_SRC_FILES.

In a couple of cases (the tests) we start setting
LOCAL_EXPORT_C_INCLUDE_DIRS, which shouldn't be an issue.

Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
2017-01-27 15:48:16 +00:00
Emil Velikov de5b41ef5a android: remove LOCAL_MODULE_TAGS := optional tag
Seems to be the default option since ~2009 with commit 2f31293ba78 "auto
import from //branches/cupcake/...@137197". Fleshed out from a larger
commit in the AOSP repo/fork.

Cc: Dan Willemsen <dwillemsen@google.com>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
2017-01-27 15:47:13 +00:00
Thierry Reding 13b99f2a89 tests/drmdevice: Add USB, platform and host1x support
Extend the drmdevice test with support for the newly added USB, platform
and host1x busses.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-01-20 16:27:33 +01:00
Neil Armstrong 9e4c686aa3 tests/util: Add support for meson module
Add support for Amlogic Meson DRM driver merged for Linux 4.10.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-01-19 10:18:33 +01:00
Alex Xie e1ee01a758 amdgpu: Provide more specific error message if non-privileged user runs amdgpu_test
Before this change, the error message is:
"WARNING - Suite initialization failed..."
People might think this is a driver problem.

Tested with non-privileged user. Now the error message is like:
...
Error:Permission denied. Hint:Try to run this test program as root.
WARNING - Suite initialization failed for 'Basic Tests'.
...

Tested as root with no regression.

amdgpu_test uses CUnit. CUnit outputs warning message to stdout.
To be consistent, this commit outputs error message to stdout.

v2: Use strerror instead of %m. %m is a GNU C Library extension.
v3: Limit code and commit message within 80 characters per line.
    Update commit message.
    Remove a space before starting parenthesis in function call.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Xie <AlexBin.Xie@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2017-01-13 10:35:43 -05:00
Ville Syrjälä e3af5368b2 modetest: Allow the user to specify the plane ID
Devices can have multiple planes, so allow the user to choose between
them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2016-12-19 15:14:07 +02:00
Emil Velikov 5c1c91b3d3 tests: automake: reorder makefile contents
Purely cosmetic changes.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-12-05 17:24:32 +00:00
Emil Velikov 0c80fddd1d tests: remove useless legacy tests
All of these 'tests' cover UMS functionality which is neither being
worked on or actively maintained.

The only cases where developers touch UMS code is to unwrap it from the
KMS codepaths and ensure that those are secure.

Anyone who feels strong about having these around can revive them, but
in all honestly do consider _seriously_ what you're doing ;-)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-12-05 17:23:45 +00:00
Emil Velikov b305238ceb tests/drmdevice: use drmGetDevice[s]2
Pass along DRM_DEVICE_GET_PCI_REVISION only when the individual nodes
are opened and update the printed messages accordingly.

v2: Attribute for the flag rename, call drmGetDevices2 w/o the flag.

v3: Keep drmParsePciDeviceInfo() hunk in previous patch.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-12-05 17:22:52 +00:00
Grazvydas Ignotas 1fc32f1cc5 tests: kms: fix shadowed declaration warning
There is no need to maintain the value in the shadowed variable from
what I can see.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-11-22 13:54:31 +00:00