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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
> 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@xxxxxxxx>

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

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux