mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 04:21:03 -04:00
drm/vkms: Document pixel_argb_u16
The meaning of each member of the structure was not specified. To clarify the format used and the reason behind those choices, add some documentation. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com> Link: https://lore.kernel.org/r/20250415-yuv-v18-1-f2918f71ec4b@bootlin.com Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
This commit is contained in:
@@ -45,6 +45,23 @@ struct vkms_frame_info {
|
||||
unsigned int rotation;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct pixel_argb_u16 - Internal representation of a pixel color.
|
||||
* @a: Alpha component value, stored in 16 bits, without padding, using
|
||||
* machine endianness
|
||||
* @r: Red component value, stored in 16 bits, without padding, using
|
||||
* machine endianness
|
||||
* @g: Green component value, stored in 16 bits, without padding, using
|
||||
* machine endianness
|
||||
* @b: Blue component value, stored in 16 bits, without padding, using
|
||||
* machine endianness
|
||||
*
|
||||
* The goal of this structure is to keep enough precision to ensure
|
||||
* correct composition results in VKMS and simplifying color
|
||||
* manipulation by splitting each component into its own field.
|
||||
* Caution: the byte ordering of this structure is machine-dependent,
|
||||
* you can't cast it directly to AR48 or xR48.
|
||||
*/
|
||||
struct pixel_argb_u16 {
|
||||
u16 a, r, g, b;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user