All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/doc: describe PATH format for DP MST
@ 2023-10-23 20:36 Simon Ser
  2023-10-23 21:32 ` Dmitry Baryshkov
  2023-10-24  7:36 ` Pekka Paalanen
  0 siblings, 2 replies; 7+ messages in thread
From: Simon Ser @ 2023-10-23 20:36 UTC (permalink / raw)
  To: dri-devel; +Cc: Dmitry Baryshkov, Daniel Vetter, Pekka Paalanen, wayland-devel

This is already uAPI, xserver parses it. It's useful to document
since user-space might want to lookup the parent connector.

Additionally, people (me included) have misunderstood the PATH
property for being stable across reboots, but since a KMS object
ID is baked in there that's not the case. So PATH shouldn't be
used as-is in config files and such.

Signed-off-by: Simon Ser <contact@emersion.fr>
Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_connector.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index c3725086f413..392bec1355a3 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -1198,6 +1198,11 @@ static const u32 dp_colorspaces =
  * 	drm_connector_set_path_property(), in the case of DP MST with the
  * 	path property the MST manager created. Userspace cannot change this
  * 	property.
+ *
+ * 	In the case of DP MST, the property has the format
+ * 	``mst:<parent>-<ports>`` where ``<parent>`` is the KMS object ID of the
+ * 	parent connector and ``<ports>`` is a hyphen-separated list of DP MST
+ * 	port numbers. Note, KMS object IDs are not stable across reboots.
  * TILE:
  * 	Connector tile group property to indicate how a set of DRM connector
  * 	compose together into one logical screen. This is used by both high-res
-- 
2.42.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/doc: describe PATH format for DP MST
  2023-10-23 20:36 [PATCH] drm/doc: describe PATH format for DP MST Simon Ser
@ 2023-10-23 21:32 ` Dmitry Baryshkov
  2023-10-24  7:36 ` Pekka Paalanen
  1 sibling, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2023-10-23 21:32 UTC (permalink / raw)
  To: Simon Ser; +Cc: Daniel Vetter, Pekka Paalanen, dri-devel, wayland-devel

On Mon, 23 Oct 2023 at 23:37, Simon Ser <contact@emersion.fr> wrote:
>
> This is already uAPI, xserver parses it. It's useful to document
> since user-space might want to lookup the parent connector.
>
> Additionally, people (me included) have misunderstood the PATH
> property for being stable across reboots, but since a KMS object
> ID is baked in there that's not the case. So PATH shouldn't be
> used as-is in config files and such.
>
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> ---
>  drivers/gpu/drm/drm_connector.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index c3725086f413..392bec1355a3 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1198,6 +1198,11 @@ static const u32 dp_colorspaces =
>   *     drm_connector_set_path_property(), in the case of DP MST with the
>   *     path property the MST manager created. Userspace cannot change this
>   *     property.
> + *
> + *     In the case of DP MST, the property has the format
> + *     ``mst:<parent>-<ports>`` where ``<parent>`` is the KMS object ID of the
> + *     parent connector and ``<ports>`` is a hyphen-separated list of DP MST
> + *     port numbers. Note, KMS object IDs are not stable across reboots.

Nit:  maybe `... is not guaranteed to be stable...'

>   * TILE:
>   *     Connector tile group property to indicate how a set of DRM connector
>   *     compose together into one logical screen. This is used by both high-res
> --
> 2.42.0
>
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/doc: describe PATH format for DP MST
  2023-10-23 20:36 [PATCH] drm/doc: describe PATH format for DP MST Simon Ser
  2023-10-23 21:32 ` Dmitry Baryshkov
@ 2023-10-24  7:36 ` Pekka Paalanen
  2023-10-24  9:03   ` Simon Ser
  1 sibling, 1 reply; 7+ messages in thread
From: Pekka Paalanen @ 2023-10-24  7:36 UTC (permalink / raw)
  To: Simon Ser; +Cc: Dmitry Baryshkov, Daniel Vetter, dri-devel, wayland-devel

