linux/drivers/firmware
Pierre Asselin 1b617bc931 firmware/sysfb: Fix VESA format selection
Some legacy BIOSes report no reserved bits in their 32-bit rgb mode,
breaking the calculation of bits_per_pixel in  commit f35cd3fa77
("firmware/sysfb: Fix EFI/VESA format selection").  However they report
lfb_depth correctly for those modes.  Keep the computation but
set bits_per_pixel to lfb_depth if the latter is larger.

v2 fixes the warnings from a max3() macro with arguments of different
types;  split the bits_per_pixel assignment to avoid uglyfing the code
with too many typecasts.

v3 fixes space and formatting blips pointed out by Javier, and change
the bit_per_pixel assignment back to a single statement using two casts.

v4 go back to v2 and use max_t()

Signed-off-by: Pierre Asselin <pa@panix.com>
Fixes: f35cd3fa77 ("firmware/sysfb: Fix EFI/VESA format selection")
Link: https://lore.kernel.org/r/4Psm6B6Lqkz1QXM@panix3.panix.com
Link: https://lore.kernel.org/r/20230412150225.3757223-1-javierm@redhat.com
Tested-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230419044834.10816-1-pa@panix.com
2023-04-21 14:27:31 +02:00
..
arm_ffa driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00
arm_scmi firmware: arm_scmi: Use the bitmap API to allocate bitmaps 2023-03-08 15:24:15 +00:00
broadcom firmware/nvram: bcm47xx: support init from IO memory 2022-11-09 10:27:10 -08:00
cirrus firmware: cs_dsp: Switch to using namespaced exports 2022-11-25 14:36:56 +00:00
efi efi/libstub: randomalloc: Return EFI_OUT_OF_RESOURCES on failure 2023-03-23 15:15:45 +01:00
google Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
imx firmware: imx: scu-pd: add missed USB_1_PHY pd 2022-10-24 10:05:27 +08:00
meson firmware: meson_sm: stop using 0 as NULL pointer 2023-01-10 15:21:13 +01:00
psci cpuidle: drivers: firmware: psci: Dont instrument suspend code 2023-01-31 15:01:45 +01:00
smccc printk: stop including cache.h from printk.h 2022-05-13 07:20:07 -07:00
tegra tegra: mark BPMP driver as little-endian only 2022-11-23 14:21:23 +01:00
xilinx firmware: xilinx: don't make a sleepable memory allocation from an atomic context 2023-03-09 18:00:31 +01:00
arm_scpi.c firmware: arm_scpi: Ensure scpi_info is not assigned if the probe fails 2022-07-04 14:28:42 +01:00
arm_sdei.c ACPI: APEI: explicit init of HEST and GHES in apci_init() 2022-03-03 20:24:22 +01:00
dmi_scan.c firmware: dmi: Fortify entry point length checks 2022-09-23 14:53:14 +02:00
dmi-id.c driver core: make struct class.dev_uevent() take a const * 2022-11-24 17:12:15 +01:00
dmi-sysfs.c firmware: dmi-sysfs: Fix null-ptr-deref in dmi_sysfs_register_handle 2023-01-20 14:27:40 +01:00
edd.c edd: simplify the check of 'attr->test' in edd_populate_dir() 2022-05-19 18:57:04 +02:00
iscsi_ibft_find.c
iscsi_ibft.c
Kconfig sound updates for 5.19-rc1 2022-05-25 16:55:16 -07:00
Makefile Follow-up tweaks for the EFI changes in v5.19 2022-06-03 13:39:30 -07:00
memmap.c firmware: memmap: use default_groups in kobj_type 2022-01-05 19:17:29 +01:00
mtk-adsp-ipc.c firmware: mediatek: Use meaningful names for mbox 2022-06-22 13:39:30 +01:00
pcdp.c
pcdp.h
qcom_scm-legacy.c firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ 2023-02-08 19:15:16 -08:00
qcom_scm-smc.c firmware: qcom_scm: Move qcom_scm.h to include/linux/firmware/qcom/ 2023-02-08 19:15:16 -08:00
qcom_scm.c firmware: qcom: scm: fix bogus irq error at probe 2023-03-09 13:58:22 -08:00
qcom_scm.h firmware: qcom: scm: Add wait-queue handling logic 2023-01-18 21:14:40 -06:00
qemu_fw_cfg.c firmware: qemu_fw_cfg: remove sysfs entries explicitly 2022-01-14 18:50:52 -05:00
raspberrypi.c Char/Misc driver changes for 6.2-rc1 2022-12-16 03:49:24 -08:00
scpi_pm_domain.c
stratix10-rsu.c firmware: stratix10-rsu: extend RSU driver to get DCMF status 2022-07-14 16:55:09 +02:00
stratix10-svc.c firmware: stratix10-svc: fix error handle while alloc/add device failed 2023-01-20 13:05:48 +01:00
sysfb_simplefb.c firmware/sysfb: Fix VESA format selection 2023-04-21 14:27:31 +02:00
sysfb.c efi: sysfb_efi: Fix DMI quirks not working for simpledrm 2023-03-18 11:44:57 +01:00
ti_sci.c firmware: ti_sci: Use devm_bitmap_zalloc when applicable 2022-11-03 21:45:10 -05:00
ti_sci.h
trusted_foundations.c
turris-mox-rwtm.c hwrng: core - treat default_quality as a maximum and default to 1024 2022-11-18 16:59:34 +08:00