summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-11-25build: bump version to 2.4.109libdrm-2.4.109Simon Ser1-1/+1
2021-11-25xf86drm: fix compiler warningsEleni Maria Stea1-10/+15
Used casting to fix warnings about assigning different enum types to variables. Used error checks in places where snprintf is called and output might be truncated to fix gcc format-truncation warnings. v2: Removed a change in drm.h (Simon Ser) v3, v4: Removed unecessary braces in snprintf (Simon Ser) Signed-off-by: Eleni Maria Stea <elene.mst@gmail.com>
2021-11-23amdgpu: Add new function to get fd.Bas Nieuwenhuizen3-0/+19
Dual purpose: - The drm fd dedupe functionality confuses the radeonsi amdgpu winsys if radeonsi isn't the first thing opening the device. By exposing the fd we can detect this case. - For a common mesa Vulkan sync objects implementation with syncobj. (notable: no buffer allocation) Both shouldn't interferece with libdrm_amdgpu functionality though it does somewhat piece the abstraction of the library. Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3424 Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5630 Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2021-11-23ci: Add FreeBSD supportEmmanuel Vadot1-0/+68
Use qemu to do CI on FreeBSD. Not everything is compiled as all arm aren't supported on FreeBSD. Same thing for Nouveau. The tests aren't enable for now as they are all failing. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
2021-11-23ci: Switch freedesktop/ci-templatesEmmanuel Vadot1-53/+136
This switch to the latest ci-templates. Most of the file is taken from the one in wayland. Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
2021-11-19xf86drm: add drmGetDeviceFromDevIdSimon Ser3-24/+43
This adds a function to get a drmDevicePtr from a dev_t identifier of a device. This is useful for Wayland that uses these to identify devices over the protocol. This is done by taking the implementation of drmGetDevice2, and removing the call to fstat to find the dev_t. Signed-off-by: Scott Anderson <scott.anderson@collabora.com> Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Daniel Stone <daniels@collabora.com>
2021-11-12radeon: remove duplicate declaration of struct radeon_bo_manager in radeon_bo.hsuijingfeng1-1/+0
Reviewed-by: Simon Ser <contact@emersion.fr> Signed-off-by: suijingfeng <suijingfeng@loongson.cn>
2021-11-08build: bump version to 2.4.108libdrm-2.4.108Simon Ser1-1/+1
Signed-off-by: Simon Ser <contact@emersion.fr>
2021-11-08xf86drm: add iterator API for DRM/KMS IN_FORMATS blobsLuigi Santivetti4-18/+130
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>
2021-11-04amdgpu: Make marketing names consistentJoshua Ashton1-185/+185
Fixes sporadic (TM), capitalization, missing AMD suffixes and spacing. Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-11-02Fix -Werror=format build errors on FreeBSDAlex Richardson3-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>
2021-10-20amdgpu: add amdgpu_stress utility v2Christian König2-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>
2021-10-06man: refer to drmCloseBufferHandle instead of DRM_IOCTL_GEM_CLOSESimon Ser1-13/+4
This function in libdrm core wraps DRM_IOCTL_GEM_CLOSE. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06tegra: use drmCloseBufferHandleSimon Ser1-5/+1
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06omap: use drmCloseBufferHandleSimon Ser1-8/+2
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06nouveau: use drmCloseBufferHandleSimon Ser1-3/+2
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06freedreno: use drmCloseBufferHandleSimon Ser1-8/+2
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06exynos: use drmCloseBufferHandleSimon Ser1-5/+1
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06etnaviv: use drmCloseBufferHandleSimon Ser1-11/+2
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06radeon: use drmCloseBufferHandleSimon Ser1-6/+1
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06intel: use drmCloseBufferHandleSimon Ser1-9/+4
Instead of manually calling drmIoctl, use the equivalent function from libdrm core. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-06amdgpu: use drmCloseBufferHandleSimon Ser1-16/+8
Instead of using a hand-rolled amdgpu_close_kms_handle function, use the function from libdrm core, which does exactly the same thing. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-10-04xf86drm: Update drmGetFormatModifierNameFromArm to handle AFRCDennis Tsiang2-21/+85
Update drmGetFormatModifierNameFromArm function to handle AFRC modifiers. Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
2021-10-04drm_fourcc: sync drm_fourcc with latest drm-next kernelDennis Tsiang1-3/+106
Update drm_fourcc.h to include latest changes from drm-next branch. This brings in AFRC (Arm Fixed-Rate Compression) modifiers. Generated using make headers_install. Generated from drm-next branch commit 6880fa6 Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
2021-09-27xf86drmMode: simplify drm_property_type_isSimon Ser1-8/+5
No need to have two branches depending on DRM_MODE_PROP_EXTENDED_TYPE. We can just use drmModeGetPropertyType instead. This does introduce a slight change: previously, drm_property_type_is() could be called with non-type flags such as IMMUTABLE. However no user seems to do this (checked KWin/Mutter/Sway/Weston/Xorg). Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2021-09-27xf86drmMode: switch to standard inline qualifierSimon Ser1-1/+1
__inline is non-standard, inline is. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2021-09-27xf86drmMode: make drm_property_type_is arg constSimon Ser1-1/+1
This function only needs read-only access to the property. This is not a breaking ABI change. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2021-09-27intel: Drop legacy execbuffer supportJason Ekstrand1-168/+9
Execbuffer2 support was introduced to libdrm in b50964027be, 10 years ago, and no driver has used the old execbuf path since. There's no need to support 10-year-old kernels. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2021-09-27xf86drm: add GEM_CLOSE ioctl wrapperSimon Ser3-0/+12
We have wrappers for PRIME_HANDLE_TO_FD and PRIME_FD_TO_HANDLE, but not for GEM_CLOSE. Add it so that callers don't need to manually call drmIoctl. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Acked-by: Daniel Stone <daniels@collabora.com>
2021-09-24intel: Do not assert on unknown chips in drm_intel_decode_context_allocTvrtko Ursulin1-18/+21
There is this long standing nit of igt/tools/intel_error_decode asserting when you feed it an error state from a GPU the local libdrm does not know of. To fix this I need a tweak in drm_intel_decode_context_alloc to make it not assert but just return NULL (which seems an already possible return value). Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2021-09-23intel: Sync pci idsJosé Roberto de Souza1-1/+2
Sync libdrm with kernel, a new DG1 pci was added. Commit 5f0d4214938d ("drm/i915/dg1: Add new PCI id") Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
2021-09-20amdgpu: add new marketing nameAlex Deucher1-0/+1
Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-09-20amdgpu: add marketing names from 21.30Alex Deucher1-1/+5
Add new marketing names Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-09-02tests/modetest: get cursor width and height by drmGetCapZhiJie.Zhang1-3/+11
Should get cursor width and height by drmGetCap. Signed-off-by: ZhiJie.Zhang <zhangzhijie@loongson.cn>
2021-08-24intel: sync ADL-S PCI IDs with kernelTejas Upadhyay1-3/+2
Align with kernel commits: c79b846f892d ("drm/i915/adl_s: Update ADL-S PCI IDs") 3f50033dd88a ("drm/i915/adl_s: ADL-S platform Update PCI ids for Mobile BGA") Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
2021-08-14xf86drm: fix mem leak in drm_usb_dev_path()Eric Engestrom1-2/+7
`sysfs_uevent_get()` returns a `strndup()`ed string, which must be `free()`d. Fixes: bf63f8acdc94164ad29d ("libdrm: Handle usb_interface devices for usb parsing") Reviewed-by: Simon Ser <contact@emersion.fr> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2021-08-04nouveau: print bo address in the GPU/CPU vm and its sizeKarol Herbst1-2/+4
v2: print bo->offset as 64 bit Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Karol Herbst <kherbst@redhat.com>
2021-08-02libdrm: NOTE! Default branch is now mainmasterJordan Justen0-0/+0
To update your local repository to use the new default branch, these commands may help: $ git fetch origin $ git checkout master $ git branch -m main $ git branch --set-upstream-to=origin/main $ git remote set-head origin --auto Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2021-08-02headers: drm: Sync with drm-nextMario Kleiner5-103/+378
Generated using make headers_install from the drm-next tree - git://anongit.freedesktop.org/drm/drm branch - drm-next commit - 8a02ea42bc1d4c448caf1bab0e05899dad503f74 Some changes were omitted, e.g., to nouveau_drm.h, i915_drm.h, and msm_drm.h, as the nouveau and i915 changes looked to me as if they could break compatibility or require other compatibility fixes to libdrm which i can not judge. msm_drm.h broke the build, as there are definitely changes needed to libdrm's msm support code. The shortlog below is edited to only list what corresponds to files that are included here, because it looked safe to me. The changes were as follows (shortlog from b10733527bfd864605c33ab2e9a886eec317ec39..HEAD): Aaron Liu (1): drm/amdgpu: add uapi to define yellow carp series Alex Deucher (1): drm/amdgpu: add INFO ioctl support for querying video caps (v4) Christian Gmeiner (1): drm/etnaviv: provide more ID values via GET_PARAM ioctl. Felix Kuehling (1): drm/amdgpu: Add new placement for preemptible SG BOs Jiawei Gu (1): drm/amdgpu: Add vbios info ioctl interface Lionel Landwerlin (1): drm: fix drm_mode_create_blob comment Mario Kleiner (1): drm/fourcc: Add 16 bpc fixed point framebuffer formats. Nirmoy Das (1): drm/amdgpu: remove AMDGPU_GEM_CREATE_SHADOW flag Noralf Trønnes (1): drm/uapi: Add USB connector type Radhakrishna Sripada (1): drm/framebuffer: Format modifier for Intel Gen 12 render compression with Clear Color Simon Ser (13): drm: improve kernel-docs in drm_mode.h drm: document drm_mode_get_connector drm: document drm_mode_modeinfo drm: document that user-space should force-probe connectors drm/doc: atomic implicitly enables other caps drm/doc: re-format drm.h file comment drm/doc: demote old doc-comments in drm.h drm/fourcc: fix Amlogic format modifier masks drm/uapi: document kernel capabilities drm/connector: demote connector force-probes for non-master clients drm: reference mode flags in DRM_CLIENT_CAP_* docs drm: clarify and linkify DRM_CLIENT_CAP_WRITEBACK_CONNECTORS docs drm: document minimum kernel version for DRM_CLIENT_CAP_* Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2021-07-30meson: Don't build libkms for Android.Eric Anholt1-1/+1
Nobody wants that that I know of. Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2021-07-30meson: Build libdrm.so as an unversioned lib on Android.Eric Anholt1-14/+25
Android vendor libraries don't have sonames, and libdrm.so shouldn't either. This lets a Mesa built against a libdrm.so built for Android be copied directly to a Chrome OS ARC installation. Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2021-07-23test/amdgpu: Bob to Alice copy should be TMZ in secure bounce testAaron Liu1-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>
2021-07-16tests/amdgpu: Fix TMZ secure bounce testLuben Tuikov1-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>
2021-07-02Bump version to 2.4.107libdrm-2.4.107Bas Nieuwenhuizen1-1/+1
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2021-06-29amdgpu: update marketing namesAlex Deucher1-0/+6
From 21.20 release. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-22README.rst: Include some notes about syncing uapi headersMarius Vlad1-0/+18
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-06-22xf86drm: Add support for decoding AMLOGIC format modifiersMarius Vlad1-0/+35
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-06-22xf86drm: Add support for decoding AMD format modifiersMarius Vlad1-0/+167
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-06-22xf86drm: Add support for decoding Nvidia format modifiersMarius Vlad1-0/+30
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-06-22xf86drm: Add a vendor function to decode the format modifierMarius Vlad1-3/+112
As format modifiers can be encoded in quite complex forms, the static table previously added is not sufficient to retrieve, extract and decode the token formats to a human-readable string. This patch introduces a vendor specific callback which could be used to perform an additional search to match up with vendor encoding scheme, which, will be used first, before resorting to searching the static table. With it, add support for decoding the ARM format modifiers. Signed-off-by: Marius Vlad <marius.vlad@collabora.com>