]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/vkms: Create helpers macro to avoid code duplication in format callbacks
authorLouis Chauvet <louis.chauvet@bootlin.com>
Thu, 3 Jul 2025 07:56:57 +0000 (09:56 +0200)
committerLouis Chauvet <louis.chauvet@bootlin.com>
Fri, 5 Sep 2025 17:57:16 +0000 (19:57 +0200)
commit544f161a88af0370ced87783246418aed63b619c
treec82e5159af442b62bbed704d60f6815a078af483
parent0d2902dfa31535c08d4976995d5b6890a8f43399
drm/vkms: Create helpers macro to avoid code duplication in format callbacks

The callback functions for line conversion are almost identical for
some format. The generic READ_LINE macro generate all the required
boilerplate to process a line.

Two overrides of this macro have been added to avoid duplication of
the same arguments every time.

Reviewed-by: MaĆ­ra Canal <mcanal@igalia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Link: https://lore.kernel.org/r/20250703-b4-new-color-formats-v7-1-15fd8fd2e15c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
drivers/gpu/drm/vkms/vkms_formats.c