From owner-freebsd-current@freebsd.org Tue Dec 1 18:08:31 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 09D444B0239 for ; Tue, 1 Dec 2020 18:08:31 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Clqpj6Ndlz4fGg; Tue, 1 Dec 2020 18:08:29 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id CDD6AD50; Tue, 1 Dec 2020 13:08:26 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 01 Dec 2020 13:08:27 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudeivddgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefutgho thhtucfnohhnghcuoehstghothhtlhesshgrmhhstghordhorhhgqeenucggtffrrghtth gvrhhnpeejtdffhfehfefhteekgfehtdffleetteegveevgedthfffkeelgedtvdektdet ieenucffohhmrghinhepfhhrvghshhhpohhrthhsrdhorhhgnecukfhppeehtddrvddvle drkeehrdeltdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehstghothhtlhesshgrmhhstghordhorhhg X-ME-Proxy: Received: from [192.168.3.138] (unknown [50.229.85.90]) by mail.messagingengine.com (Postfix) with ESMTPA id D1A803280060; Tue, 1 Dec 2020 13:08:24 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: Issues with USB-C external monitors From: Scott Long In-Reply-To: <20201201173223.mwmrkogcjmtc4k2j@frix230> Date: Tue, 1 Dec 2020 11:08:23 -0700 Cc: myfreeweb , freebsd-current@freebsd.org, Hans Petter Selasky , Scott Long Content-Transfer-Encoding: quoted-printable Message-Id: <68205920-BE4F-460D-BF70-1A84FE3BC536@samsco.org> References: <20201201131430.ol7pzms24h743iwf@frix230> <342519ee-6f73-98be-29b1-cea7890ccb1e@selasky.org> <20201201173223.mwmrkogcjmtc4k2j@frix230> To: Ali Abdallah X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4Clqpj6Ndlz4fGg X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2020 18:08:31 -0000 > On Dec 1, 2020, at 10:32 AM, Ali Abdallah = wrote: >=20 > On 01.12.2020 17:10, myfreeweb wrote: >>>> __snippet__ >>>> res =3D drmModeGetResources(fd); >>>> for (int i =3D 0; i < res->count_connectors; ++i) { >>>> conn =3D drmModeGetConnector(fd, res->connectors[i]); >>=20 >> Note: you can run graphics/drm_info instead of writing custom code. >=20 > Thanks for the tip. >=20 >> devd (really drm in the kernel) provides hotplug events (system DRM, = type HOTPLUG). >> libudev-devd translates these to UD_ACTION_HOTPLUG. >> This works well with wlroots compositors at least. >>=20 >> How xorg does this I have no idea, as I don't use xorg. >> If your xorg is built with DEVD instead of UDEV option, it shouldn't = work, I don't recall anyone adding support for that there. >> With UDEV it might work? >=20 > On current, for now I'm using the standard xorg-server from pkg, built > with UDEV according to [1], so apparently that is not working either. = At > least in my case. >=20 > Will dig futher into it. >=20 >>=20 >>> There is missing code in the kernel to handle USB-C PCI express >>> attach/detach. CC'ing Scott Long. >>=20 >> Seems like this is about regular DisplayPort over USB-C (the USB side = almost always handled in firmware for this on non-embedded computers). >> I don't think I've ever seen a *monitor* connecting over PCIe to an = existing GPU ;) >> (in this case card0, the onboard vega) >=20 > Yes, this is just the DisplayPort over USB-C from the onboard vega = GPU. >=20 > [1] https://www.freshports.org/x11-servers/xorg-server/ >=20 >=20 I have a work-in-progress to support Thunderbolt, but that=E2=80=99s not = always the same as just DisplayPort-over-USBC. If your connector has = the Thunderbolt logo, then it=E2=80=99s Thunderbolt, if it has the DP = logo then it=E2=80=99s not. Even then, the Thunderbolt component only = controls enable/disable permissions and bandwidth partitioning. The = graphics chip and DRM code does the rest of the work, and it sounds like = the problems here are with those components. Scott