Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 2019 15:07:45 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        raichoo <raichoo@acmelabs.space>
Cc:        x11@freebsd.org
Subject:   Re: wayland: hotplugging additional screens
Message-ID:  <zhj5-1zdq-wny@FreeBSD.org>
In-Reply-To: <20190915114155.GA1483@lain> (raichoo@acmelabs.space's message of "Sun, 15 Sep 2019 13:41:55 %2B0200")
References:  <20190915114155.GA1483@lain>

next in thread | previous in thread | raw e-mail | index | archive | help
raichoo <raichoo@acmelabs.space> writes:

> Hi,
>
> I'm currently developing a wayland compositor on FreeBSD and got started on
> adding support for multiple screens. It seems that a running compositor is not
> getting notified when a new screen is attached to the system. I need to restart
> the compositor for it to get recognized. The library I'm using is wlroots.
>
> Is anyone else having the same issue?

Does the following help?

Index: devel/libudev-devd/Makefile
===================================================================
--- devel/libudev-devd/Makefile	(revision 512101)
+++ devel/libudev-devd/Makefile	(working copy)
@@ -2,8 +2,12 @@
 
 PORTNAME=	libudev-devd
 PORTVERSION=	0.4
+PORTREVISION=	1
 CATEGORIES=	devel
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+=	f11ee5b418c7.patch:-p1
+
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	libudev-compatible interface for devd
 
Index: devel/libudev-devd/distinfo
===================================================================
--- devel/libudev-devd/distinfo	(revision 512101)
+++ devel/libudev-devd/distinfo	(working copy)
@@ -1,3 +1,5 @@
 TIMESTAMP = 1527795819
 SHA256 (FreeBSDDesktop-libudev-devd-0.4-fbe5a0b_GH0.tar.gz) = 4f6423caf9b673e8bae14c2ec94f0ac1c3fc90b2a1b96315ce11caba1ac342e2
 SIZE (FreeBSDDesktop-libudev-devd-0.4-fbe5a0b_GH0.tar.gz) = 17111
+SHA256 (f11ee5b418c7.patch) = 5f7ed7a4158295356310b838a8f0363c8c6a197dab8e24cc4ca9ee2ded4cc6a5
+SIZE (f11ee5b418c7.patch) = 2768
Index: x11-toolkits/wlroots/Makefile
===================================================================
--- x11-toolkits/wlroots/Makefile	(revision 511956)
+++ x11-toolkits/wlroots/Makefile	(working copy)
@@ -2,6 +2,7 @@
 
 PORTNAME=	wlroots
 DISTVERSION=	0.7.0
+PORTREVISION=	1
 CATEGORIES=	x11-toolkits
 
 MAINTAINER=	jbeich@FreeBSD.org
Index: x11-toolkits/wlroots/files/patch-backend_session_session.c
===================================================================
--- x11-toolkits/wlroots/files/patch-backend_session_session.c	(nonexistent)
+++ x11-toolkits/wlroots/files/patch-backend_session_session.c	(working copy)
@@ -0,0 +1,22 @@
+Enable DRM hotplug on FreeBSD
+
+--- backend/session/session.c.orig	2019-08-27 03:32:24 UTC
++++ backend/session/session.c
+@@ -288,11 +288,6 @@ size_t wlr_session_find_gpus(struct wlr_session *sessi
+ 		return explicit_find_gpus(session, ret_len, ret, explicit);
+ 	}
+ 
+-#ifdef __FreeBSD__
+-	// XXX: libudev-devd does not return any GPUs (yet?)
+-	return explicit_find_gpus(session, ret_len, ret, "/dev/drm/0");
+-#else
+-
+ 	struct udev_enumerate *en = udev_enumerate_new(session->udev);
+ 	if (!en) {
+ 		wlr_log(WLR_ERROR, "Failed to create udev enumeration");
+@@ -360,5 +355,4 @@ size_t wlr_session_find_gpus(struct wlr_session *sessi
+ 	udev_enumerate_unref(en);
+ 
+ 	return i;
+-#endif
+ }




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?zhj5-1zdq-wny>