drm/vkms: Add kernel-doc to the function vkms_compose_row()
PATCH 1/2 drm/vkms: Add kernel-doc to the function vkms_compose_row()
The function vkms_compose_row() was introduced in the code without any documentation. In order to make the function more clear, add a kernel-doc to it.
--- drivers/gpu/drm/vkms/vkms_formats.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpu/drm/vkms/vkms_formats.c +13 -0
@@ -111,6 +111,19 @@ static void RGB565_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 *out_pixel) out_pixel->b =drm_fixp2int (drm_fixp_mul (fp_b, fp_rb_ratio)); } +/** +* vkms_compose_row - compose a single row of a plane +* @stage_buffer: output line with the composed pixels +* @plane: state of the plane that is being composed +* @y: y coordinate of the row +* +* This function composes a single row of a plane. It gets the source pixels +* through the y coordinate (see get_packed_src_addr()) and goes linearly +* through the source pixel, reading the pixels and converting it to +* ARGB16161616 (see the pixel_read() callback). For rotate-90 and rotate-270, +* the source pixels are not traversed linearly. The source pixels are queried +* on each iteration in order to traverse the pixels vertically. +*/ void vkms_compose_row (struct line_buffer *stage_buffer,struct vkms_plane_state *plane,int y) {struct pixel_argb_u16 *out_pixels = stage_buffer->pixels;
Signature · 1 line
2.40.1
PATCH 2/2 drm/vkms: Fix all kernel-doc warnings of the vkms_composer file
Fix the following warnings:
drivers/gpu/drm/vkms/vkms_composer.c:42: warning: Function parameter or member 'frame_info' not described in 'pre_mul_alpha_blend' drivers/gpu/drm/vkms/vkms_composer.c:42: warning: Excess function parameter 'src_frame_info' description in 'pre_mul_alpha_blend' drivers/gpu/drm/vkms/vkms_composer.c:93: warning: Cannot understand * @wb_frame_info: The writeback frame buffer metadata
on line 93 - I thought it was a doc line
by correcting variable names and adding function name.
--- drivers/gpu/drm/vkms/vkms_composer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/vkms/vkms_composer.c +4 -2
@@ -23,7 +23,7 @@ static u16 pre_mul_blend_channel(u16 src, u16 dst, u16 alpha)/** * pre_mul_alpha_blend - alpha blending equation -* @src_frame_info: source framebuffer's metadata +* @frame_info: Source framebuffer's metadata * @stage_buffer: The line with the pixels from src_plane * @output_buffer: A line buffer that receives all the blends output *
@@ -90,11 +90,13 @@ static void fill_background(const struct pixel_argb_u16 *background_color, }/** -* @wb_frame_info: The writeback frame buffer metadata +* blend - blend the pixels from all planes and compute crc +* @wb: The writeback frame buffer metadata * @crtc_state: The crtc state * @crc32: The crc output of the final frame * @output_buffer: A buffer of a row that will receive the result of the blend(s) * @stage_buffer: The line with the pixels from plane being blend to the output +* @row_size: The size, in bytes, of a single row * * This function blends the pixels (Using the `pre_mul_alpha_blend`) * from all planes, calculates the crc32 of the output from the former step,
Signature · 1 line
2.40.1
Re: [PATCH 2/2] drm/vkms: Fix all kernel-doc warnings of the vkms_composer file
Maíra Canal <[email protected]> writes:
Hello Maíra,
Quoted 11 lines
Fix the following warnings:
drivers/gpu/drm/vkms/vkms_composer.c:42: warning: Function parameter or member 'frame_info' not described in 'pre_mul_alpha_blend'drivers/gpu/drm/vkms/vkms_composer.c:42: warning: Excess function parameter 'src_frame_info' description in 'pre_mul_alpha_blend'drivers/gpu/drm/vkms/vkms_composer.c:93: warning: Cannot understand * @wb_frame_info: The writeback frame buffer metadata
on line 93 - I thought it was a doc lineby correcting variable names and adding function name.
Signed-off-by Maíra Canal <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Maíra Canal <[email protected]> writes:
Hello Maíra,
Quoted 7 lines
The function
vkms_compose_row()was introduced in the code without any documentation. In order to make the function more clear, add a kernel-doc to it.Suggested-by Melissa Wen <[email protected]>Signed-off-by Maíra Canal <[email protected]>---
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat