drm/doc: describe PATH format for DP MST
Subsystems (2)
PATCH 1/1 drm/doc: describe PATH format for DP MST
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.
--- drivers/gpu/drm/drm_connector.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_connector.c +5 -0
@@ -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
Signature · 1 line
2.42.0
Quoted 9 lines · Simon Ser
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.
Quoted 4 lines
Signed-off-by Simon Ser <[email protected]>Cc Pekka Paalanen <[email protected]>Cc Dmitry Baryshkov <[email protected]>Cc Daniel Vetter <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/drm_connector.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/drm_connector.c +0
-0
drivers/gpu/drm/drm_connector.c static const u32 dp_colorspaces = · line 1205
Quoted 8 lines
drivers/gpu/drm/drm_connector.c +5
-0@@ -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...'
Quoted 7 lines
drivers/gpu/drm/drm_connector.c +0
-1* 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
Signature · 2 lines
With best wishes Dmitry
Quoted 22 lines · On Mon, 23 Oct 2023 20:36:39 +0000 Simon Ser <[email protected]> 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 <[email protected]>Cc Pekka Paalanen <[email protected]>Cc Dmitry Baryshkov <[email protected]>Cc Daniel Vetter <[email protected]>--- drivers/gpu/drm/drm_connector.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/drm_connector.c +0
-0@@ -1198,6 +1198,11 @@ static const u32 dp_colorspaces =* drm_connector_set_path_property(), in the case of DP MST with the
drivers/gpu/drm/drm_connector.c static const u32 dp_colorspaces = · line 1208
Quoted 10 lines
drivers/gpu/drm/drm_connector.c +5
-0* 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
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
Quoted 7 lines · Pekka Paalanen
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)?
Quoted 6 lines · Simon Ser
Quoted 4 lines · Pekka Paalanen
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?
Quoted 8 lines
Quoted 3 lines
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.
Signature · 2 lines
Ville Syrjälä Intel
Quoted 16 lines · On Tue, 24 Oct 2023 16:03:27 +0300 Ville Syrjälä…
Quoted 6 lines · Simon Ser
Quoted 4 lines · Pekka Paalanen
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?
Quoted 8 lines
Quoted 3 lines
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)?
Quoted 8 lines
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
Quoted 24 lines · Pekka Paalanen
Quoted 21 lines · On Tue, 24 Oct 2023 16:03:27 +0300 Ville Syrjälä…
Quoted 6 lines · Simon Ser
Quoted 4 lines · Pekka Paalanen
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?
Quoted 8 lines
Quoted 3 lines
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).
Quoted 6 lines
Quoted 3 lines
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?).
Quoted 3 lines
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/[email protected]/
Signature · 2 lines
Ville Syrjälä Intel