All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: Marius Vlad <marius.vlad@collabora.com>, Julian Orth <ju.orth@gmail.com>
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Louis Chauvet" <louis.chauvet@bootlin.com>,
	"Haneen Mohammed" <hamohammed.sa@gmail.com>,
	"Melissa Wen" <melissa.srw@gmail.com>,
	"Daniel Stone" <daniel.stone@collabora.com>,
	"Ian Forbes" <ian.forbes@broadcom.com>,
	"Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
	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	[thread overview]
Message-ID: <4528526.e9J7NaK4W3@workhorse> (raw)
In-Reply-To: <CAHijbEWpsMNyskhe=nTY-Aa2B6bNC1G+Pm+C8OChvByRfS9NqA@mail.gmail.com>

On Thursday, 16 April 2026 15:55:52 Central European Summer Time Julian Orth wrote:
> On Thu, Apr 16, 2026 at 3:35 PM Marius Vlad <marius.vlad@collabora.com> wrote:
> >
> > On Thu, Apr 16, 2026 at 03:16:39PM +0200, Julian Orth wrote:
> > > On Thu, Apr 16, 2026 at 9:46 AM Nicolas Frattaroli
> > > <nicolas.frattaroli@collabora.com> wrote:
> > > >
> > > > On Wednesday, 15 April 2026 20:57:53 Central European Summer Time Julian Orth wrote:
> > > > > On Wed, Apr 15, 2026 at 8:19 PM Nicolas Frattaroli
> > > > > <nicolas.frattaroli@collabora.com> 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. This 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 status.
> > > > > >
> > > > > > The motivation is that user-space applications such as Weston would
> > > > > > previously receive non-connector-specific hotplug events, and then 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 of 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 looks
> > > > > > 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 necessary
> > > > 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.
> 
> 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



  reply	other threads:[~2026-04-16 14:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15 17:59 [PATCH RESEND v7 0/2] Pass down hot-plug CONNECTOR ID to user-space Nicolas Frattaroli
2026-04-15 17:59 ` [PATCH RESEND v7 1/2] drm: Introduce pending_hp to drm_connector Nicolas Frattaroli
2026-04-19  0:45   ` Dmitry Baryshkov
2026-04-15 17:59 ` [PATCH RESEND v7 2/2] drm: Send per-connector hotplug events Nicolas Frattaroli
2026-04-19  1:02   ` Dmitry Baryshkov
2026-04-20 15:59     ` Nicolas Frattaroli
2026-04-15 18:57 ` [PATCH RESEND v7 0/2] Pass down hot-plug CONNECTOR ID to user-space Julian Orth
2026-04-16  7:45   ` Nicolas Frattaroli
2026-04-16 13:16     ` Julian Orth
2026-04-16 13:35       ` Marius Vlad
2026-04-16 13:55         ` Julian Orth
2026-04-16 14:21           ` Nicolas Frattaroli [this message]
2026-04-16 15:27             ` Julian Orth
2026-04-17  7:49       ` Michel Dänzer
2026-04-17 10:57         ` Ville Syrjälä
2026-04-17 12:18           ` Julian Orth
2026-04-17 12:36           ` Julian Orth
2026-04-17 14:36             ` Ville Syrjälä
2026-04-17 12:42           ` Nicolas Frattaroli
2026-04-17 14:16             ` Ville Syrjälä
2026-04-17 15:00               ` Nicolas Frattaroli
2026-04-17 15:19                 ` Ville Syrjälä
2026-04-17 14:17           ` Michel Dänzer
2026-04-17 14:55             ` Ville Syrjälä
2026-04-17 16:40               ` Michel Dänzer
2026-04-17 18:50                 ` Ville Syrjälä
2026-04-21 10:13                   ` Michel Dänzer
2026-04-20 18:13                 ` Ville Syrjälä
2026-04-17 14:25         ` Alex Deucher
2026-04-17 14:29           ` Michel Dänzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4528526.e9J7NaK4W3@workhorse \
    --to=nicolas.frattaroli@collabora.com \
    --cc=airlied@gmail.com \
    --cc=daniel.stone@collabora.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=ian.forbes@broadcom.com \
    --cc=ju.orth@gmail.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=louis.chauvet@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marius.vlad@collabora.com \
    --cc=melissa.srw@gmail.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    --cc=wayland-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.