summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorMaíra Canal <mcanal@igalia.com>2023-05-09 01:00:29 +0300
committerMaíra Canal <mairacanal@riseup.net>2023-06-20 02:40:09 +0300
commitd755cd3cffe52a4b64c926f4e680d2e2a6edcd94 (patch)
treecf604248fb7eab470185f6d6390edf78c2bb5f8d /drivers/gpu/drm
parent042aeecc02c83500ad5a4de1e40d2efdfed49a07 (diff)
downloadlinux-d755cd3cffe52a4b64c926f4e680d2e2a6edcd94.tar.xz
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. Suggested-by: Melissa Wen <mwen@igalia.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Maíra Canal <mairacanal@riseup.net> Link: https://patchwork.freedesktop.org/patch/msgid/20230508220030.434118-1-mcanal@igalia.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/vkms/vkms_formats.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_formats.c b/drivers/gpu/drm/vkms/vkms_formats.c
index 5945da0beba6..542100041049 100644
--- a/drivers/gpu/drm/vkms/vkms_formats.c
+++ b/drivers/gpu/drm/vkms/vkms_formats.c
@@ -111,6 +111,19 @@ static void RGB565_to_argb_u16(u8 *src_pixels, struct pixel_argb_u16 *out_pixel)
out_pixel->b = drm_fixp2int_round(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;