diff mbox series

[RFC,1/2] drm: Improve PATH prop docs

Message ID 20190613184335.7970-2-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm: PATH prop for all connectors? | expand

Commit Message

Ville Syrjälä June 13, 2019, 6:43 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The PATH blob is already being parsed by userspace for MST connectors
so the layout of the blob is now uabi. Let's document what it should
look like.

Also add a clear note saying non-MST connectors can have a PATH prop
too.

Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_connector.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

Comments

Pekka Paalanen June 27, 2019, 7:36 a.m. UTC | #1
On Thu, 13 Jun 2019 21:43:34 +0300
Ville Syrjala <ville.syrjala@linux.intel.com> wrote:

> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The PATH blob is already being parsed by userspace for MST connectors
> so the layout of the blob is now uabi. Let's document what it should
> look like.
> 
> Also add a clear note saying non-MST connectors can have a PATH prop
> too.
> 
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Pekka Paalanen <ppaalanen@gmail.com>
> Cc: Ilia Mirkin <imirkin@alum.mit.edu>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_connector.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index e17586aaa80f..ce3926e9ad11 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -899,7 +899,16 @@ static const struct drm_prop_enum_list hdmi_colorspaces[] = {
>   * 	connected. Used by DP MST. This should be set by calling
>   * 	drm_connector_set_path_property(), in the case of DP MST with the
>   * 	path property the MST manager created. Userspace cannot change this
> - * 	property.
> + * 	property. The value must be an ASCII string.
> + *
> + * 	For DP MST connectors the path string follows the pattern
> + * 	"mst:<base connector ID>[-<mst port>]...", where the base connector ID
> + * 	identifies the DP connector on the source device, and the mst ports
> + * 	are the port numbers in the DP MST topology.

Hi,

what exactly is the connector ID as already used here for MST? Is it
not persistent?

I assume the MST port numbers are persistent as long as the physical
topology does not change.

> + *
> + * 	For non-DP MST connectors the format is freeform, as long as it
> + * 	uniquely identifies the physical path, remains stable across
> + * 	kernel releases, and does not start with "mst:".

Maybe the requirements for "persistent name" should be clarified more:
- remains stable across kernel releases
- is immune to driver loading/initialisation order changes
- is immune to adding or removing other hardware (e.g. graphics cards)

Maybe also some explicit words about what to do with dynamic non-MST
connectors?


Thanks,
pq
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index e17586aaa80f..ce3926e9ad11 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -899,7 +899,16 @@  static const struct drm_prop_enum_list hdmi_colorspaces[] = {
  * 	connected. Used by DP MST. This should be set by calling
  * 	drm_connector_set_path_property(), in the case of DP MST with the
  * 	path property the MST manager created. Userspace cannot change this
- * 	property.
+ * 	property. The value must be an ASCII string.
+ *
+ * 	For DP MST connectors the path string follows the pattern
+ * 	"mst:<base connector ID>[-<mst port>]...", where the base connector ID
+ * 	identifies the DP connector on the source device, and the mst ports
+ * 	are the port numbers in the DP MST topology.
+ *
+ * 	For non-DP MST connectors the format is freeform, as long as it
+ * 	uniquely identifies the physical path, remains stable across
+ * 	kernel releases, and does not start with "mst:".
  * 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
@@ -1678,7 +1687,7 @@  int drm_mode_create_suggested_offset_properties(struct drm_device *dev)
 EXPORT_SYMBOL(drm_mode_create_suggested_offset_properties);
 
 /**
- * drm_connector_set_path_property - set tile property on connector
+ * drm_connector_set_path_property - set path property on connector
  * @connector: connector to set property on.
  * @path: path to use for property; must not be NULL.
  *