summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tests/amdgpu: enable vcn test based on ip querySathishkumar S2022-02-191-53/+28
| | | | | | | | family_id checks can be removed and instead use ip major/minor version Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Reviewed-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* tests/amdgpu: enable jpeg test based on ip querySathishkumar S2022-02-191-6/+3
| | | | | | | | | enable jpeg test if ip query is successful and avoid family_id based checks, instead use ip major/minor version Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Reviewed-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* tests/amdgpu: add a test for new CTX OP to get/set stable pstatesSamuel Pitoiset2022-01-201-0/+32
| | | | | Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* use standard `__typeof__()` instead of GNU extension `typeof()`Eric Engestrom2022-01-192-3/+3
| | | | | | | | | | | | | | And switch to c_std=c99. This simplifies using libdrm as a meson subproject for mesa. v2: (dylan) - switch to c99 as the standard - Fix amdgpu security tests as well Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Signed-off-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emma Anholt <emma@anholt.net>
* tests/amdgpu: Add VCN test support for Biege GobyGuchun Chen2022-01-141-1/+2
| | | | | | | | | Added Beige Goby chip id in vcn test. Signed-off-by: Guchun Chen <guchun.chen@amd.com> Reviewed-By: Veerabadhran Gopalakrishnan <Veerabadhran.gopalakrishnan@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* tests/amdgpu: add jpeg tests supportSathishkumar S2021-12-095-1/+641
| | | | | | | | | | | | | | | v2: - remove dec create/destroy msg as its not relevant to jpeg (Leo) - enable the test for jpeg2/jpeg3 (Leo) - validate checksum of result (Leo) - add appropriate comments (Leo) v3: - linux style function definition indent (James) - use multiline comment delimiter (Leo) Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* xf86drm: add iterator API for DRM/KMS IN_FORMATS blobsLuigi Santivetti2021-11-081-18/+12
| | | | | | | | | | | | | Add support for parsing IN_FORMATS property blobs. Providing libdrm with this functionality helps to standardise how user-space reads kernel blobs and decreases duplication on the client side. drmModeFormatModifierBlobIterNext() allows the caller to view formats and associated modifiers given a valid property blob. An example is available inside the libdrm unit test, modetest.c. Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com> Reviewed-by: Simon Ser <contact@emersion.fr>
* Fix -Werror=format build errors on FreeBSDAlex Richardson2021-11-023-3/+3
| | | | | | | | On 64-bit FreeBSD targets uint64_t is generally defined as `unsigned long` and not `unsigned long long`. Use the PRI macros to fix -Wformat. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> Reviewed-by: Simon Ser <contact@emersion.fr>
* amdgpu: add amdgpu_stress utility v2Christian König2021-10-202-0/+429
| | | | | | | | | | | Simple yet useful command line utility to simulate memory pressure. Already found quite a number of problems in TTM with that. v2: replace spaces with tabs Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
* tests/modetest: get cursor width and height by drmGetCapZhiJie.Zhang2021-09-021-3/+11
| | | | | | Should get cursor width and height by drmGetCap. Signed-off-by: ZhiJie.Zhang <zhangzhijie@loongson.cn>
* test/amdgpu: Bob to Alice copy should be TMZ in secure bounce testAaron Liu2021-07-231-2/+2
| | | | | | | | SDMA copy from Alice to Bob is in TMZ mode. Therefore SDMA copy back from Bob to Alice should be in TMZ mode too. Signed-off-by: Aaron Liu <aaron.liu@amd.com> Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
* tests/amdgpu: Fix TMZ secure bounce testLuben Tuikov2021-07-161-3/+3
| | | | | | | | | | | | | | | | | | | Fix the TMZ secure bounce test, in that Bob's buffer has to be created encrypted (with the encrypted flag set), so that when we copy from Alice's buffer, which is also encrypted, to Bob's buffer, the copy can be successful and the data actually copied. This fixes the test and it no longer fails. Tested on Sienna Cichlid. Cc: Alex Deucher <Alexander.Deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Aaron Liu <aaron.liu@amd.com> Cc: Huang Rui <ray.huang@amd.com> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com> Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
* xf86drm: Add a human readable representation for format modifiersMarius Vlad2021-06-221-45/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces two new methods to retrieve a human readable representation of a format modifier: drmGetFormatModifierName() - returns a format modifier as a string, from a token modifier drmGetFormatModifierVendor() - returns the vendor as a string, from a token modifier and the fourcc_mod_get_vendor macro that returns the vendor. New format modifiers added in drm_fourcc.h uapi kernel header should be sync'ed up with libdrm and should include a human readable representation for that format modifier, in order to display it correctly as a string. That happens with the help of a python script that reads up drm_fourcc header file and outputs a static table comprised of token modifiers alongside a vendor table (Suggested-by Simon Ser <contact@emersion.fr>). The reason for doing it in libdrm is to have a unified place instead of each user of libdrm having a way to keep track of the format modifiers. With this patch, modetest has also been modified to make use of it. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
* Conditionally include <linux/limits.h> and <sys/params.h> on Linux, BSDEleni Maria Stea2021-06-201-0/+5
| | | | | | | | | <linux/limits.h> should be included conditionally for Linux only, also SPECNAMELEN used conditionally when the OS is FreeBSD requires to include <sys/params.h>. Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* tests/amdgpu/hotunplug: Add hotunplug with exported fenceAndrey Grodzovsky2021-06-092-2/+100
| | | | | | | | Disconnect device while fence is exported. Also disable this test for sytem with single GPU. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Alex Deucher alexander.deucher@amd.com
* tests/amdgpu/hotunplug: Add hotunplug with exported bo testAndrey Grodzovsky2021-06-091-2/+44
| | | | | | | Disconnect device while BO is exported. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Alex Deucher alexander.deucher@amd.com
* tests/amdgpu/hotunplug: Add unplug with cs test.Andrey Grodzovsky2021-06-091-2/+124
| | | | | | | Same as simple test but while doing cs Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Alex Deucher alexander.deucher@amd.com
* test/amdgpu/hotunplug: Add test suite for GPU unplugAndrey Grodzovsky2021-06-094-0/+226
| | | | | | | | | | Add plug/unplug device and open/close device file infrastructure. Add basic test - unplug device while device file still open. Close device file afterwards and replug the device. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Alex Deucher alexander.deucher@amd.com
* test/amdgpu: Add helper functions for hot unplugAndrey Grodzovsky2021-06-092-3/+87
| | | | | | | | Expose close device and add open device wich preserves test index. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Alex Deucher alexander.deucher@amd.com
* tests/amdgpu: Fix valgrind warningAndrey Grodzovsky2021-06-091-2/+3
| | | | | | | Struct access after free Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Alex Deucher alexander.deucher@amd.com
* Revert "tests/amdgpu: fix bo eviction test issue"Lang Yu2021-06-012-9/+7
| | | | | | | | | | | | | | This reverts commit a5a400c9581c3b91598623603067556b18084c5d. Bo evict test was disabled by default per below commit. So still keep it as disabled. 1f6a85cc test/amdgpu: disable bo eviction test by default Signed-off-by: Lang Yu <Lang.Yu@amd.com> Signed-off-by: Guchun Chen <guchun.chen@amd.com> Reviewed-by: Lang Yu <Lang.Yu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* test/amdgpu: Add emit mem sync flag for test IBJinzhou Su2021-04-191-1/+1
| | | | | | | | | | | | In syncobj test, 3 threads will be created. Sometimes the first gfx IB and the third sdma IB will use same physical page. There will be risk that sdma engine will read gfx IB in the same physical page. So better to flush the cache before commit the sdma IB. Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
* test/amdgpu: use tmz ids to check whether enable security testsHuang Rui2021-04-141-1/+2
| | | | | | | | Using tmz ids that reported from kernel to decide whether enable security tests. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
* tests/amdgpu/vcn: update to support aldebaranJames Zhu2021-04-141-1/+1
| | | | | | | | VCN is supported after AI family Arcturus. Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* tests/amdgpu:retire asic_id check on unsupported casesFeifei Xu2021-04-127-34/+78
| | | | | | | Retire the asic_id check for AI family. Signed-off-by: Feifei Xu <Feifei.Xu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
* tests/amdgpu: update gfx9 BufferCopy/BufferClearFeifei Xu2021-04-091-5/+7
| | | | | | | | | | buffer_load/store_format_xyzw require 64bit vgpr_a[2]. The original parameter is one u32. Modify the shader binary to fit the 64bit parameter. Signed-off-by: Feifei Xu <Feifei.Xu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Tested-by: Gang Long <Gang.Long@amd.com>
* tests/amdgpu: fix bo eviction test issueLang Yu2021-04-012-7/+9
| | | | | | | | | | | | | | | | On Raven2/Picasso, the default VRAM size is 2048M, and the default GTT size is 3072M. If max_allocation of VRAM exceeds half of GTT size, GTT memory can't hold evicted bo from VRAM and bo in itself at the same time. Then amdgpu_cs_list_validate will failed with "Not enough memory for command submission" error. NOTE: The installed DRAM should be larger than 8GB, if the VRAM size is 2048M. Signed-off-by: Lang Yu <Lang.Yu@amd.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* drm/tests/amdgpu: fix Metadata test failed issueLang Yu2021-04-012-5/+2
| | | | | | | | The unit of size_metadata is one byte not four bytes. Enable Metadata test. Signed-off-by: Lang Yu <Lang.Yu@amd.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* test/amdgpu: remove static varible in Syncobj testJinzhou Su2021-03-241-1/+1
| | | | | | | | | | | In syncobj test, wait thread and signal thread create simultaneously. The ptr for GFX IB and SDMA IP should be operated separately. With static, there will be risk that GFX NOP is in SDMA IB or SDMA NOP is in GFX IB, then GFX or SDMA hang caused. Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* Avoid some compiler errors for tests/util/pattern.cVictor Hugo Vianna Silva2021-02-101-3/+2
| | | | | | | | | - Remove one unused variable. - Convert two int-s into 'unsigned int'. Motivated by a failed build of Chromium. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Victor Hugo Vianna Silva <victor.vianna10@gmail.com>
* tests/amdgpu/vcn: clean abundant codesSonny Jiang2021-01-231-2/+0
| | | | | | | Remove useless codes. Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
* tests/amdgpu: add vcn test support for dimgrey_cavefishJames Zhu2021-01-231-1/+2
| | | | | | | add dimgrey_cavefish chip id in vcn test Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
* tests/amdgpu: add vcn test support for navy_flounderTao Zhou2021-01-231-1/+2
| | | | | | | add navy_flounder chip id in vcn test Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com>
* tests/util: Add mxsfb-drm driverFabio Estevam2021-01-221-0/+1
| | | | | | | | Add an entry for the "mxsfb-drm" driver, so that the test utilities work with the mxsfb driver without passing the -M argument. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* tests/amdgpu: Fix on FreeBSDEmmanuel Vadot2020-12-121-0/+4
| | | | | | FreeBSD have endian.h under the sys directory. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
* tests/amdgpu: Fix a typoLuben Tuikov2020-12-111-1/+1
| | | | | | | Fix a typo: "TZM" --> "TMZ" Signed-off-by: Luben Tuikov <luben.tuikov@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* tests/modetest: remove bracket in dump_connectors()Nicolas Caramelli2020-12-111-1/+1
| | | | Signed-off-by: Nicolas Caramelli <caramelli.devel@gmail.com>
* tests/etnaviv_2d_test: check whether the rendering is correctLubomir Rintel2020-12-091-2/+27
| | | | | | | | | | | | | Instead of always dumping the rendered picture, check whether it matches the expectations. This makes more sense for automated testing. Retain the ability to dump the picture instead of checking it when a file name is given as an argument. This also removes use of a hardcoded file name in a world writable directory, which is an unsafe thing to do anyway. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
* tests/etnaviv_2d_test: pick the 2D coreLubomir Rintel2020-12-091-7/+24
| | | | | | | | Run the test on a core capable of 2D rendering instead of hardcoding to core zero. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
* tests/etnaviv_2d_test: explain the errorsLubomir Rintel2020-12-091-1/+13
| | | | | | | Just so that it's obvious what failed and why. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
* tests/amdgpu/vcn: update to not use asic_id for RenoirThong Thai2020-11-061-1/+1
| | | | | Signed-off-by: Thong Thai <thong.thai@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* tests/util: Add imx-dcss driverLucas Stach2020-10-281-0/+1
| | | | | | | This makes the test utilities work with the i.MX DCSS driver without the necessity of using the -M argument. Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* tests/amdgpu: disable VCN test if no VCN ring available(v2)Tianci.Yin2020-10-231-4/+8
| | | | | | | If KMD has no VCN support, remove the VCN test. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Tianci.Yin <tianci.yin@amd.com>
* tests: add komeda to list of modules to look for for testingCarsten Haitzler2020-10-161-0/+1
| | | | | | | komeda is one of the supported GPUs in the kernel tree so this adds it to libdrm modules to look for in tests. Signed-off-by: Carsten Haitzler <carsten.haitzler@arm.com>
* amdgpu: only enable security tests on raven familyAlex Deucher2020-10-151-1/+1
| | | | | | | It's the only asic with support at the moment. Acked-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: Secure bounce test (v4)Luben Tuikov2020-10-153-9/+360
| | | | | | | | | | | | | | | | | | | Implement secure bounce test. Steps implemented as outlined by Christian K. v2: Remove gpu_info; add comment describing the purpose and steps of the test. v3: Parameterize "secure" in amdgpu_bo_lcopy() and amdgpu_bo_move(). Set them both to 0. Allocate buffer Bob to be non-TMZ. v4: Fix an off-by-one bug which was causing the test to segfault. Acked-by: Huang Rui <ray.huang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: Remove forward declarationsLuben Tuikov2020-10-151-60/+56
| | | | | | | | Acked-by: Huang Rui <ray.huang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* test/amdgpu: enable security suite testsAaron Liu2020-10-151-0/+4
| | | | | | | | | This patch enables security suite tests. Acked-by: Huang Rui <ray.huang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Aaron Liu <aaron.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* test/amdgpu: add drm version checking for security suiteAaron Liu2020-10-151-0/+8
| | | | | | | | | | Adding drm version checking for security suite. drm version need to be at least 3.37. Acked-by: Huang Rui <ray.huang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Aaron Liu <aaron.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: add test to submit a sdma command with secure contextAaron Liu2020-10-151-0/+10
| | | | | | | | | | | This patch add test to submit a sdma command with secure context. Acked-by: Huang Rui <ray.huang@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Aaron Liu <aaron.liu@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>