aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Remove Android build files used only in AOSP fork of libdrmJoonas Kylmälä2020-04-122-57/+0
| | | | | Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Change-Id: Ia6dacb1381ee7de6e1ced2939f3b67a113073afc
* Convert to Android.bpDan Willemsen2020-04-1212-67/+138
| | | | | | | | | | | | See build/soong/README.md for more information about Soong. Removes BOARD_GPU_DRIVERS, which wasn't affecting anything, since none of the HAVE_* macros are defined. Even if they were, we'd prefer to compile all of them so that a single library can support multiple boards. Test: mmma external/libdrm Change-Id: Ie01736bce6cf41e3da5040fe5341ade0634b5111
* tests: Only copy con->modes[0] if it existsMichel Dänzer2020-02-271-1/+3
| | | | | | | con->modes can be NULL. Fixes crash in that case. Closes: https://gitlab.freedesktop.org/mesa/drm/issues/34 Reviewed-by: Daniel Stone <daniels@collabora.com>
* tests: drop redundant and slow `random` testEric Engestrom2020-02-152-129/+0
| | | | | | | | | | | | | | | | | | | | Suggested by Emil [1]: > Feel free to drop the random test altogether. It's an old public API > no active users (pretty ancient code uses it) and the in-tree users > drmSL and drmHash already have respective tests. This test takes minutes to run, while all the other tests combined take barely more than a second. Dropping it also helps the CI by avoiding random timeouts when `random` takes more than the 4 minutes (!) we've allowed for it. [1] https://gitlab.freedesktop.org/mesa/drm/merge_requests/26#note_390066 Suggested-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* meson: always define whether headers existEric Engestrom2020-01-236-6/+6
| | | | | | | | Combined with -Wundef (added in 75758d2ccf & enforced in ba17673eed), this provides absolute safety against #ifdef typos. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* modetest: Fix segmentation faultEzequiel Garcia2020-01-211-0/+2
| | | | | | | | When a mode is set with just a connector "-s foo", we get a nasty segmentation fault. Fix it. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* libdrm: modetest: Allow selecting modes by indexJohn Stultz2020-01-211-6/+17
| | | | | | | | | | | | | | | | | Often there are many similar modes, which cannot be selected via modetest due to its simple string matching. This change adds a mode index in the display output, which can then be used to specify a specific modeline to be set. Cc: Ilia Mirkin <imirkin@alum.mit.edu> Cc: Rob Clark <robdclark@chromium.org> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Sumit Semwal <sumit.semwal@linaro.org> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: John Stultz <john.stultz@linaro.org> [emil: rebase] Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
* tests/amdgpu: Fix buffer overflow (v3)Luben Tuikov2020-01-081-15/+31
| | | | | | | | | | This patch fixes the following warning: -Wformat-overflow= v2: Use the correct strlcat(3). v3: Use strncat(3) and remove libbsd dependency. Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
* tests/amdgpu: Fix unused function warning (v2)Luben Tuikov2020-01-081-2/+0
| | | | | | | | | This patch fixes: -Wunused-function v2: Always enable amdgpu_ras_test(). Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
* tests/amdgpu: Fix various warnings (v2)Luben Tuikov2020-01-084-129/+118
| | | | | | | | | | | | | | | | | | This patch fixes the following warnings: -Wformat= -Wmaybe-uninitialized -Wmisleading-indentation -Wstringop-truncation -Wunused-function -Wunused-variable It also removes forward declarations and moves global functions to the bottom, keeping locals at the top, in ras_tests.c. v2: Fix compilation. Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
* Revert "tests/amdgpu: Fix various warnings"Marek Olšák2020-01-074-117/+129
| | | | This reverts commit fb1634583f3ba22c67cad0df7022b6ac48a40c56.
* Revert "tests/amdgpu: Fix unused function warning (v2)"Marek Olšák2020-01-071-0/+2
| | | | This reverts commit 4ff499cd85f86a7b5b28f3449de2fbad1b91c795.
* Revert "tests/amdgpu: Fix buffer overflow (v3)"Marek Olšák2020-01-071-31/+15
| | | | This reverts commit 680542ce086f5d0ba70331f8d350edfae20c534f.
* tests/amdgpu: Proper format for "-l"Luben Tuikov2020-01-071-16/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Proper format for command line option "-l", listing the supported and unsupported tests: 1) Add an aligned column header. 2) Align all fields into columns. 3) Fixed length fields, come before the last column, which is a variable length field. 4) Variable length field, which is the name of the test, goes in the last column. 5) If a suite is disabled, do not iterate over its tests, as they'd naturally be all disabled. Now the output looks like this: $sudo ./amdgpu_test -l What: ID: Status: Name Suite: 1: ENABLED: Basic Tests Test: 1: ENABLED: Query Info Test Test: 2: ENABLED: Userptr Test Test: 3: DISABLED: bo eviction Test Test: 4: ENABLED: Command submission Test (GFX) Test: 5: ENABLED: Command submission Test (Compute) Test: 6: ENABLED: Command submission Test (Multi-Fence) Test: 7: ENABLED: Command submission Test (SDMA) Test: 8: ENABLED: SW semaphore Test Test: 9: DISABLED: Sync dependency Test Test: 10: DISABLED: Dispatch Test (Compute) Test: 11: DISABLED: Dispatch Test (GFX) Test: 12: DISABLED: Draw Test Test: 13: DISABLED: GPU reset Test Suite: 2: ENABLED: BO Tests Test: 1: ENABLED: Export/Import Test: 2: DISABLED: Metadata Test: 3: ENABLED: CPU map/unmap Test: 4: ENABLED: Memory alloc Test Test: 5: ENABLED: Memory fail alloc Test Test: 6: ENABLED: Find bo by CPU mapping Suite: 3: DISABLED: CS Tests Suite: 4: DISABLED: VCE Tests Suite: 5: ENABLED: VCN Tests Test: 1: ENABLED: VCN DEC create Test: 2: ENABLED: VCN DEC decode Test: 3: ENABLED: VCN DEC destroy Test: 4: ENABLED: VCN ENC create Test: 5: ENABLED: VCN ENC decode Test: 6: ENABLED: VCN ENC destroy Suite: 6: DISABLED: UVD ENC Tests Suite: 7: DISABLED: Deadlock Tests Suite: 8: ENABLED: VM Tests Test: 1: ENABLED: resere vmid test Test: 2: ENABLED: unaligned map Test: 3: ENABLED: vm mapping test Suite: 9: DISABLED: RAS Tests Suite: 10: ENABLED: SYNCOBJ TIMELINE Tests Test: 1: ENABLED: syncobj timeline test $_ Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
* tests/amdgpu: Fix buffer overflow (v3)Luben Tuikov2020-01-071-15/+31
| | | | | | | | | | This patch fixes the following warning: -Wformat-overflow= v2: Use the correct strlcat(3). v3: Use strncat(3) and remove libbsd dependency. Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
* tests/amdgpu: Fix unused function warning (v2)Luben Tuikov2020-01-071-2/+0
| | | | | | | | | This patch fixes: -Wunused-function v2: Always enable amdgpu_ras_test(). Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
* tests/amdgpu: Fix various warningsLuben Tuikov2020-01-074-129/+117
| | | | | | | | | | | | | | | | This patch fixes the following warnings: -Wformat= -Wmaybe-uninitialized -Wmisleading-indentation -Wstringop-truncation -Wunused-function -Wunused-variable It also removes forward declarations and moves global functions to the bottom, keeping locals at the top, in ras_tests.c. Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
* tests/amdgpu: fix a amdgpu_test hang issue on some platforms.Yifan Zhang2019-12-301-1/+1
| | | | | | | | | The computer ring test name mis-match in different files, thus may be set with TRUE on wrong platforms. Change-Id: I0b918ff8faf08c9c9f1ad55f4dcd18f66b956901 Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
* modetest: Use floating vrefresh while dumping modeDevarsh Thakkar2019-12-111-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add function to derive floating value of vertical refresh rate from drm mode using pixel clock, horizontal total size and vertical total size. Use this function to find suitable mode having vrefresh value which is matching with user provided vrefresh value. If user doesn't provide any vrefresh value in args then update vertical refresh rate value in pipe args using this function. Also use this function for printing floating vrefresh while dumping all available modes. This will give more accurate picture to user for available modes differentiated by floating vertical refresh rate and help user select more appropriate mode using suitable refresh rate value. V4: 1) While setting mode, print mode name and vrefresh using struct drmModeModeInfo instead of struct pipe_args. 2) Revert back to using a float value instead of float * for vrefresh arg in connector_find_mode(). V3: 1) Change name of function used to derive refresh rate. V2: 1) Don't use inline function for deriving refresh rate from mode. 2) If requested mode not found, print refresh rate only if user had provided it in args. Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
* tests/amdgpu: add gfx ring bad slow draw testFlora Cui2019-12-094-14/+251
| | | | | | | for gfx9 Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tests/amdgpu: add gfx ring draw hang testFlora Cui2019-12-094-14/+55
| | | | | | | for gfx9 Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tests/amdgpu: add bad slow dispatch testFlora Cui2019-12-094-1/+260
| | | | | | | add gfx/compute bad slow dispatch test for gfx9 Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tests/amdgpu: add dispatch hang testFlora Cui2019-12-094-13/+81
| | | | | | | add compute/gfx dispatch hang test for gfx9 Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tests/amdgpu: update draw test for gfx9Flora Cui2019-12-091-1/+1
| | | | | Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* tests/amdgpu: enable dispatch/draw tests for Renoirchangzhu2019-12-091-1/+1
| | | | | | | | | | | It can run dispatch/draw tests on new renoir chips. So it needs to enable dispatch/draw tests for Renoir again. Change-Id: I3a72a4bbfe0fc663ee0e3e58d8e9c304f513e568 Signed-off-by: changzhu <Changfeng.Zhu@amd.com> Reviewed-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com>
* tests/nouveau/threaded: adapt ioctl signatureRoss Burton2019-11-281-0/+4
| | | | | | | | | | | | | POSIX says ioctl() has the signature (int, int, ...) but glibc has decided to use (int, unsigned long int, ...) instead. Use a #ifdef to adapt the replacement function as appropriate. Signed-off-by: Ross Burton <ross.burton@intel.com> [Taken from https://raw.githubusercontent.com/openembedded/openembedded-core/master/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch] Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
* tests/amdgpu/basic_tests.c: change BUFFER_SIZE used in Userptr Test adjust ↵xinxu@loongson.cn2019-11-251-1/+1
| | | | | | | | | | to PAGE_SIZE Userptr Test will fail on PAGE_SIZE bigger than BUFFER_SIZE(8 * 1024) Signed-off-by: xinxu <xinxu@loongson.cn> (cherry picked from commit fb7dfdc5fb58795365b70117c3eb625f2edb8f06)
* modetest: Add support for setting mode having floating vertical refresh rateDevarsh Thakkar2019-11-251-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the scenario where user may require to modeset with a mode supporting a fractional value for vertical refresh-rate, appropriate mode can be selected by searching for mode having matching fractional vertical refresh rate using below equation. vrefresh = (1000 * pixel clock) / (htotal * vtotal) Hz. We do this way since driver doesn't return float value of vrefresh as it use int for vrefresh in struct drm_mode_info, but we can derive the actual value using pixel clock, horizontal total size and vertical total size values. So for e.g. if user want to select mode having 59.94 Hz as refresh rate then with this patch it be can done as shown in below command, given there is an appropriate mode is available : modetest -M xlnx -s 39:1920x1080-59.94@BG24 -v NOTE: Above command was tested on xilinx DRM driver with DP monitor which was supporting mode having 59.94 Hz refresh rate. V2: Update commit message V3: Update with below changes as per review comments : 1) Use epsilon for vrefresh comparison 2) Use implicit type-casting wherever possible V4: Keep patch version history on main commit message Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
* Revert "Revert "libdrm: remove autotools support""Eric Engestrom2019-10-1814-392/+0
| | | | | The external tooling issue has been fixed, so we can delete autotools again :)
* Revert "libdrm: remove autotools support"Marek Olšák2019-10-1614-0/+392
| | | | This reverts commit f057dc91e93ae21e11ab48a26127d569972f3eae.
* test/amdgpu: don't free unused bo handleNirmoy Das2019-10-151-2/+1
| | | | | Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
* libdrm: remove autotools supportEric Engestrom2019-10-1414-392/+0
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
* tests/amdgpu: add the missing deactivation case for dispatch testLe Ma2019-09-181-2/+5
| | | | | | Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: add ras feature capability check in inject testGuchun Chen2019-09-161-0/+4
| | | | | | | | | | When running ras inject test, it's needed to be aligned with kernel's ras enablement. Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: add ras inject unit testGuchun Chen2019-09-161-37/+107
| | | | | | | | | | Both UMC and GFX ras single_correctable inject tests are added. Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: remove json package dependenceGuchun Chen2019-09-163-177/+9
| | | | | | | | | | | | Except CUnit library, no additional external library should be needed when compiling amdgpu_test. This will keep this binary self containing. Suggested-by: Christian König <christian.koenig@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu/ras: refine ras inject testGuchun Chen2019-08-083-51/+497
| | | | | | | | | | | | Ras inject test framework is invalid with original codes, so refine it to make it work on top of kernel ras inject feature enablement. Signed-off-by: Dennis Li <dennis.li@amd.com> Signed-off-by: Guchun Chen <guchun.chen@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: divide dispatch test into compute and gfxLe Ma2019-08-021-4/+15
| | | | | | | | | | for better clarification v2: accordingly change dispatch_test caller in gpu_reset test Signed-off-by: Le Ma <le.ma@amd.com> Reviewed-by: Flora Cui <flora.cui@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: disable reset test for nowFlora Cui2019-08-021-1/+1
| | | | | | | | ASIC hang randomly. Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* tests/amdgpu: add gpu reset testFlora Cui2019-07-192-0/+46
| | | | | | | | 1. perform gpu reset 2. perform dispatch test to verify gpu reset to a good state Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
* tests/amdgpu: fix for dispatch/draw testFlora Cui2019-07-191-8/+28
| | | | | | | | | | 1. skip test if there's no desired ring 2. clear shader buffer 3. update command buffer for gfx9 Signed-off-by: Flora Cui <flora.cui@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
* tests/util: fix incorrect memset argument orderIlia Mirkin2019-07-031-1/+1
| | | | | | | | Make it actually clear the LUT. Reported-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Dave Airlie <airlied@redhat.com>
* util: fix include path for drm_mode.hIlia Mirkin2019-06-221-1/+1
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
* modetest: add FP16 format supportIlia Mirkin2019-06-221-0/+11
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* modetest: add the ability to specify fill patterns on the commandlineIlia Mirkin2019-06-223-5/+46
| | | | | | | Instead of hacking the binary every time, we can now specify directly. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* modetest: add C8 support to generate SMPTE patternIlia Mirkin2019-06-222-5/+44
| | | | | | | This includes logic to configure the LUT accordingly. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* modetest: add an add_property_optional variant that does not print errorsIlia Mirkin2019-06-221-6/+23
| | | | | | | | | | | | As new features are added and others are declared to be legacy, it's nice to be able to implement fallbacks. As such, create a property-setting variant that does not generate errors which can very well be entirely expected. Will be used for gamma control in a future change. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* modetest: don't pretend that atomic mode includes a formatIlia Mirkin2019-06-221-2/+2
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* util: add cairo drawing for 30bpp formats when availableIlia Mirkin2019-06-221-0/+8
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* util: add fp16 format supportIlia Mirkin2019-06-222-3/+209
| | | | | | | This change adds support for all current patterns. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>