[v5,3/4] drm: Document variable refresh properties

Submitted by Kazlauskas, Nicholas on Oct. 12, 2018, 4:44 p.m.

Details

Message ID 20181012164458.12864-4-nicholas.kazlauskas@amd.com
State New
Headers show
Series "A DRM API for adaptive sync and variable refresh rate support" ( rev: 5 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Kazlauskas, Nicholas Oct. 12, 2018, 4:44 p.m.
These include the drm_connector 'vrr_capable' and the drm_crtc
'vrr_enabled' properties.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
 Documentation/gpu/drm-kms.rst   |  7 +++++++
 drivers/gpu/drm/drm_connector.c | 22 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)

Patch hide | download patch | download mbox

diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst
index 4b1501b4835b..8da2a178cf85 100644
--- a/Documentation/gpu/drm-kms.rst
+++ b/Documentation/gpu/drm-kms.rst
@@ -575,6 +575,13 @@  Explicit Fencing Properties
 .. kernel-doc:: drivers/gpu/drm/drm_atomic_uapi.c
    :doc: explicit fencing properties
 
+
+Variable Refresh Properties
+---------------------------
+
+.. kernel-doc:: drivers/gpu/drm/drm_connector.c
+   :doc: Variable refresh properties
+
 Existing KMS Properties
 -----------------------
 
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index f0deeb7298d0..2a12853ca917 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -1254,6 +1254,28 @@  int drm_mode_create_scaling_mode_property(struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);
 
+/**
+ * DOC: Variable refresh properties
+ *
+ * Variable refresh rate control is supported via properties on the
+ * &drm_connector and &drm_crtc objects.
+ *
+ * "vrr_capable":
+ *	Optional &drm_connector boolean property that drivers should attach
+ *	with drm_connector_attach_vrr_capable_property() on connectors that
+ *	could support variable refresh rates. Drivers should update the
+ *	property value by calling drm_connector_set_vrr_capable_property().
+ *
+ *	Absence of the property should indicate absence of support.
+ *
+ * "vrr_enabled":
+ *	Default &drm_crtc boolean property that notifies the driver that the
+ *	variable refresh rate adjustment should be enabled for the CRTC.
+ *
+ *	Support for variable refresh rate will depend on the "vrr_capable"
+ *	property exposed on the &drm_connector object.
+ */
+
 /**
  * drm_connector_attach_vrr_capable_property - creates the
  * vrr_capable property

Comments

On 2018-10-12 12:44 p.m., Nicholas Kazlauskas wrote:
> These include the drm_connector 'vrr_capable' and the drm_crtc

> 'vrr_enabled' properties.

> 

> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

> ---

>  Documentation/gpu/drm-kms.rst   |  7 +++++++

>  drivers/gpu/drm/drm_connector.c | 22 ++++++++++++++++++++++

>  2 files changed, 29 insertions(+)

> 

> diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst

> index 4b1501b4835b..8da2a178cf85 100644

> --- a/Documentation/gpu/drm-kms.rst

> +++ b/Documentation/gpu/drm-kms.rst

> @@ -575,6 +575,13 @@ Explicit Fencing Properties

>  .. kernel-doc:: drivers/gpu/drm/drm_atomic_uapi.c

>     :doc: explicit fencing properties

>  

> +

> +Variable Refresh Properties

> +---------------------------

> +

> +.. kernel-doc:: drivers/gpu/drm/drm_connector.c

> +   :doc: Variable refresh properties

> +

>  Existing KMS Properties

>  -----------------------

>  

> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c

> index f0deeb7298d0..2a12853ca917 100644

> --- a/drivers/gpu/drm/drm_connector.c

> +++ b/drivers/gpu/drm/drm_connector.c

> @@ -1254,6 +1254,28 @@ int drm_mode_create_scaling_mode_property(struct drm_device *dev)

>  }

>  EXPORT_SYMBOL(drm_mode_create_scaling_mode_property);

>  

> +/**

> + * DOC: Variable refresh properties

> + *

> + * Variable refresh rate control is supported via properties on the

> + * &drm_connector and &drm_crtc objects.

> + *

> + * "vrr_capable":

> + *	Optional &drm_connector boolean property that drivers should attach

> + *	with drm_connector_attach_vrr_capable_property() on connectors that

> + *	could support variable refresh rates. Drivers should update the

> + *	property value by calling drm_connector_set_vrr_capable_property().

> + *

> + *	Absence of the property should indicate absence of support.

> + *

> + * "vrr_enabled":

> + *	Default &drm_crtc boolean property that notifies the driver that the

> + *	variable refresh rate adjustment should be enabled for the CRTC.

> + *

> + *	Support for variable refresh rate will depend on the "vrr_capable"

> + *	property exposed on the &drm_connector object.


We probably want to make it clear that this is a content hint. Maybe something like:

 * "vrr_enabled":
 *	Default &drm_crtc boolean property that notifies the driver that the
 *	content on the CRTC is suitable for variable refresh presentation.
 *	The driver will take that as a hint to enable variable refresh rate
 *	if the receiver supports it, i.e. the "vrr_capable" property on the
 *	&drm_connector_object is true.


Harry

> + */

> +

>  /**

>   * drm_connector_attach_vrr_capable_property - creates the

>   * vrr_capable property

>