Commit Graph

677 Commits

Author SHA1 Message Date
Joseph Crowell
3f48bbfe95 fix a double free caused by amdgpu_dri3_get_formats()
The function now allocates memory with malloc() and copies the formats array, instead of returning a pointer to static memory that the xserver would try to free() later.
xlibre-xf86-video-amdgpu-25.1.1
2026-02-16 17:43:52 +10:00
Joseph Crowell
3f2da8f9b7 update driver version 2026-02-12 10:55:29 +10:00
Joseph Crowell
17fab4a358 fix for outdated libdrm on Ubuntu xlibre-xf86-video-amdgpu-25.1.0 2026-02-09 13:51:00 +10:00
Joseph Crowell
2dc57435b7 rework the libdrm include paths and configure scripts to account for the fact that the libdrm header files are in a different place on BSD distributions 2026-02-09 13:51:00 +10:00
Joseph Crowell
55fc628b5a dri3: fix error: 'struct drm_syncobj_handle' has no member named 'point' on Ubuntu 2026-02-09 13:51:00 +10:00
Joseph Crowell
69bc3f4e54 dri2: complete the page flip implementation
this implementation matches and exceeds the modesetting driver's DRI2 page flip capabilities while leveraging AMD-specific features
2026-02-09 13:51:00 +10:00
Joseph Crowell
cd72fc43d7 dri3: implement modifier extraction from bo_info.metadata.tiling_info for AMDGPU tiled surfaces 2026-02-09 13:51:00 +10:00
Joseph Crowell
4e4f665890 dri3: add open_client support which is just open with an extra argument that we don't use 2026-02-09 13:51:00 +10:00
Joseph Crowell
9403123046 dri3: implement sync objects support
with this, we have a full dri 1.4 implementation

struct amdgpu_dri3_syncobj - wraps DRM syncobj handle with:

syncobj_handle - DRM syncobj handle
owns_handle - whether we own and should destroy the handle
function pointers implemented:

amdgpu_dri3_syncobj_free() - frees the syncobj and destroys the DRM handle
amdgpu_dri3_syncobj_has_fence() - checks if syncobj has a fence
amdgpu_dri3_syncobj_is_signaled() - checks if syncobj is signaled
amdgpu_dri3_syncobj_export_fence() - exports syncobj to fence fd
amdgpu_dri3_syncobj_import_fence() - imports fence fd into syncobj
amdgpu_dri3_syncobj_signal() - signals the syncobj
amdgpu_dri3_syncobj_submitted_eventfd() - eventfd submission callback
amdgpu_dri3_syncobj_signaled_eventfd() - eventfd signaled callback
import function:

amdgpu_dri3_import_syncobj() - creates syncobj and optionally imports fence
Updated dri3_screen_info_rec to version 4 with import_syncobj function pointer.
2026-02-09 13:51:00 +10:00
Joseph Crowell
9d9d961e09 dri3: implement get_drawable_modifiers - per-drawable modifiers
Takes a DrawablePtr, format, and returns modifiers via num_modifiers and modifiers parameters
Returns TRUE on success, FALSE on allocation failure
Selects modifiers based on GPU family (GC 12.0.0+, GFX10+, GFX9+, or older)
Returns AMD-specific tiled modifiers (64K_S, 64K_D, 64K_2D) plus LINEAR

(cherry picked from commit 69becd71c29c98d97aa69a66246ca6bf6eeaf74f)
2026-02-09 13:51:00 +10:00
Joseph Crowell
8b68bf6b29 dri3: implement get_drawable_modifiers - per-drawable modifiers
Takes a DrawablePtr, format, and returns modifiers via num_modifiers and modifiers parameters
Returns TRUE on success, FALSE on allocation failure
Selects modifiers based on GPU family (GC 12.0.0+, GFX10+, GFX9+, or older)
Returns AMD-specific tiled modifiers (64K_S, 64K_D, 64K_2D) plus LINEAR