[-- Attachment #1: Type: text/plain, Size: 2143 bytes --]

On Mon, 23 Oct 2023 20:36:39 +0000
Simon Ser <contact@emersion.fr> wrote:

> This is already uAPI, xserver parses it. It's useful to document
> since user-space might want to lookup the parent connector.
> 
> Additionally, people (me included) have misunderstood the PATH
> property for being stable across reboots, but since a KMS object
> ID is baked in there that's not the case. So PATH shouldn't be
> used as-is in config files and such.
> 
> Signed-off-by: Simon Ser <contact@emersion.fr>
> Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/drm_connector.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index c3725086f413..392bec1355a3 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1198,6 +1198,11 @@ static const u32 dp_colorspaces =
>   * 	drm_connector_set_path_property(), in the case of DP MST with the
>   * 	path property the MST manager created. Userspace cannot change this
>   * 	property.
> + *
> + * 	In the case of DP MST, the property has the format
> + * 	``mst:<parent>-<ports>`` where ``<parent>`` is the KMS object ID of the
> + * 	parent connector and ``<ports>`` is a hyphen-separated list of DP MST
> + * 	port numbers. Note, KMS object IDs are not stable across reboots.
>   * TILE:
>   * 	Connector tile group property to indicate how a set of DRM connector
>   * 	compose together into one logical screen. This is used by both high-res

Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>

with or without the suggested "guaranteed" wording.

Are DP MST port numbers guaranteed to be tied to the physical hardware
configuration (e.g. how cables are connected) and therefore stable
across reboots? What about stable across kernel upgrades?

If I knew that, I could perhaps manufacture a stable identifier in
userspace by replacing the parent connector ID with a stable connector
designator.


Thanks,
pq

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/doc: describe PATH format for DP MST
  2023-10-24  7:36 ` Pekka Paalanen
@ 2023-10-24  9:03   ` Simon Ser
  2023-10-24 13:03     ` Ville Syrjälä
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Ser @ 2023-10-24  9:03 UTC (permalink / raw)
  To: Pekka Paalanen; +Cc: Dmitry Baryshkov, Daniel Vetter, dri-devel, wayland-devel

On Tuesday, October 24th, 2023 at 09:36, Pekka Paalanen <ppaalanen@gmail.com> wrote:

> Are DP MST port numbers guaranteed to be tied to the physical hardware
> configuration (e.g. how cables are connected) and therefore stable
> across reboots? What about stable across kernel upgrades?
> 
> If I knew that, I could perhaps manufacture a stable identifier in
> userspace by replacing the parent connector ID with a stable connector
> designator.

Hm, my assumption is that these are stable, but maybe that's also wrong?
Ville, Dmitry, do you know whether the DP MST port numbers are
guaranteed stable across reboots when retaining the exact same hardware
configuration (not the software, maybe the user upgraded the kernel)?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/doc: describe PATH format for DP MST
  2023-10-24  9:03   ` Simon Ser
@ 2023-10-24 13:03     ` Ville Syrjälä
  2023-10-24 13:12       ` Pekka Paalanen
  0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2023-10-24 13:03 UTC (permalink / raw)
  To: Simon Ser
  Cc: Dmitry Baryshkov, Daniel Vetter, Pekka Paalanen, dri-devel,
	wayland-devel

On Tue, Oct 24, 2023 at 09:03:22AM +0000, Simon Ser wrote:
> On Tuesday, October 24th, 2023 at 09:36, Pekka Paalanen <ppaalanen@gmail.com> wrote:
> 
> > Are DP MST port numbers guaranteed to be tied to the physical hardware
> > configuration (e.g. how cables are connected) and therefore stable
> > across reboots? What about stable across kernel upgrades?
> > 
> > If I knew that, I could perhaps manufacture a stable identifier in
> > userspace by replacing the parent connector ID with a stable connector
> > designator.
> 
> Hm, my assumption is that these are stable, but maybe that's also wrong?
> Ville, Dmitry, do you know whether the DP MST port numbers are
> guaranteed stable across reboots when retaining the exact same hardware
> configuration (not the software, maybe the user upgraded the kernel)?

I suspect in practice those should remain the same as long as the
topology didn't change, but I don't think there's anything in the
DP spec that actually guarantees that (eg. some branch device
could in theory reshuffle its port numbers on a whim).

But there is no stable identifier for the corresponding SST
connector anyway so I don't know what you would even do with
stable port numbers.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/doc: describe PATH format for DP MST
  2023-10-24 13:03     ` Ville Syrjälä
@ 2023-10-24 13:12       ` Pekka Paalanen
  2023-10-24 13:37         ` Ville Syrjälä
  0 siblings, 1 reply; 7+ messages in thread
From: Pekka Paalanen @ 2023-10-24 13:12 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Dmitry Baryshkov, wayland-devel, dri-devel, Daniel Vetter

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

On Tue, 24 Oct 2023 16:03:27 +0300
Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:

> On Tue, Oct 24, 2023 at 09:03:22AM +0000, Simon Ser wrote:
> > On Tuesday, October 24th, 2023 at 09:36, Pekka Paalanen <ppaalanen@gmail.com> wrote:
> >   
> > > Are DP MST port numbers guaranteed to be tied to the physical hardware
> > > configuration (e.g. how cables are connected) and therefore stable
> > > across reboots? What about stable across kernel upgrades?
> > > 
> > > If I knew that, I could perhaps manufacture a stable identifier in
> > > userspace by replacing the parent connector ID with a stable connector
> > > designator.  
> > 
> > Hm, my assumption is that these are stable, but maybe that's also wrong?
> > Ville, Dmitry, do you know whether the DP MST port numbers are
> > guaranteed stable across reboots when retaining the exact same hardware
> > configuration (not the software, maybe the user upgraded the kernel)?  
> 
> I suspect in practice those should remain the same as long as the
> topology didn't change, but I don't think there's anything in the
> DP spec that actually guarantees that (eg. some branch device
> could in theory reshuffle its port numbers on a whim).
> 
> But there is no stable identifier for the corresponding SST
> connector anyway so I don't know what you would even do with
> stable port numbers.

You mean the index in the array of connectors exposed to userspace is
not stable either for the root DP connector?

KMS device bus path + connector array index for hardwired connectors is
what I've been imagining as stable enough for all end users.


Thanks,
pq

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/doc: describe PATH format for DP MST
  2023-10-24 13:12       ` Pekka Paalanen
@ 2023-10-24 13:37         ` Ville Syrjälä
  0 siblings, 0 replies; 7+ messages in thread
From: Ville Syrjälä @ 2023-10-24 13:37 UTC (permalink / raw)
  To: Pekka Paalanen; +Cc: Dmitry Baryshkov, wayland-devel, dri-devel, Daniel Vetter

On Tue, Oct 24, 2023 at 04:12:34PM +0300, Pekka Paalanen wrote:
> On Tue, 24 Oct 2023 16:03:27 +0300
> Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> 
> > On Tue, Oct 24, 2023 at 09:03:22AM +0000, Simon Ser wrote:
> > > On Tuesday, October 24th, 2023 at 09:36, Pekka Paalanen <ppaalanen@gmail.com> wrote:
> > >   
> > > > Are DP MST port numbers guaranteed to be tied to the physical hardware
> > > > configuration (e.g. how cables are connected) and therefore stable
> > > > across reboots? What about stable across kernel upgrades?
> > > > 
> > > > If I knew that, I could perhaps manufacture a stable identifier in
> > > > userspace by replacing the parent connector ID with a stable connector
> > > > designator.  
> > > 
> > > Hm, my assumption is that these are stable, but maybe that's also wrong?
> > > Ville, Dmitry, do you know whether the DP MST port numbers are
> > > guaranteed stable across reboots when retaining the exact same hardware
> > > configuration (not the software, maybe the user upgraded the kernel)?  
> > 
> > I suspect in practice those should remain the same as long as the
> > topology didn't change, but I don't think there's anything in the
> > DP spec that actually guarantees that (eg. some branch device
> > could in theory reshuffle its port numbers on a whim).
> > 
> > But there is no stable identifier for the corresponding SST
> > connector anyway so I don't know what you would even do with
> > stable port numbers.
> 
> You mean the index in the array of connectors exposed to userspace is
> not stable either for the root DP connector?

It just depends on the order the driver probes the outputs, which
could change when the code changes (or perhaps even across reboots
with the same kernel due to randomness in deferred probe?).

> 
> KMS device bus path + connector array index for hardwired connectors is
> what I've been imagining as stable enough for all end users.

I once posted a patch to add a path property to all connector
which could give you a more stable identifier. But IIRC the
discussion didn't really end in any kind of useful conclusion.

Seems to be this one:
https://lore.kernel.org/all/20190613184335.7970-1-ville.syrjala@linux.intel.com/

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-10-24 13:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-23 20:36 [PATCH] drm/doc: describe PATH format for DP MST Simon Ser
2023-10-23 21:32 ` Dmitry Baryshkov
2023-10-24  7:36 ` Pekka Paalanen
2023-10-24  9:03   ` Simon Ser
2023-10-24 13:03     ` Ville Syrjälä
2023-10-24 13:12       ` Pekka Paalanen
2023-10-24 13:37         ` Ville Syrjälä

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.