summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* amdgpu: add an environment variable that overrides the context priorityHEADmainMarek Olšák2023-05-111-0/+12
| | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
* tests/amdgpu/vcn: fix drm test failureRuijing Dong2023-05-111-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>
* tests/amdgpu/vcn: change vbv_buffer name to inputRuijing Dong2023-05-111-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>
* tests/amdgpu: Allow to exclude a test or a suite of testsLuben Tuikov2023-03-241-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>
* tests/amdgpu: Add all 9 options to the help outputLuben Tuikov2023-03-241-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>
* tests/amdgpu: Fix Usage stringLuben Tuikov2023-03-241-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>
* amdgpu: add marketing names from amd-5.4.3 (22.40.3)Jonathan Gray2023-03-241-0/+4
|
* amdgpu: remove va::dev memberPierre-Eric Pelloux-Prayer2023-03-242-2/+0
| | | | | | This is unused so drop it. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* test/amdgpu/hotunplug: add apu check for hotplug testjie zhang2023-03-171-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>
* meson: drop pthread-stubs dependency on BSDsJan Beich2023-02-1010-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>
* tests/util: Add vkms driverYi Xie2023-02-101-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>
* build: bump version to 2.4.115libdrm-2.4.115Simon Ser2023-02-091-1/+1
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* xf86drm: add support for printing AMD GFX11 modifiersSimon Ser2023-02-091-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>
* amdgpu: add some additional marketing namesAlex Deucher2023-01-031-0/+3
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: add marketing names from amd-5.4 (22.40)Alex Deucher2023-01-031-0/+6
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* xf86drm: fix warning in drmGetFormatModifierNameFromVivante()Simon Ser2022-12-211-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>
* xf86drm: Add support for decoding Vivante format modifiersPhilipp Zabel2022-11-301-0/+68
| | | | | | Allow applications to pretty-print Vivante format modifiers. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
* drm_fourcc: sync drm_fourcc with latest drm-next kernelPhilipp Zabel2022-11-301-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>
* intel: Eliminate need to keep adding PCI IDsMatt Roper2022-11-227-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>
* tests/amdgpu/jpeg: enable unit test for jpeg 4Saleemkhan Jamadar2022-11-111-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>
* tests/amdgpu: use AMDGPU_TIMEOUT_INFINITE to query fenceLang Yu2022-11-091-2/+2
| | | | | | We need to wait longer when running on emulator. Signed-off-by: Lang Yu <Lang.Yu@amd.com>
* build: bump version to 2.4.114libdrm-2.4.114Simon Ser2022-11-031-1/+1
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* modetest: use dumb buffer helpersSimon Ser2022-11-021-21/+7
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* modetest: use sized integers in struct boSimon Ser2022-11-021-3/+3
| | | | | | Use the same size types as the kernel. Signed-off-by: Simon Ser <contact@emersion.fr>
* modetest: drop unused offset field in struct boSimon Ser2022-11-021-1/+0
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* xf86drmMode: add helpers for dumb buffersSimon Ser2022-10-273-0/+84
| | | | | | | | | | | Up until now, DRM clients had to hand-roll their code to create, destroy and map dumb buffers. This is slightly inconvenient, a bit error-prone, and not easily discoverable. Introduce wrappers for these operations, just like we have for other KMS IOCTLs. Signed-off-by: Simon Ser <contact@emersion.fr>
* amdgpu: silence uninitialized variable warningSimon Ser2022-10-231-1/+1
| | | | | | | | | | | | | | | | | | The compiler isn't smart enough to tell that this can't happen: [30/74] Compiling C object amdgpu/libdrm_amdgpu.so.1.0.0.p/amdgpu_bo.c.o In file included from ../amdgpu/amdgpu_internal.h:32, from ../amdgpu/amdgpu_bo.c:39: ../xf86atomic.h: In function ‘amdgpu_find_bo_by_cpu_mapping’: ../xf86atomic.h:47:54: warning: ‘bo’ may be used uninitialized [-Wmaybe-uninitialized] 47 | # define atomic_inc(x) ((void) __sync_fetch_and_add (&(x)->atomic, 1)) | ^ ../amdgpu/amdgpu_bo.c:536:27: note: ‘bo’ was declared here 536 | struct amdgpu_bo *bo; | ^~ Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu: Add a default marketing name if none is foundAlex Deucher2022-10-171-1/+4
| | | | | | | | Apparently quite a few apps use this API to get the GPU name and end up with NULL as the GPU name. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu_ids: add MI marketing namesAlex Deucher2022-10-171-0/+5
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu.ids: update to the latest marketing nameAlex Deucher2022-10-171-30/+193
| | | | | Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu.ids: sort the fileAlex Deucher2022-10-171-66/+66
| | | | | | | So the list is in numeric order. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* amdgpu.ids: use consistent formatting for RIDAlex Deucher2022-10-171-67/+67
| | | | | | | Use two digits for the revision id. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* xf86drm: handle DRM_FORMAT_BIG_ENDIAN in drmGetFormatName()Simon Ser2022-10-171-12/+17
| | | | | | | This bit can be added to a DRM format to indicate that it's big endian instead of little endian. Signed-off-by: Simon Ser <contact@emersion.fr>
* tests/util: add imx-lcdif driverMarco Felsch2022-10-061-0/+1
| | | | | | | | This makes the test utilities work with the i.MX LCDIFv3 driver without the necessity of using the -M argument. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
* build: automatically disable Intel if pciaccess is not foundSimon Ser2022-10-031-2/+3
| | | | | | | | | | Wire up the pciaccess dep to the intel option. This automatically skips the dep if intel is explicitly disabled, fails if intel is explicitly enabled and it's not found, and disables intel if it's set to auto and the dep is not found. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* intel: move declarations to top in drm_intel_gem_bo_unreference()Simon Ser2022-10-031-6/+6
| | | | | | | | | | | | | Fixes the following warning: [65/74] Compiling C object intel/libdrm_intel.so.1.0.0.p/intel_bufmgr_gem.c.o ../intel/intel_bufmgr_gem.c: In function ‘drm_intel_gem_bo_unreference’: ../intel/intel_bufmgr_gem.c:1388:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 1388 | drm_intel_bufmgr_gem *bufmgr_gem = | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
* include/drm/i915_drm.h: Update from Linux v6.0-rc7Jordan Justen2022-09-281-130/+1939
| | | | | | | Generated from the Linux v6.0-rc7 tag with a sha1 of f76349cf41451c5c42a99f18a9163377e4b364ff. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* include/drm/drm_fourcc.h: Update from Linux v6.0-rc7Jordan Justen2022-09-281-3/+97
| | | | | | | Generated from the Linux v6.0-rc7 tag with a sha1 of f76349cf41451c5c42a99f18a9163377e4b364ff. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* meson: fast-fail on unsupported OSesEli Schwartz2022-09-111-0/+4
| | | | | | | | | | | It's not worth even attempting to configure anything on OSes where there is no DRM to have a userspace library for. This failure message can be useful in e.g. the case where libdrm is an optional wrap fallback in another project. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
* build: bump to version 2.4.113libdrm-2.4.113Simon Ser2022-08-311-1/+1
| | | | Signed-off-by: Simon Ser <contact@emersion.fr>
* tests/modetest: use drmGetFormatName()Simon Ser2022-08-311-5/+3
| | | | | | Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Marius Vlad <marius.vlad@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com>
* xf86drm: add drmGetFormatName()Simon Ser2022-08-313-0/+39
| | | | | | | | Same as drmGetFormatModifierName() but for formats. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Marius Vlad <marius.vlad@collabora.com> Reviewed-by: Eric Engestrom <eric@igalia.com>
* intel: Hook up new platforms IDsMatt Roper2022-08-301-0/+3
| | | | | | | | | | | In commit 98794e2a0d ("lib: sync i915_pciids.h with kernel") we resynchronized the PCI header with the kernel to bring in the definitions for several new platforms. But before those IDs will be recognized, we still need to hook them up in the libdrm chipset code as well. References: https://gitlab.freedesktop.org/drm/intel/-/issues/5416 Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
* meson: auto-enable etnaviv on arm, arc, mips and loongarch architecturesSui Jingfeng2022-08-303-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a Vivante GC1000 gpu in LS2K1000 and LS7A1000. LS7A1000 is a bridge chip made by Loongson corporation which act as north and/or south bridge of loongson's desktop and server level processor. It is equivalent to RS780E or something like that. In fact, the company use RS780E as bridge of LS3A3000 at its early stage, but as RS780E is out of stock long long time ago, the company have to made one by themself. More details can be read from its user manual[1]. This bridge chip typically use with LS3A3000, LS3A4000 and LS3A5000. LS3A3000 is 4 core 1.45gHz mips64r2 compatible cpu. LS3A4000 is 4 core 1.8gHz mips64r5 compatible cpu. LS3A5000 is 4 core 2.5gHz loongarch cpu, the company acclaim that loongarch a new archtecture with its instruction set is released[2]. LS2K1000 is a double core 1.0Ghz mips64r2 compatible SoC[3]. we need to enable it to test and developing driver on above listed archtecture. [1] https://loongson.github.io/LoongArch-Documentation/Loongson-7A1000-usermanual-EN.html [2] https://loongson.github.io/LoongArch-Documentation/Loongson-3A5000-usermanual-EN.html [3] https://wiki.debian.org/InstallingDebianOn/Lemote/Loongson2K1000 Signed-off-by: Sui Jingfeng <15330273260@189.cn> [Eric: rebase over meson changes, add ARM & ARC architectures, and drop "experimental" from the description] Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* intel: Avoid aliasing violationMatt Turner2022-08-231-2/+3
| | | | | | | | | | ../intel/test_decode.c: In function ‘compare_batch’: ../intel/test_decode.c:109:39: error: dereferencing type-punned pointer might break strict-aliasing rules [-Werror=strict-aliasing] 109 | out = open_memstream((char **)&ptr, &size); | ^~~~ cc1: some warnings being treated as errors The fix is simple: just declare `ptr` as a `char *` to begin with.
* atomic: fix atomic_add_unless() fallback's return valueEric Engestrom2022-08-232-19/+21
| | | | | | | | | | | | | According to the kernel documentation: Returns non-zero if @v was not @u, and zero otherwise. Fixes: 63fc571863aa64683400 ("atomic: add atomic_add_unless()") Closes: https://gitlab.freedesktop.org/mesa/drm/issues/17 Signed-off-by: David Shao <davshao@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> [Eric: fix its callers to maintain current behaviour] Signed-off-by: Eric Engestrom <eric@engestrom.ch>
* Remove unused 3rd parameter to open(2)Matthieu Herrb2022-08-232-6/+6
| | | | | | The 3rd parameter is only used with the O_CREAT flag Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
* meson: simplify some more build options by using featuresEric Engestrom2022-08-233-34/+14
| | | | | Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Simon Ser <contact@emersion.fr>
* meson: convert auto combos into proper featuresEric Engestrom2022-08-233-66/+36
| | | | | | | | | Allows users to easily enable everything (eg. packagers), or select just the drivers they want with something like: -D auto-features=disabled -D amdgpu=enabled Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Simon Ser <contact@emersion.fr>
* ci: drop dead script since e722ba9f67Eric Engestrom2022-08-231-71/+0
| | | | Noticed-by: Michel Daenzer <michel@daenzer.net>