Skip to content
Commit 55f8f625 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Rajeshkumar Ramasamy
Browse files

drm/format-helper: Add RGB888-to-XRGB8888 conversion

commit 6311dbc63bc198b63d5e9f89b8d2e893c090e0ce from
https://nv-tegra.nvidia.com/r/3rdparty/canonical/linux-jammy.git

 jetson_36.3

Add a format helper that converts RGB888 to XRGB8888. Use this
function in drm_fb_blit_toio(). Fixes simpledrm output for this
combination of formats.

UEFI and/or Grub will usually set 32-bit output in XRGB8888 format.
The issue can be reproduced by enabling simpledrm and requesting a
console framebuffer of different format on the kernel command line;
for example

  nomodeset video=1024x768-24

In this case, conversion helpers will display nothing on the console.
The patch makes this work by implementing the rsp conversion helpers.
It also enables odd userspace configurations, such as running Xorg
with 24-bit color depth on a 32-bit output buffer.

v2:
	* use helpers for struct drm_rect (Javier)
	* improve commit message (Javier)

Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220425075939.30450-3-tzimmermann@suse.de


(cherry picked from commit 26c30f22)
Change-Id: Ieb440fa7f05f3b3fa3d94f8137b4545bf1e1063f
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-jammy/+/2985841


Reviewed-by: default avatarsvcacv <svcacv@nvidia.com>
Reviewed-by: default avatarJonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Signed-off-by: default avatarRajeshkumar Ramasamy <rajeshkumar.ramasamy@windriver.com>
parent 9e44da6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment