diff mbox

[RFC,v3,1/6] drm: fourcc.h: Use inline kern-doc style for struct drm_format_info

Message ID 1518226556-7181-2-git-send-email-hyun.kwon@xilinx.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hyun Kwon Feb. 10, 2018, 1:35 a.m. UTC
Use the inline kern-doc style for struct drm_format_info for better
readability. This is just a preliminary change for further table update.

Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
---
v3
- This is added
---
---
 include/drm/drm_fourcc.h | 45 +++++++++++++++++++++++++++++++++++++--------
 1 file changed, 37 insertions(+), 8 deletions(-)

Comments

Daniel Vetter Feb. 19, 2018, 11:19 a.m. UTC | #1
On Fri, Feb 09, 2018 at 05:35:51PM -0800, Hyun Kwon wrote:
> Use the inline kern-doc style for struct drm_format_info for better
> readability. This is just a preliminary change for further table update.
> 
> Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
> ---
> v3
> - This is added
> ---
> ---
>  include/drm/drm_fourcc.h | 45 +++++++++++++++++++++++++++++++++++++--------
>  1 file changed, 37 insertions(+), 8 deletions(-)
> 
> diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
> index 6942e84..b00bae4 100644
> --- a/include/drm/drm_fourcc.h
> +++ b/include/drm/drm_fourcc.h
> @@ -30,21 +30,50 @@ struct drm_mode_fb_cmd2;
>  
>  /**
>   * struct drm_format_info - information about a DRM format
> - * @format: 4CC format identifier (DRM_FORMAT_*)
> - * @depth: Color depth (number of bits per pixel excluding padding bits),
> - *	valid for a subset of RGB formats only. This is a legacy field, do not
> - *	use in new code and set to 0 for new formats.
> - * @num_planes: Number of color planes (1 to 3)
> - * @cpp: Number of bytes per pixel (per plane)
> - * @hsub: Horizontal chroma subsampling factor
> - * @vsub: Vertical chroma subsampling factor
>   */
>  struct drm_format_info {
> +	/**
> +	 * @format:
> +	 *
> +	 * 4CC format identifier (DRM_FORMAT_*)
> +	 */
>  	u32 format;
> +
> +	/**
> +	 * @depth:
> +	 *
> +	 * Color depth (number of bits per pixel excluding padding bits),
> +	 * valid for a subset of RGB formats only. This is a legacy field,
> +	 * do not use in new code and set to 0 for new formats.
> +	 */
>  	u8 depth;
> +
> +	/**
> +	 * @num_planes:
> +	 *
> +	 * Number of color planes (1 to 3)
> +	 */
>  	u8 num_planes;
> +
> +	/**
> +	 * @cpp:
> +	 *
> +	 * Number of bytes per pixel (per plane)
> +	 */
>  	u8 cpp[3];
> +
> +	/**
> +	 * @hsub:
> +	 *
> +	 * Horizontal chroma subsampling factor

Since we now have more space, I think it'd be good to clarify here that
this is only valid for YUV formats by adding:

"This is only valid for YUV format."

With that:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> +	 */
>  	u8 hsub;
> +
> +	/**
> +	 * @vsub:
> +	 *
> +	 * Vertical chroma subsampling factor
> +	 */
>  	u8 vsub;
>  };
>  
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
index 6942e84..b00bae4 100644
--- a/include/drm/drm_fourcc.h
+++ b/include/drm/drm_fourcc.h
@@ -30,21 +30,50 @@  struct drm_mode_fb_cmd2;
 
 /**
  * struct drm_format_info - information about a DRM format
- * @format: 4CC format identifier (DRM_FORMAT_*)
- * @depth: Color depth (number of bits per pixel excluding padding bits),
- *	valid for a subset of RGB formats only. This is a legacy field, do not
- *	use in new code and set to 0 for new formats.
- * @num_planes: Number of color planes (1 to 3)
- * @cpp: Number of bytes per pixel (per plane)
- * @hsub: Horizontal chroma subsampling factor
- * @vsub: Vertical chroma subsampling factor
  */
 struct drm_format_info {
+	/**
+	 * @format:
+	 *
+	 * 4CC format identifier (DRM_FORMAT_*)
+	 */
 	u32 format;
+
+	/**
+	 * @depth:
+	 *
+	 * Color depth (number of bits per pixel excluding padding bits),
+	 * valid for a subset of RGB formats only. This is a legacy field,
+	 * do not use in new code and set to 0 for new formats.
+	 */
 	u8 depth;
+
+	/**
+	 * @num_planes:
+	 *
+	 * Number of color planes (1 to 3)
+	 */
 	u8 num_planes;
+
+	/**
+	 * @cpp:
+	 *
+	 * Number of bytes per pixel (per plane)
+	 */
 	u8 cpp[3];
+
+	/**
+	 * @hsub:
+	 *
+	 * Horizontal chroma subsampling factor
+	 */
 	u8 hsub;
+
+	/**
+	 * @vsub:
+	 *
+	 * Vertical chroma subsampling factor
+	 */
 	u8 vsub;
 };