From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Alper Nebi Yasak <alpernebiyasak@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH AUTOSEL 6.2 25/64] firmware: coreboot: framebuffer: Ignore reserved pixel color bits
Date: Fri, 3 Mar 2023 16:40:27 -0500 [thread overview]
Message-ID: <20230303214106.1446460-25-sashal@kernel.org> (raw)
In-Reply-To: <20230303214106.1446460-1-sashal@kernel.org>
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
[ Upstream commit e6acaf25cba14661211bb72181c35dd13b24f5b3 ]
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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/firmware/google/framebuffer-coreboot.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/firmware/google/framebuffer-coreboot.c b/drivers/firmware/google/framebuffer-coreboot.c
index c6dcc1ef93acf..c323a818805cc 100644
--- a/drivers/firmware/google/framebuffer-coreboot.c
+++ b/drivers/firmware/google/framebuffer-coreboot.c
@@ -43,9 +43,7 @@ static int framebuffer_probe(struct coreboot_device *dev)
fb->green_mask_pos == formats[i].green.offset &&
fb->green_mask_size == formats[i].green.length &&
fb->blue_mask_pos == formats[i].blue.offset &&
- fb->blue_mask_size == formats[i].blue.length &&
- fb->reserved_mask_pos == formats[i].transp.offset &&
- fb->reserved_mask_size == formats[i].transp.length)
+ fb->blue_mask_size == formats[i].blue.length)
pdata.format = formats[i].name;
}
if (!pdata.format)
--
2.39.2
next prev parent reply other threads:[~2023-03-03 21:44 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-03 21:40 [PATCH AUTOSEL 6.2 01/64] IB/hfi1: Update RMT size calculation Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 02/64] iommu: Remove deferred attach check from __iommu_detach_device() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 03/64] iommu/amd: Fix error handling for pdev_pri_ats_enable() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 04/64] PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 05/64] media: uvcvideo: Remove format descriptions Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 06/64] media: uvcvideo: Handle cameras with invalid descriptors Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 07/64] media: uvcvideo: Handle errors from calls to usb_string Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 08/64] media: uvcvideo: Quirk for autosuspend in Logitech B910 and C910 Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 09/64] media: uvcvideo: Silence memcpy() run-time false positive warnings Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 10/64] USB: fix memory leak with using debugfs_lookup() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 11/64] cacheinfo: Fix shared_cpu_map to handle shared caches at different levels Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 12/64] usb: fotg210: List different variants Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 13/64] dt-bindings: usb: Add device id for Genesys Logic hub controller Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 14/64] staging: emxx_udc: Add checks for dma_alloc_coherent() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 15/64] tty: fix out-of-bounds access in tty_driver_lookup_tty() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 16/64] tty: serial: fsl_lpuart: disable the CTS when send break signal Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 17/64] serial: sc16is7xx: setup GPIO controller later in probe Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 18/64] mei: bus-fixup:upon error print return values of send and receive Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 19/64] parport_pc: Set up mode and ECR masks for Oxford Semiconductor devices Sasha Levin
2023-03-22 23:16 ` Maciej W. Rozycki
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 20/64] tools/iio/iio_utils:fix memory leak Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 21/64] bus: mhi: ep: Fix the debug message for MHI_PKT_TYPE_RESET_CHAN_CMD cmd Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 22/64] iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 23/64] iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 24/64] media: uvcvideo: Add GUID for BGRA/X 8:8:8:8 Sasha Levin
2023-03-03 21:40 ` Sasha Levin [this message]
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 26/64] soundwire: bus_type: Avoid lockdep assert in sdw_drv_probe() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 27/64] PCI/portdrv: Prevent LS7A Bus Master clearing on shutdown Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 28/64] PCI: loongson: Prevent LS7A MRRS increases Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 29/64] staging: pi433: fix memory leak with using debugfs_lookup() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 30/64] USB: dwc3: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 31/64] USB: chipidea: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 32/64] USB: ULPI: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 33/64] USB: uhci: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 34/64] USB: sl811: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 35/64] USB: fotg210: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 36/64] USB: isp116x: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 37/64] USB: isp1362: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 38/64] USB: gadget: gr_udc: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 39/64] USB: gadget: bcm63xx_udc: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 40/64] USB: gadget: lpc32xx_udc: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 41/64] USB: gadget: pxa25x_udc: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 42/64] USB: gadget: pxa27x_udc: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 43/64] usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 44/64] USB: ene_usb6250: Allocate enough memory for full object Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 45/64] usb: uvc: Enumerate valid values for color matching Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 46/64] usb: gadget: uvc: Make bSourceID read/write Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 47/64] PCI: Align extra resources for hotplug bridges properly Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 48/64] PCI: Take other bus devices into account when distributing resources Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 49/64] PCI: Distribute available resources for root buses, too Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 50/64] tty: pcn_uart: fix memory leak with using debugfs_lookup() Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 51/64] misc: vmw_balloon: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 52/64] drivers: base: component: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 53/64] drivers: base: dd: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 54/64] kernel/time/test_udelay.c: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 55/64] kernel/power/energy_model.c: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 56/64] kernel/fail_function: " Sasha Levin
2023-03-03 21:40 ` [PATCH AUTOSEL 6.2 57/64] PCI: loongson: Add more devices that need MRRS quirk Sasha Levin
2023-03-03 21:41 ` [PATCH AUTOSEL 6.2 58/64] PCI: Add ACS quirk for Wangxun NICs Sasha Levin
2023-03-03 21:41 ` [PATCH AUTOSEL 6.2 59/64] PCI: pciehp: Add Qualcomm quirk for Command Completed erratum Sasha Levin
2023-03-03 21:41 ` [PATCH AUTOSEL 6.2 60/64] phy: rockchip-typec: Fix unsigned comparison with less than zero Sasha Levin
2023-03-03 21:41 ` [PATCH AUTOSEL 6.2 61/64] RDMA/cma: Distinguish between sockaddr_in and sockaddr_in6 by size Sasha Levin
2023-03-03 21:41 ` [PATCH AUTOSEL 6.2 62/64] iommu: Attach device group to old domain in error path Sasha Levin
2023-03-03 21:41 ` [PATCH AUTOSEL 6.2 63/64] soundwire: cadence: Remove wasted space in response_buf Sasha Levin
2023-03-03 21:41 ` [PATCH AUTOSEL 6.2 64/64] soundwire: cadence: Drain the RX FIFO after an IO timeout Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230303214106.1446460-25-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alpernebiyasak@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox