Message ID | 20181019105752.17741-2-alexandru-cosmin.gheorghe@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Add method to describe tile/bit_level_packed formats | expand |
On Fri, Oct 19, 2018 at 11:57:44AM +0100, Alexandru Gheorghe wrote: > In-line member documentation seems to be desired way of documenting > structure members. > > This change had been suggested by Daniel Vetter here: > https://lists.freedesktop.org/archives/dri-devel/2018-October/192176.html > > Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> Thanks! Maxime
Hi Maxime, Thanks for the review, pushed the patch to drm-misc-next. On Fri, Oct 19, 2018 at 02:54:18PM +0200, Maxime Ripard wrote: > On Fri, Oct 19, 2018 at 11:57:44AM +0100, Alexandru Gheorghe wrote: > > In-line member documentation seems to be desired way of documenting > > structure members. > > > > This change had been suggested by Daniel Vetter here: > > https://lists.freedesktop.org/archives/dri-devel/2018-October/192176.html > > > > Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> > > Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com> > > Thanks! > Maxime > > -- > Maxime Ripard, Bootlin > Embedded Linux and Kernel engineering > https://bootlin.com
diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h index 865ef60c17af..345f11227e9e 100644 --- a/include/drm/drm_fourcc.h +++ b/include/drm/drm_fourcc.h @@ -52,25 +52,35 @@ 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 - * @has_alpha: Does the format embeds an alpha component? - * @is_yuv: Is it a YUV format? */ 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; + + /** @has_alpha: Does the format embeds an alpha component? */ bool has_alpha; + + /** @is_yuv: Is it a YUV format? */ bool is_yuv; };
In-line member documentation seems to be desired way of documenting structure members. This change had been suggested by Daniel Vetter here: https://lists.freedesktop.org/archives/dri-devel/2018-October/192176.html Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> --- include/drm/drm_fourcc.h | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-)