From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 824343DF00E for ; Thu, 16 Apr 2026 14:22:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776349342; cv=pass; b=uKBFhnCsZSRtffF4cQ2TSkh3I5zyBdFSDYDBWA8wnnq/sXGHHVAVbK+nz0b+d9VI4LJMADajl+t5S1Q8qxbB2vEc2hscHV8wcu5b40rQn7tBkIxsMo1UIeznqTJseUVpXD3hnF7m33Pka4UMYclVQ20npPWC7BZ3wCYfN9SbH+A= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776349342; c=relaxed/simple; bh=34qmR7b2ElegFJW94CbQDjfTQXNI9OIIGbOEJgOSC68=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VZqR0PcXA1n6UANWoAWc+AM2oMsdDqjdeMXww9O443kRjemueNGLS/HIBaGBc2K17QgW0Xb2X5EdERqVYlz7dk5QHNF38mlo9ocG9z7W8kssp1X5qTB7oCFAgYBjJ42EM9jEJ4fvDsXOo3abawOcCpv6ifO610RQnuYnVXqDG3I= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b=A7wUTAQo; arc=pass smtp.client-ip=136.143.188.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b="A7wUTAQo" ARC-Seal: i=1; a=rsa-sha256; t=1776349318; cv=none; d=zohomail.com; s=zohoarc; b=lyCSpASUysdJ/1FZC+rvl/jTqqRnswZx1bAcPdawhj0AYHcJZisMt4ayrO1yqC3jBFZ9MDyeo6KrMNZTalwNU7Ma/lMaenAhAQPls5A4bPxBZh3QIHNjf0soNQC+gC6UA+RlJZgZJnNy+4oASsKJhvlOLD5o/DjoVh0Lt0TerlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776349318; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=34qmR7b2ElegFJW94CbQDjfTQXNI9OIIGbOEJgOSC68=; b=GtjCn2U8TzZqEcpzxvh35Fgp30DXqs8g7VZgrjndJ6S/YF3konW0ap+prp1AA7IFobNnYpZjJ1OBa4+/rBs8OWhuXByTf4iMnYhGoC+Io+/qUbvysQBSJqwH3yrRBvGfldE6EeafK0ZjBxRIGguBM/slRsYylmh6VbHSuctWt10= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1776349318; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=34qmR7b2ElegFJW94CbQDjfTQXNI9OIIGbOEJgOSC68=; b=A7wUTAQo1aNiHEZ8DWg7VK9gVGvII+nx4au6VaPYnAvySV/M6TAZfvo0DT990RcN o0W/0yvUBWHvxrtvRXz3m9X/WLzlNBziWVRlN07sPY+NEyybyGIqEpphTzJBq3wyMyv kSrpE56XRD+ThGvRFPIxHHyvlTJa1n7FYS+kdMZg= Received: by mx.zohomail.com with SMTPS id 1776349315605672.3983268488863; Thu, 16 Apr 2026 07:21:55 -0700 (PDT) From: Nicolas Frattaroli To: Marius Vlad , Julian Orth Cc: Ville =?UTF-8?B?U3lyasOkbMOk?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Louis Chauvet , Haneen Mohammed , Melissa Wen , Daniel Stone , Ian Forbes , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, wayland-devel@lists.freedesktop.org Subject: Re: [PATCH RESEND v7 0/2] Pass down hot-plug CONNECTOR ID to user-space Date: Thu, 16 Apr 2026 16:21:49 +0200 Message-ID: <4528526.e9J7NaK4W3@workhorse> In-Reply-To: References: <20260415-hot-plug-passup-v7-0-9a27ef5e2428@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Thursday, 16 April 2026 15:55:52 Central European Summer Time Julian Ort= h wrote: > On Thu, Apr 16, 2026 at 3:35=E2=80=AFPM Marius Vlad wrote: > > > > On Thu, Apr 16, 2026 at 03:16:39PM +0200, Julian Orth wrote: > > > On Thu, Apr 16, 2026 at 9:46=E2=80=AFAM Nicolas Frattaroli > > > wrote: > > > > > > > > On Wednesday, 15 April 2026 20:57:53 Central European Summer Time J= ulian Orth wrote: > > > > > On Wed, Apr 15, 2026 at 8:19=E2=80=AFPM Nicolas Frattaroli > > > > > wrote: > > > > > > > > > > > > I will be taking over this series from Marius Vlad. > > > > > > > > > > > > This series addresses a shortcoming whereby a hot plug event is= sent > > > > > > without it being passed the actual connector that caused it. Th= is takes > > > > > > into consideration both the polling path and the HPD (Hot Plug = Detect) > > > > > > path. It also adds support for the vkms driver (using ConfigFS)= for > > > > > > propagating the connector ID when changing the connector's stat= us. > > > > > > > > > > > > The motivation is that user-space applications such as Weston w= ould > > > > > > previously receive non-connector-specific hotplug events, and t= hen have > > > > > > to figure out themselves which connector needs to have a modeset > > > > > > executed on. This notably did not work when the hotplug events = came in > > > > > > too fast, resulting in Weston missing an on-off-on transition o= f a > > > > > > connector, seeing that its state was unchanged from "on" so can= 't be the > > > > > > one that was hotplugged, and skipping reinitialising it as it l= ooks > > > > > > through the other connectors that could've caused it. > > > > > > > > > > Have you considered adding a u64 serial number as a DRM connector > > > > > property that is incremented every time the connector changes in = some > > > > > way? Userspace could then check this serial number to see if the > > > > > connector has changed since the last time it queried the serial > > > > > number. > > > > > > > > The connector internally already has an epoch_counter member which > > > > could be used for this. However, for the particular thing this > > > > series fixes, I don't think exposing it through the uAPI is necessa= ry > > > > or desirable. Sending hotplug events specific to the connector does > > > > not need any additional handling on the userspace side as long as it > > > > already listens to the per-connector hotplug events in order to > > > > avoid the pitfall described in the cover letter. > > > > > > I currently do not handle per-connector hotplug events. Instead, > > > whenever I get a UDEV change event for a device, I re-fetch the entire > > > kernel state for the device. That is > > > > > > - DRM_IOCTL_MODE_GETRESOURCES > > > - DRM_IOCTL_MODE_OBJ_GETPROPERTIES for each connector, crtc, plane > > With this change you wouldn't need to go over all of them as the kernel > > will supply the connector ID that has changed. >=20 > Is this change only going to add the connector property to existing > events or will it send additional events with the connector property > set? It sends additional events if you happen to have multiple connectors undergoing a hotplug at the same time. This should not be a cause for concern; it's bounded by the number of connectors in the system (which is a single digit number, usually). Kind regards, Nicolas Frattaroli