Ubuntu-focal-kernel/drivers/firmware
Alper Nebi Yasak f2838a4fca firmware: coreboot: framebuffer: Ignore reserved pixel color bits
BugLink: https://bugs.launchpad.net/bugs/2017706

commit e6acaf25cba14661211bb72181c35dd13b24f5b3 upstream.

The coreboot framebuffer doesn't support transparency, its 'reserved'
bit field is merely padding for byte/word alignment of pixel colors [1].
When trying to match the framebuffer to a simplefb format, the kernel
driver unnecessarily requires the format's transparency bit field to
exactly match this padding, even if the former is zero-width.

Due to a coreboot bug [2] (fixed upstream), some boards misreport the
reserved field's size as equal to its position (0x18 for both on a
'Lick' Chromebook), and the driver fails to probe where it would have
otherwise worked fine with e.g. the a8r8g8b8 or x8r8g8b8 formats.

Remove the transparency comparison with reserved bits. When the
bits-per-pixel and other color components match, transparency will
already be in a subset of the reserved field. Not forcing it to match
reserved bits allows the driver to work on the boards which misreport
the reserved field. It also enables using simplefb formats that don't
have transparency bits, although this doesn't currently happen due to
format support and ordering in linux/platform_data/simplefb.h.

[1] https://review.coreboot.org/plugins/gitiles/coreboot/+/4.19/src/commonlib/include/commonlib/coreboot_tables.h#255
[2] https://review.coreboot.org/plugins/gitiles/coreboot/+/4.13/src/drivers/intel/fsp2_0/graphics.c#82

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/r/20230122190433.195941-1-alpernebiyasak@gmail.com
Cc: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2023-05-12 17:15:08 +02:00
..
arm_scmi firmware: arm_scmi: Add SCMI PM driver remove routine 2022-11-24 10:29:16 +01:00
broadcom
efi efi: Accept version 2 of memory attributes table 2023-04-18 17:21:00 +02:00
google firmware: coreboot: framebuffer: Ignore reserved pixel color bits 2023-05-12 17:15:08 +02:00
imx
meson
psci arm/arm64: smccc/psci: add arm_smccc_1_1_get_conduit() 2022-05-20 15:17:35 +02:00
tegra
xilinx
Kconfig
Makefile
arm_scpi.c firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-10-17 15:01:31 +02:00
arm_sdei.c
dmi-id.c
dmi-sysfs.c firmware: dmi-sysfs: Fix memory leak in dmi_sysfs_register_handle 2022-08-26 11:08:58 +02:00
dmi_scan.c
edd.c
iscsi_ibft.c
iscsi_ibft_find.c
memmap.c
pcdp.c
pcdp.h
qcom_scm-32.c
qcom_scm-64.c
qcom_scm.c
qcom_scm.h
qemu_fw_cfg.c firmware: qemu_fw_cfg: fix kobject leak in probe error path 2022-03-07 16:35:12 +01:00
raspberrypi.c
scpi_pm_domain.c firmware: arm_scpi: Fix string overflow in SCPI genpd driver 2022-03-07 16:33:58 +01:00
stratix10-rsu.c
stratix10-svc.c firmware: stratix10-svc: fix a missing check on list iterator 2022-08-26 11:08:51 +02:00
ti_sci.c
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c