Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [High] Removing the sysfb swap quirk breaks display rotation on Lenovo D330 
systems with older BIOS versions.
--

commit f8f13abb4b89a4b4aa3805bfd4d2f46d356e038c
Author: Thomas Zimmermann <[email protected]>

firmware/sysfb: Remove rotation quirk for Lenovo D330

This commit removes the sysfb width/height swap quirk for the Lenovo D330.
It notes that the quirk breaks the display geometry on the tested firmware,
but acknowledges the behavior might depend on the BIOS release and advises
users to update their firmware to avoid issues.

> diff --git a/drivers/firmware/efi/sysfb_efi.c 
> b/drivers/firmware/efi/sysfb_efi.c
> index 685283bb7327a..2338de73c62c9 100644
> --- a/drivers/firmware/efi/sysfb_efi.c
> +++ b/drivers/firmware/efi/sysfb_efi.c
> @@ -301,15 +301,6 @@ static const struct dmi_system_id 
> efifb_dmi_swap_width_height[] __initconst = {
>               },
>               .callback = efifb_swap_width_height,
>       },
> -     {
> -             /* Lenovo D330 with 800x1280 or 1200x1920 portrait screen */
> -             .matches = {
> -                     DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> -                     DMI_EXACT_MATCH(DMI_PRODUCT_VERSION,
> -                                     "Lenovo ideapad D330-10IGM"),
> -             },
> -             .callback = efifb_swap_width_height,
> -     },

[Severity: High]
Does unconditionally removing this quirk cause a regression for users on
older BIOS versions?

If a user boots a Lenovo D330-10IGM with an older BIOS that incorrectly
reports a landscape resolution (e.g., 1280x800) for a portrait-stride
hardware setup, removing this dynamic swap leaves the dimensions uncorrected.

For drivers like simpledrm (which do not use EDID) or even efidrm (where the
framebuffer geometry is derived from the uncorrected si->lfb_width and
si->lfb_height), this will result in complete display corruption due to
mismatched strides.

Since the kernel has a strict policy against regressions, advising users to
update their firmware to fix a kernel-introduced regression might not be
sufficient.

Could this be fixed by keeping the quirk but conditionally applying the swap
inside efifb_swap_width_height() only if si->lfb_width > si->lfb_height?
This approach might fix the geometry for newer BIOS releases without breaking
the older ones.

>       {
>               /*
>                * Lenovo IdeaPad Duet 3 10IGL5 and 10IGL5-LTE with

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=1

Reply via email to