From: Thomas Zimmermann <tzimmermann@suse.de>
To: Tvrtko Ursulin <tursulin@igalia.com>, dri-devel@lists.freedesktop.org
Cc: kernel-dev@igalia.com, Tvrtko Ursulin <tvrtko.ursulin@igalia.com>,
Ard Biesheuvel <ardb@kernel.org>, Melissa Wen <mwen@igalia.com>,
linux-efi@vger.kernel.org
Subject: Re: [PATCH v5 2/4] efi: sysfb_efi: Fix lfb_linelength calculation when applying quirks
Date: Tue, 9 Dec 2025 07:20:00 +0100 [thread overview]
Message-ID: <39776fc1-9b8f-4dd4-bccd-db58f843d86b@suse.de> (raw)
In-Reply-To: <20251208193925.7449-3-tursulin@igalia.com>
Am 08.12.25 um 20:39 schrieb Tvrtko Ursulin:
> From: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
>
> PIXEL_BIT_MASK formats can have either less or more than four bytes per
> pixel so lets fix the lfb_linelenght calculation when applying the
> swapped width and height quirks.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> Suggested-by: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Ard Biesheuvel <ardb@kernel.org>
> Cc: Melissa Wen <mwen@igalia.com>
> Cc: linux-efi@vger.kernel.org
> Tested-by: Melissa Wen <mwen@igalia.com> # v3
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/firmware/efi/sysfb_efi.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/sysfb_efi.c b/drivers/firmware/efi/sysfb_efi.c
> index 1d8b6966731c..60495eb3441c 100644
> --- a/drivers/firmware/efi/sysfb_efi.c
> +++ b/drivers/firmware/efi/sysfb_efi.c
> @@ -357,8 +357,11 @@ __init void sysfb_apply_efi_quirks(void)
>
> if (screen_info.orig_video_isVGA == VIDEO_TYPE_EFI &&
> dmi_check_system(efifb_dmi_swap_width_height)) {
> + u32 bpp = __screen_info_lfb_bits_per_pixel(&screen_info);
> +
> swap(screen_info.lfb_width, screen_info.lfb_height);
> - screen_info.lfb_linelength = 4 * screen_info.lfb_width;
> + screen_info.lfb_linelength = bpp * screen_info.lfb_width /
> + BITS_PER_BYTE;
> }
> }
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2025-12-09 6:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 19:39 [PATCH v5 0/4] EFI fbcon fixes etc Tvrtko Ursulin
2025-12-08 19:39 ` [PATCH v5 1/4] efi: sysfb_efi: Replace open coded swap with the macro Tvrtko Ursulin
2025-12-08 19:39 ` [PATCH v5 2/4] efi: sysfb_efi: Fix lfb_linelength calculation when applying quirks Tvrtko Ursulin
2025-12-09 6:20 ` Thomas Zimmermann [this message]
2025-12-08 19:39 ` [PATCH v5 3/4] efi: sysfb_efi: Convert swap width and height quirk to a callback Tvrtko Ursulin
2025-12-08 19:39 ` [PATCH v5 4/4] efi: sysfb_efi: Fix efidrmfb and simpledrmfb on Valve Steam Deck Tvrtko Ursulin
2025-12-09 2:05 ` [PATCH v5 0/4] EFI fbcon fixes etc Ard Biesheuvel
2025-12-16 13:24 ` Ard Biesheuvel
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=39776fc1-9b8f-4dd4-bccd-db58f843d86b@suse.de \
--to=tzimmermann@suse.de \
--cc=ardb@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=linux-efi@vger.kernel.org \
--cc=mwen@igalia.com \
--cc=tursulin@igalia.com \
--cc=tvrtko.ursulin@igalia.com \
/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;
as well as URLs for NNTP newsgroup(s).