]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions
authorLouis Chauvet <louis.chauvet@bootlin.com>
Mon, 18 Nov 2024 18:28:18 +0000 (19:28 +0100)
committerLouis Chauvet <louis.chauvet@bootlin.com>
Fri, 22 Nov 2024 13:00:06 +0000 (14:00 +0100)
commitb21b580e57924ce1e58cb15f96566f3a52af216d
treee6ef3209914f5938c55a22f09f2095a39e4f6515
parent2f9741ac3b94c5f4418cd727d232ae0590b8ef1a
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>
drivers/gpu/drm/vkms/vkms_drv.h
drivers/gpu/drm/vkms/vkms_formats.c
drivers/gpu/drm/vkms/vkms_formats.h
drivers/gpu/drm/vkms/vkms_plane.c