drm/ofdrm: Support big-endian scanout buffers
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 11 Oct 2022 15:07:12 +0000 (17:07 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 14 Oct 2022 07:51:12 +0000 (09:51 +0200)
commitd405bc2c3d82126f58e143708af55105876cf6af
tree673584a0aa9678a79fc02c3886e44ac1a55e2009
parent4bbb9061081c49ded4908c7716a03f7faf4eb65d
drm/ofdrm: Support big-endian scanout buffers

All DRM formats assume little-endian byte order. On big-endian systems,
it is likely that the scanout buffer is in big endian as well. Update
the format accordingly and add endianness conversion to the format-helper
library. Also opt-in to allocated buffers in host format by default.

Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221011150712.3928-6-tzimmermann@suse.de
drivers/gpu/drm/drm_format_helper.c
drivers/gpu/drm/tiny/ofdrm.c