diff mbox series

[v4,01/12] drm/connector: Add documentation for drm_cmdline_mode

Message ID 19279b675ec213f8011def396b43bad2420e2992.1560514379.git-series.maxime.ripard@bootlin.com (mailing list archive)
State New, archived
Headers show
Series drm/vc4: Allow for more boot-time configuration | expand

Commit Message

Maxime Ripard June 14, 2019, 12:13 p.m. UTC
The struct drm_cmdline_mode holds the result of the command line parsers.
However, it wasn't documented so far, so let's do that.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 include/drm/drm_connector.h | 86 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 84 insertions(+), 2 deletions(-)

Comments

Noralf Trønnes June 15, 2019, 8:51 a.m. UTC | #1
Den 14.06.2019 14.13, skrev Maxime Ripard:
> The struct drm_cmdline_mode holds the result of the command line parsers.
> However, it wasn't documented so far, so let's do that.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
> ---
>  include/drm/drm_connector.h | 86 +++++++++++++++++++++++++++++++++++++-
>  1 file changed, 84 insertions(+), 2 deletions(-)
> 
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 47e749b74e5f..f9cfa96f5d7e 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -904,18 +904,100 @@ struct drm_connector_funcs {
>  				   const struct drm_connector_state *state);
>  };
>  
> -/* mode specified on the command line */
> +/**
> + * struct drm_cmdline_mode - DRM Mode passed through the kernel command-line
> + *
> + * Each connector can have an initial mode with additional options
> + * passed through the kernel command line. This structure allows to
> + * express those parameters and will be filled by the command-line
> + * parser.
> + */
>  struct drm_cmdline_mode {
> +	/**
> +	 * @specified:
> +	 *
> +	 * Has a mode been read from the command-line?
> +	 */
>  	bool specified;
> +
> +	/**
> +	 * @refresh_specified:
> +	 *
> +	 * Did the mode has a preferred refresh rate?

s/has/have/ or Does the mode have

> +	 */
>  	bool refresh_specified;
> +
> +	/**
> +	 * @bpp_specified:
> +	 *
> +	 * Did the mode has a preferred BPP?

s/has/have/

Reviewed-by: Noralf Trønnes <noralf@tronnes.org>

> +	 */
>  	bool bpp_specified;
> -	int xres, yres;
> +
> +	/**
> +	 * @xres:
> +	 *
> +	 * Active resolution on the X axis, in pixels.
> +	 */
> +	int xres;
> +
> +	/**
> +	 * @yres:
> +	 *
> +	 * Active resolution on the Y axis, in pixels.
> +	 */
> +	int yres;
> +
> +	/**
> +	 * @bpp:
> +	 *
> +	 * Bits per pixels for the mode.
> +	 */
>  	int bpp;
> +
> +	/**
> +	 * @refresh:
> +	 *
> +	 * Refresh rate, in Hertz.
> +	 */
>  	int refresh;
> +
> +	/**
> +	 * @rb:
> +	 *
> +	 * Do we need to use reduced blanking?
> +	 */
>  	bool rb;
> +
> +	/**
> +	 * @interlace:
> +	 *
> +	 * The mode is interlaced.
> +	 */
>  	bool interlace;
> +
> +	/**
> +	 * @cvt:
> +	 *
> +	 * The timings will be calculated using the VESA Coordinated
> +	 * Video Timings instead of looking up the mode from a table.
> +	 */
>  	bool cvt;
> +
> +	/**
> +	 * @margins:
> +	 *
> +	 * Add margins to the mode calculation (1.8% of xres rounded
> +	 * down to 8 pixels and 1.8% of yres).
> +	 */
>  	bool margins;
> +
> +	/**
> +	 * @force:
> +	 *
> +	 * Ignore the hotplug state of the connector, and force its
> +	 * state to one of the DRM_FORCE_* values.
> +	 */
>  	enum drm_connector_force force;
>  };
>  
>
diff mbox series

Patch

diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 47e749b74e5f..f9cfa96f5d7e 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -904,18 +904,100 @@  struct drm_connector_funcs {
 				   const struct drm_connector_state *state);
 };
 
-/* mode specified on the command line */
+/**
+ * struct drm_cmdline_mode - DRM Mode passed through the kernel command-line
+ *
+ * Each connector can have an initial mode with additional options
+ * passed through the kernel command line. This structure allows to
+ * express those parameters and will be filled by the command-line
+ * parser.
+ */
 struct drm_cmdline_mode {
+	/**
+	 * @specified:
+	 *
+	 * Has a mode been read from the command-line?
+	 */
 	bool specified;
+
+	/**
+	 * @refresh_specified:
+	 *
+	 * Did the mode has a preferred refresh rate?
+	 */
 	bool refresh_specified;
+
+	/**
+	 * @bpp_specified:
+	 *
+	 * Did the mode has a preferred BPP?
+	 */
 	bool bpp_specified;
-	int xres, yres;
+
+	/**
+	 * @xres:
+	 *
+	 * Active resolution on the X axis, in pixels.
+	 */
+	int xres;
+
+	/**
+	 * @yres:
+	 *
+	 * Active resolution on the Y axis, in pixels.
+	 */
+	int yres;
+
+	/**
+	 * @bpp:
+	 *
+	 * Bits per pixels for the mode.
+	 */
 	int bpp;
+
+	/**
+	 * @refresh:
+	 *
+	 * Refresh rate, in Hertz.
+	 */
 	int refresh;
+
+	/**
+	 * @rb:
+	 *
+	 * Do we need to use reduced blanking?
+	 */
 	bool rb;
+
+	/**
+	 * @interlace:
+	 *
+	 * The mode is interlaced.
+	 */
 	bool interlace;
+
+	/**
+	 * @cvt:
+	 *
+	 * The timings will be calculated using the VESA Coordinated
+	 * Video Timings instead of looking up the mode from a table.
+	 */
 	bool cvt;
+
+	/**
+	 * @margins:
+	 *
+	 * Add margins to the mode calculation (1.8% of xres rounded
+	 * down to 8 pixels and 1.8% of yres).
+	 */
 	bool margins;
+
+	/**
+	 * @force:
+	 *
+	 * Ignore the hotplug state of the connector, and force its
+	 * state to one of the DRM_FORCE_* values.
+	 */
 	enum drm_connector_force force;
 };