]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/vkms: Update pixels accessor to support packed and multi-plane formats.
authorLouis Chauvet <louis.chauvet@bootlin.com>
Mon, 18 Nov 2024 18:28:20 +0000 (19:28 +0100)
committerLouis Chauvet <louis.chauvet@bootlin.com>
Fri, 22 Nov 2024 13:00:07 +0000 (14:00 +0100)
commitd6dc39e495678d54a8125e1ae08b3ca35c306426
treed6fdd567f0d4ffd03f3ecf991a239b8eacdeaeb1
parent51091b4ab257887d9ab79d93078b7989abeeda6f
drm/vkms: Update pixels accessor to support packed and multi-plane formats.

Introduce the usage of block_h/block_w to compute the offset and the
pointer of a pixel. The previous implementation was specialized for
planes with block_h == block_w == 1. To avoid confusion and allow easier
implementation of tiled formats. It also remove the usage of the
deprecated format field `cpp`.

Introduce the plane_index parameter to get an offset/pointer on a
different plane.

Acked-by: Maíra Canal <mairacanal@riseup.net>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241118-yuv-v14-5-2dbc2f1e222c@bootlin.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
drivers/gpu/drm/vkms/vkms_formats.c