(cherry picked from commit 69becd71c29c98d97aa69a66246ca6bf6eeaf74f)
2026-02-09 13:51:00 +10:00
Joseph Crowell
cca1e3a7b4 dri3: implement get_modifiers - Return supported modifiers per format (e.g., AMD_TILED, LINEAR)
determines which modifiers to advertise based on the GPU family:

GFX12+ (AMDGPU_FAMILY_GC_12_0_0 and newer): Returns GFX12 tiled modifiers
GFX10+ (AMDGPU_FAMILY_NV and newer): Returns GFX10 tiled modifiers
GFX9+ (AMDGPU_FAMILY_AI and newer): Returns GFX9 tiled modifiers
Older GPUs: Only LINEAR (DRM_FORMAT_MOD_INVALID)
2026-02-09 13:51:00 +10:00
Joseph Crowell
0e718f32e0 dri3: implemented pixmap_from_fds
supports:

Multi-plane buffers (e.g., NV12, P010) with DRM modifiers
Single-plane buffers with or without modifiers
All standard X server depths (15, 16, 24, 30, 32-bit)
Proper cleanup and error handling
2026-02-09 13:51:00 +10:00
Joseph Crowell
640d567c56 dri3: implement get_formats - Return supported DRM formats (e.g., DRM_FORMAT_ARGB8888) 2026-02-09 13:51:00 +10:00
Joseph Crowell
43a4672ae3 dri3: implement fds_from_pixmap - Return fd + stride + offset + modifier 2026-02-09 13:51:00 +10:00
Joseph Crowell
2bf92d66ed kms: fix front buffer VRAM leaked when amdgpu_bo_map() fails
Signed-off-by: Joseph Crowell <joseph.w.crowell@gmail.com>
xlibre-xf86-video-amdgpu-25.0.2 xlibre-xf86-video-amdgpu-25.0.3
2026-02-06 16:02:22 +10:00
Joseph Crowell
ba02a2efdd kms: fix cursor buffer[0] leaked when cursor buffer[1] allocation fails
Signed-off-by: Joseph Crowell <joseph.w.crowell@gmail.com>
2026-02-06 16:02:21 +10:00
Enrico Weigelt, metux IT consult
49def5180a configure.ac: use xlibre-server.pc's video_drivers_dir
Ask the Xserver SDK for the correct input driver installation dir

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-12 09:01:57 +01:00
Enrico Weigelt, metux IT consult
3aaca5ae70 .github: upgrade xserver base version
upcoming commits need features from newer Xserver releases, that have
been recently added both in 25.0 and 25.1 lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-09 20:14:47 +01:00
Enrico Weigelt, metux IT consult
29fdf33145 .github: upgrade action-build-driver version
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-09 19:47:38 +01:00
Enrico Weigelt, metux IT consult
e94596c919 make glamor mandatory
xfree86 ddx supports glamor for aeons now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 20:21:11 +01:00
Enrico Weigelt, metux IT consult
04451bdeec configure.ac: make Xserver's builtin extensions mandatory
Several extensions like randr and render are always built-in in the
Xserver, no need for having them optional here in any way.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 20:21:11 +01:00
Enrico Weigelt, metux IT consult
a5dbad6979 meson.build: drop unused HAVE_PRESENT_H define
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 16:11:26 +01:00
Enrico Weigelt, metux IT consult
42f9e2d636 drop obsolete compat-api.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 13:07:04 +01:00
Enrico Weigelt, metux IT consult
dd64e3c0ff replace BLOCKHANDLER_ARGS_DECL and BLOCKHANDLER_ARGS
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 13:06:02 +01:00
Enrico Weigelt, metux IT consult
44da1288be configure.ac: tiny formatting cleanup
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 11:04:31 +01:00
Enrico Weigelt, metux IT consult
05eb5b3a71 meson.build: drop obsolete check for byteswap.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 11:03:07 +01:00
Enrico Weigelt, metux IT consult
30da573b81 configure.ac: drop obsolete check for byteswap.h
The Xserver is providing it's own functions for this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 11:02:02 +01:00
Enrico Weigelt, metux IT consult
fd1340ab0e configure.ac: drop obsolete AC_SYS_LARGEFILE
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-31 11:01:07 +01:00
Enrico Weigelt, metux IT consult
20b836bb55 .github: add NetBSD build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 19:42:55 +01:00
Enrico Weigelt, metux IT consult
e88756767f configure.ac: drop broken inclusion of <sys/endian.h>
It's breaking with Xservers SDK's functions and not needed at all,
since the Xserver SDK already providing platform independent
functions for this. (actually we only need bswap_32() anyways)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 19:42:55 +01:00
Enrico Weigelt, metux IT consult
2aee7058c0 amdgpu_probe: fix build w/o XSERVER_PLATFORM_BUS
On NetBSD (and possibly others) we don't have XSERVER_PLATFORM_BUS
enabled, due lack of udev & kms.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-29 19:42:55 +01:00
Enrico Weigelt, metux IT consult
b9cfbae613 .github: add freebsd and dragonfly build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-28 14:14:04 +01:00
Enrico Weigelt, metux IT consult
3a5c320107 .github: use new common driver build actions
Using the new driver build actions in X11Libre/actions-build-driver repo,
instead of having lots of duplicated pipeline and script in all the
individual driver repos.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-23 11:13:29 +01:00
Enrico Weigelt, metux IT consult
7d1cfb1d2e configure.ac: increase minimum xserver version to 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 16:02:49 +01:00
Enrico Weigelt, metux IT consult
b91d99f508 release 25.0.1
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-video-amdgpu-25.0.1
2025-12-18 18:41:53 +01:00
Enrico Weigelt, metux IT consult
0c5ac184c1 configure.ac: replace DRIVER_NAME symbol by actual name
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 13:05:23 +01:00
Enrico Weigelt, metux IT consult
c511d2ca21 meson.build: drop setting HAVE_XEXTPROTO_71
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:58:40 +01:00
Enrico Weigelt, metux IT consult
e6ed0c8849 drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:51:31 +01:00
Enrico Weigelt, metux IT consult
d485f692ce drop obsolete .editorconfig
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:51:18 +01:00
Enrico Weigelt, metux IT consult
1e2f118311 drop obsolete .dir-locals.el
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-18 11:51:05 +01:00
Enrico Weigelt, metux IT consult
5824c26679 meson.build: drop obsolete HAVE_CONFIG_H
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 19:21:32 +01:00
Enrico Weigelt, metux IT consult
78991d8c03 meson_options.txt: replace Xorg by XLibre
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 13:51:09 +01:00
Enrico Weigelt, metux IT consult
f4979f4c20 README.md: fix URLs
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-16 11:10:52 +01:00
Enrico Weigelt, metux IT consult
384ca9d536 release 25.0.0
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-video-amdgpu-25.0.0
2025-12-15 14:45:53 +01:00
Mario Limonciello
afb09b6d9e Add support for the meson build system 2025-12-15 14:45:07 +01:00
Mario Limonciello
ec59f57b9e Add missing xorg-server.h header
This should be added by the source file, not the build system.
2025-12-15 14:44:26 +01:00
Enrico Weigelt, metux IT consult
0fc278443f configure.ac: fix package name and issue tracker URL
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-15 14:38:07 +01:00
Mario Limonciello
78179bb087 trivial: ignore .vscode directory
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2025-12-15 14:34:53 +01:00
Enrico Weigelt, metux IT consult
7581891ec8 don't crash server on malloc fail (XNFasprintf)
Use standard libc asprintf() instead of XNFasprintf().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
xlibre-xf86-video-amdgpu-23.0.0.7
2025-11-07 09:27:39 +01:00