summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-09-08modetest: custom mode supportDmitry Baryshkov2-1/+22
It is useful to be able to specify mode parameters manually. Add support for setting user-supplied modes. This patch is based on the original idea by Rohit and Jessica, but implemented from scratch. Suggested-by: Rohith Iyer <quic_rohiiyer@quicinc.com> Suggested-by: Jessica Zhang <quic_jesszhan@quicinc.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-09-08util: remove unused definitions of RED, GREEN, and BLUEGeert Uytterhoeven1-5/+0
These are unused since commit edcef53685edf5fb ("modetest: Add test pattern support for missing RGB formats"). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- v2: - Add Reviewed-by.
2023-09-08modetest: fix mode_vrefresh() for interlace/dblscan/vscanGeert Uytterhoeven1-2/+13
mode_vrefresh() does not take into account interlaced, doublescan, and multiscan modes, leading to incorrect refresh rates. Fix this, based on drm_mode_vrefresh() in Linux. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2023-09-08util: fix grey in YUV SMPTE patternsGeert Uytterhoeven1-2/+2
The YUV SMPTE patterns use RGB 191/192/192 instead of 192/192/192 for the grey color in the top color bar. Change it to 192/192/192, to match the RGB SMPTE patterns. Fixes: a94ee624292bff96 ("modetest: Add SMPTE test pattern") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- v2: - Add Reviewed-by.
2023-09-08modetest: add support for DRM_FORMAT_NV{24,42}Geert Uytterhoeven1-0/+20
Add support for creating buffers using semi-planar YUV formats with non-subsampled chroma planes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- v2: - Add Reviewed-by.
2023-09-08util: add pattern support for DRM_FORMAT_NV{24,42}Geert Uytterhoeven1-0/+4
Add support for drawing the SMPTE and tiles patterns in buffers using semi-planar YUV formats with non-subsampled chroma planes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- v2: - Add Reviewed-by.
2023-09-08util: add NV24 and NV42 frame buffer formatsGeert Uytterhoeven1-0/+2
Add the missing entries for semi-planar YUV formats with non-subsampled chroma planes. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> --- v2: - Add Reviewed-by.
2023-09-08modetest: add support for writeback connectorRohith Iyer3-3/+146
Add writeback support to modetest with the below options: - Passing in -a -c will now also show the writeback connector - Dump the writeback output buffer to bitstream Usage: "./modetest -M msm -s <connector_id>:<widthxheight> -a -o <filepath> -P <plane_id>@<crtc_id>:<widthxheight>+0+0@RG24" This currently supports single writeback connector. Co-developed-by: Rohith Iyer <quic_rohiiyer@quicinc.com> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> [DB: dropped custom mode support, fixed segfault] Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-09-07amdgpu: add marketing names from Adrenalin 23.9.1Jonathan Gray1-0/+2
2023-09-05amdgpu: add marketing names from Adrenalin 23.7.2Jonathan Gray1-0/+1
2023-09-05amdgpu: add marketing names from PRO Edition 23.Q3 W7000Jonathan Gray1-0/+2
2023-09-05amdgpu: add marketing names from amd-5.5.1 (23.10.1)Jonathan Gray1-0/+2
2023-09-05amdgpu: add marketing names from amd-5.4.6 (22.40.6)Jonathan Gray1-0/+1
2023-09-04amdgpu: Use PRI?64 to format uint64_tGeert Uytterhoeven1-4/+5
On 32-bit: ../tests/amdgpu/amdgpu_stress.c: In function ‘alloc_bo’: ../tests/amdgpu/amdgpu_stress.c:178:49: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] fprintf(stdout, "Allocated BO number %u at 0x%lx, domain 0x%x, size %lu\n", ~~^ %llx num_buffers++, addr, domain, size); ~~~~ ../tests/amdgpu/amdgpu_stress.c:178:72: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] fprintf(stdout, "Allocated BO number %u at 0x%lx, domain 0x%x, size %lu\n", ~~^ %llu num_buffers++, addr, domain, size); ~~~~ ../tests/amdgpu/amdgpu_stress.c: In function ‘submit_ib’: ../tests/amdgpu/amdgpu_stress.c:276:54: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] fprintf(stdout, "Submitted %u IBs to copy from %u(%lx) to %u(%lx) %lu bytes took %lu usec\n", ~~^ %llx count, from, virtual[from], to, virtual[to], copied, delta / 1000); ~~~~~~~~~~~~~ ../tests/amdgpu/amdgpu_stress.c:276:65: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] fprintf(stdout, "Submitted %u IBs to copy from %u(%lx) to %u(%lx) %lu bytes took %lu usec\n", ~~^ %llx count, from, virtual[from], to, virtual[to], copied, delta / 1000); ~~~~~~~~~~~ ../tests/amdgpu/amdgpu_stress.c:276:70: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] fprintf(stdout, "Submitted %u IBs to copy from %u(%lx) to %u(%lx) %lu bytes took %lu usec\n", ~~^ %llu count, from, virtual[from], to, virtual[to], copied, delta / 1000); ~~~~~~ ../tests/amdgpu/amdgpu_stress.c:276:85: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] fprintf(stdout, "Submitted %u IBs to copy from %u(%lx) to %u(%lx) %lu bytes took %lu usec\n", ~~^ %llu count, from, virtual[from], to, virtual[to], copied, delta / 1000); ~~~~~~~~~~~~ ../tests/amdgpu/amdgpu_stress.c: In function ‘parse_size’: ../tests/amdgpu/amdgpu_stress.c:296:24: warning: format ‘%li’ expects argument of type ‘long int *’, but argument 3 has type ‘uint64_t *’ {aka ‘long long unsigned int *’} [-Wformat=] if (sscanf(optarg, "%li%1[kmgKMG]", &size, ext) < 1) { ~~^ ~~~~~ %lli ../tests/amdgpu/amdgpu_stress.c: In function ‘main’: ../tests/amdgpu/amdgpu_stress.c:378:45: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Wformat=] fprintf(stderr, "Buffer size to small %lu\n", size); ~~^ ~~~~ %llu Fix this by using the proper "PRI?64" format specifiers. Fixes: d77ccdf3ba6f5a39 ("amdgpu: add amdgpu_stress utility v2") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Marek Olšák <marek.olsak@amd.com> --- On Linux/amd64, the format strings in the resulting binary are unchanged. v3: - Add Reviewed-by, v2: - Use PRI?64 to unbreak 64-bit build.
2023-09-04amdgpu: Fix pointer/integer mismatch warningGeert Uytterhoeven1-1/+1
On 32-bit: ../amdgpu/amdgpu_bo.c: In function ‘amdgpu_find_bo_by_cpu_mapping’: ../amdgpu/amdgpu_bo.c:554:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] cpu < (void*)((uintptr_t)bo->cpu_ptr + bo->alloc_size)) ^ Indeed, as amdgpu_bo_info.alloc_size is "uint64_t", the sum is always 64-bit, while "void *" can be 32-bit or 64-bit. Fix this by casting bo->alloc_size to "size_t", which is either 32-bit or 64-bit, just like "void *". Fixes: c6493f360e7529c2 ("amdgpu: Eliminate void* arithmetic in amdgpu_find_bo_by_cpu_mapping") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Marek Olšák <marek.olsak@amd.com> --- v2: - Add Reviewed-by.
2023-08-23build: bump version to 2.4.116libdrm-2.4.116Simon Ser1-1/+1
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-08-17nouveau: add interface to make buffer objects globalDor Askayo3-3/+13
This is useful for when GEM handles are exported and may be shared between multiple buffer objects without going through other libdrm interfaces. Signed-off-by: Dor Askayo <dor.askayo@gmail.com> Reviewed-by: Karol Herbst <git@karolherbst.de>
2023-08-16xf86drm: use drm device name to identify drm node typeJames Zhu1-10/+12
Currently drm node's minor range is used to identify node's type. Since kernel drm uses node type name and minor to generate drm device name, It will be more general to use drm device name to identify drm node type. Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Simon Ser <contact@emersion.fr>
2023-08-16xf86drm: update DRM_NODE_NAME_MAX supporting more nodesJames Zhu1-1/+1
Current DRM_NODE_NAME_MAX only can support up to 999 nodes, Update to support up to 2^MINORBITS nodes. Signed-off-by: James Zhu <James.Zhu@amd.com> Reviewed-by: Simon Ser <contact@emersion.fr>
2023-07-27xf86drm: add drmSyncobjEventfdSimon Ser3-0/+17
This is a wrapper for DRM_IOCTL_SYNCOBJ_EVENTFD. Signed-off-by: Simon Ser <contact@emersion.fr>
2023-07-27Sync headers with drm-nextSimon Ser3-37/+382
Synchronize drm.h, drm_mode.h and drm_fourcc.h to drm-next. Generated using make headers_install. Generated from drm-next branch commit 52920704df878050123dfeb469aa6ab8022547c1 Signed-off-by: Simon Ser <contact@emersion.fr>
2023-07-26xf86drm: drop control nodes implementationSimon Ser2-25/+9
Drop support for control nodes. The kernel never returns such nodes. Stop trying to detect and handle them, and always return an error when a caller tries to open them. The header is left untouched to avoid breaking libdrm's API. Signed-off-by: Simon Ser <contact@emersion.fr>
2023-07-26xf86drm: bump DRM_MAX_MINOR to 64Simon Ser1-1/+1
This is what the kernel uses (see drm_minor_alloc). Signed-off-by: Simon Ser <contact@emersion.fr>
2023-07-20xf86drmMode: constify drmModeCrtcSetGammaXaver Hugl2-3/+3
The data is never modified, so it should be const Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
2023-07-17tests/amdgpu/vcn: fix session buffer issue for vcn1-vcn3Ruijing Dong1-13/+5
issue: in vcn1-vcn3, session buffer was not truly added, it shows decoding creation commands cannot be sent multiple times. problem: session buffer has to be the first buffer sending out. Otherwise, system could assume session buffer doesn't exist. solution: move session buffer sending sequence to be the first one. Reviewed-by: Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com> Signed-off-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
2023-07-06tests/amdgpu/vcn:update decoder unit testSaleemkhan Jamadar1-5/+21
update decoder unit test with session context buffer for VCN v1 to v4 v2: remove multiple checks for vcn4 (Ruijing Dong) Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
2023-05-11amdgpu: add an environment variable that overrides the context priorityMarek Olšák1-0/+12
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
2023-05-11tests/amdgpu/vcn: fix drm test failureRuijing Dong1-19/+28
1. fixed an issue that drm test vcn3/4 encoding test could cause VCN engine stuck. 2. adding missing or errous encoding ib package members. Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
2023-05-11tests/amdgpu/vcn: change vbv_buffer name to inputRuijing Dong1-11/+11
It is input buffer instead of vbv_buffer. Correct its name. Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
2023-03-24tests/amdgpu: Allow to exclude a test or a suite of testsLuben Tuikov1-35/+152
Add the command line argument -e s[.t] to exclude (disable) suite s, or to exclude suite s test t. This is useful for instance to run the Basic Suite, but disable the GPU reset test, on the command line, like this: amdgpu_tests -s 1 -e 1.13 This option can be specified more than once on the command line, in order to exclude more than one suite and/or suite and test combination from being run. Cc: Alex Deucher <Alexander.Deucher@amd.com> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
2023-03-24tests/amdgpu: Add all 9 options to the help outputLuben Tuikov1-8/+10
Add -s and -t to the help output, as well as sort the options output alphabetically. v1: Fix a spelling in the subject of this commit. Cc: Alex Deucher <Alexander.Deucher@amd.com> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
2023-03-24tests/amdgpu: Fix Usage stringLuben Tuikov1-2/+2
Fix the Usage: string on -h (help) in amdgpu_tests.c, so brackets match, and remove mismatched angle brackets. Cc: Alex Deucher <Alexander.Deucher@amd.com> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
2023-03-24amdgpu: add marketing names from amd-5.4.3 (22.40.3)Jonathan Gray1-0/+4
2023-03-24amdgpu: remove va::dev memberPierre-Eric Pelloux-Prayer2-2/+0
This is unused so drop it. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2023-03-17test/amdgpu/hotunplug: add apu check for hotplug testjie zhang1-0/+4
For apu, it is integrated with cpu. So hotplug test should be unnecessary for it. Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Reviewed-by: Flora Cui <flora.cui@amd.com>
2023-02-10meson: drop pthread-stubs dependency on BSDsJan Beich10-14/+9
pthread-stubs >= 0.4 simply passes -pthread which is similar to what dependency('threads') returns. And make it a private dependency for subprojects even on Linux. Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
2023-02-10tests/util: Add vkms driverYi Xie1-0/+1
Add an entry for the "vkms" driver, so that the test utilities work with the vkms driver without passing the -M argument. Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Yi Xie <yixie@google.com>
2023-02-09build: bump version to 2.4.115libdrm-2.4.115Simon Ser1-1/+1
Signed-off-by: Simon Ser <contact@emersion.fr>
2023-02-09xf86drm: add support for printing AMD GFX11 modifiersSimon Ser1-0/+6
See kernel commit 543036a2de71 ("drm/amd: Add GFX11 modifiers support to AMDGPU (v3)"). Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2023-01-03amdgpu: add some additional marketing namesAlex Deucher1-0/+3
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2023-01-03amdgpu: add marketing names from amd-5.4 (22.40)Alex Deucher1-0/+6
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-12-21xf86drm: fix warning in drmGetFormatModifierNameFromVivante()Simon Ser1-1/+1
Fixes the following warning: ../xf86drm.c: In function ‘drmGetFormatModifierNameFromVivante’: ../xf86drm.c:614:14: warning: passing argument 1 of ‘asprintf’ from incompatible pointer type [-Wincompatible-pointer-types] 614 | asprintf(&mod_vivante, "%s%s%s", color_tiling, tile_status, compression); | ^~~~~~~~~~~~ | | | const char ** In file included from ../xf86drm.c:34: /usr/include/stdio.h:396:40: note: expected ‘char ** restrict’ but argument is of type ‘const char **’ 396 | extern int asprintf (char **__restrict __ptr, | ~~~~~~~~~~~~~~~~~~^~~~~ ../xf86drm.c:615:12: warning: return discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 615 | return mod_vivante; | ^~~~~~~~~~~ Signed-off-by: Simon Ser <contact@emersion.fr>
2022-11-30xf86drm: Add support for decoding Vivante format modifiersPhilipp Zabel1-0/+68
Allow applications to pretty-print Vivante format modifiers. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2022-11-30drm_fourcc: sync drm_fourcc with latest drm-next kernelPhilipp Zabel1-4/+59
Update drm_fourcc.h to include latest changes from drm-next branch. This brings in sub-8bpp formats, AVUY and XVUY 8:8:8:8, and Vivante tile-status and compression modifiers. Generated using make headers_install. Generated from drm-next branch commit 077bd80083ab Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2022-11-22intel: Eliminate need to keep adding PCI IDsMatt Roper7-876/+9
The Intel-specific code in libdrm is continually updated with new PCI IDs for each new platform so that we can recognize the IP version properly. However this is mostly a pointless exercise; none of the Intel code in libdrm is conditional on IP versions above 8. If we just treat any future unrecognized Intel platforms as IP version 8, we should get the same behavior without the need for continued PCI ID updates. Note that the intel_decode tool probably _should_ have conditions on newer IP versions, but it was last updated for gen8 and has been bitrotting from gen9 onward. This change won't make the tool behave any more incorrectly than it already does today. Cc: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2022-11-11tests/amdgpu/jpeg: enable unit test for jpeg 4Saleemkhan Jamadar1-1/+1
Enable decode unit test for jpeg4. Signed-off-by: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com> Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
2022-11-09tests/amdgpu: use AMDGPU_TIMEOUT_INFINITE to query fenceLang Yu1-2/+2
We need to wait longer when running on emulator. Signed-off-by: Lang Yu <Lang.Yu@amd.com>
2022-11-03build: bump version to 2.4.114libdrm-2.4.114Simon Ser1-1/+1
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-11-02modetest: use dumb buffer helpersSimon Ser1-21/+7
Signed-off-by: Simon Ser <contact@emersion.fr>
2022-11-02modetest: use sized integers in struct boSimon Ser1-3/+3
Use the same size types as the kernel. Signed-off-by: Simon Ser <contact@emersion.fr>