]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vkms: add XRGB planes composition
authorMelissa Wen <melissa.srw@gmail.com>
Sat, 24 Apr 2021 08:25:31 +0000 (05:25 -0300)
committerMelissa Wen <melissa.srw@gmail.com>
Thu, 29 Apr 2021 21:52:34 +0000 (18:52 -0300)
commit37ad9af6c7b8624d1940e08d5212f53702cb32a4
treeb9349fa912c33b2db07c819286f564e5f42e6aaf
parent63ca3eb3cc8d9b5b53f376fb94f443856d8cc153
drm/vkms: add XRGB planes composition

Add support for composing XRGB888 planes in addition to the ARGB8888
format. In the case of an XRGB plane at the top, the composition consists
of copying the RGB values of a pixel from src to dst and clearing alpha
channel, without the need for alpha blending operations for each pixel.

Blend equations assume a completely opaque background, i.e., primary plane
is not cleared before pixel blending but alpha channel is explicitly
opaque (a = 0xff). Also, there is room for performance evaluation in
switching pixel blend operation according to the plane format.

v4:
- clear alpha channel (0xff) after blend color values by pixel
- improve comments on blend ops to reflect the current state
- describe in the commit message future improvements for plane composition

Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/07bcf4643d11da9480599fe1b165e478bff58b25.1619250933.git.melissa.srw@gmail.com
drivers/gpu/drm/vkms/vkms_composer.c
drivers/gpu/drm/vkms/vkms_plane.c