summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vkms/vkms_plane.c
diff options
context:
space:
mode:
authorLouis Chauvet <louis.chauvet@bootlin.com>2024-11-18 19:28:18 +0100
committerLouis Chauvet <louis.chauvet@bootlin.com>2024-11-22 14:00:06 +0100
commitb21b580e57924ce1e58cb15f96566f3a52af216d (patch)
treee6ef3209914f5938c55a22f09f2095a39e4f6515 /drivers/gpu/drm/vkms/vkms_plane.c
parent2f9741ac3b94c5f4418cd727d232ae0590b8ef1a (diff)
drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions
Introduce two typedefs: pixel_read_t and pixel_write_t. It allows the compiler to check if the passed functions take the correct arguments. Such typedefs will help ensuring consistency across the code base in case of update of these prototypes. Rename input/output variable in a consistent way between read_line and write_line. A warn has been added in get_pixel_*_function to alert when an unsupported pixel format is requested. As those formats are checked before atomic_update callbacks, it should never happen. Document for those typedefs. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com> Reviewed-by: José Expósito <jose.exposito89@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-3-2dbc2f1e222c@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Diffstat (limited to 'drivers/gpu/drm/vkms/vkms_plane.c')
-rw-r--r--drivers/gpu/drm/vkms/vkms_plane.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
index 5e97d7f6ddaba..c5fd58bfd6206 100644
--- a/drivers/gpu/drm/vkms/vkms_plane.c
+++ b/drivers/gpu/drm/vkms/vkms_plane.c
@@ -125,7 +125,7 @@ static void vkms_plane_atomic_update(struct drm_plane *plane,
drm_rect_rotate(&frame_info->rotated, drm_rect_width(&frame_info->rotated),
drm_rect_height(&frame_info->rotated), frame_info->rotation);
- vkms_plane_state->pixel_read = get_pixel_conversion_function(fmt);
+ vkms_plane_state->pixel_read = get_pixel_read_function(fmt);
}
static int vkms_plane_atomic_check(struct drm_plane *plane,