pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wlroots: patch to avoid drm_mode_create_lease_ioctl



Module Name:	pkgsrc-wip
Committed By:	kikadf <kikadf.01%gmail.com@localhost>
Pushed By:	kikadf
Date:		Thu Dec 4 17:32:36 2025 +0100
Changeset:	68cfbd6d8dacc99585cd7d06e7e6b62ce0ff72d5

Modified Files:
	wlroots/distinfo
Added Files:
	wlroots/patches/patch-render_allocator_allocator.c

Log Message:
wlroots: patch to avoid drm_mode_create_lease_ioctl

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=68cfbd6d8dacc99585cd7d06e7e6b62ce0ff72d5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 wlroots/distinfo                                   |  1 +
 wlroots/patches/patch-render_allocator_allocator.c | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diffs:
diff --git a/wlroots/distinfo b/wlroots/distinfo
index a51aa1ab89..c7c4a03600 100644
--- a/wlroots/distinfo
+++ b/wlroots/distinfo
@@ -4,6 +4,7 @@ BLAKE2s (wlroots-0.19.2.tar.gz) = aff6485d67841535c2bac5fda24cb8b0f6449ec841a344
 SHA512 (wlroots-0.19.2.tar.gz) = a48e71bc7ebcd2ca3bcbc1b20034b50ed230ecdd270fa4a6362e19e24b3fb60ea2e0a9631fa1b7ebadf4fc0f433a7cd9525f57e6130f7fede0a239ba1d1aba29
 Size (wlroots-0.19.2.tar.gz) = 670517 bytes
 SHA1 (patch-backend_libinput_meson.build) = 7f109761790191930828f280ca74db6bc95941e1
+SHA1 (patch-render_allocator_allocator.c) = ef3c2ca73c5e0a34e48f3a9e0a818614af4e2f77
 SHA1 (patch-render_drm__syncobj.c) = 70708836fe3fd7e4f55e128edbe9d3ad50f66916
 SHA1 (patch-render_vulkan_vulkan.c) = adf215c6cc885909a51c534b0102c89a84f8ab27
 SHA1 (patch-util_shm.c) = 4bc2f6eefbe94539d03e1ce2f1e001ae97ab4c60
diff --git a/wlroots/patches/patch-render_allocator_allocator.c b/wlroots/patches/patch-render_allocator_allocator.c
new file mode 100644
index 0000000000..1ba276eb53
--- /dev/null
+++ b/wlroots/patches/patch-render_allocator_allocator.c
@@ -0,0 +1,23 @@
+$NetBSD$
+
+# On NetBSD the stub drm_mode_create_lease_ioctl() always returns with -ENODEV,
+  but after drmModeCreateLease() only allowed -EINVAL and -EOPNOTSUPP
+
+--- render/allocator/allocator.c.orig	2025-12-04 16:11:21.906858096 +0000
++++ render/allocator/allocator.c
+@@ -37,6 +37,7 @@ void wlr_allocator_init(struct wlr_alloc
+  */
+ static int reopen_drm_node(int drm_fd, bool allow_render_node) {
+ 	if (drmIsMaster(drm_fd)) {
++#if !defined(__NetBSD__)
+ 		// Only recent kernels support empty leases
+ 		uint32_t lessee_id;
+ 		int lease_fd = drmModeCreateLease(drm_fd, NULL, 0, O_CLOEXEC, &lessee_id);
+@@ -46,6 +47,7 @@ static int reopen_drm_node(int drm_fd, b
+ 			wlr_log_errno(WLR_ERROR, "drmModeCreateLease failed");
+ 			return -1;
+ 		}
++#endif
+ 		wlr_log(WLR_DEBUG, "drmModeCreateLease failed, "
+ 			"falling back to plain open");
+ 	}


Home | Main Index | Thread Index | Old Index