drm/format-helper: Optimize 32-to-16-bpp conversion
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 28 Mar 2025 14:15:03 +0000 (15:15 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 1 Apr 2025 13:35:23 +0000 (15:35 +0200)
commit3f31a017ddbca3812247dd6332c21686caf864de
treebe700205b09815c599a259304c63af7953cb6429
parent58523a25cbf728695e374fd90416d9bd4a68d4c0
drm/format-helper: Optimize 32-to-16-bpp conversion

For ease of implementation, existing line-conversion functions
for 16-bit formats write each pixel individually. Optimize the
performance by writing multiple pixels in single 64-bit and 32-bit
stores.

v2:
- simplify address calculation (Jani)
- fix typo in commit message (Jocelyn)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://lore.kernel.org/r/20250328141709.217283-8-tzimmermann@suse.de
drivers/gpu/drm/drm_format_helper.c