From: sashiko-bot@kernel.org
To: "Thomas Zimmermann" <tzimmermann@suse.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] fbcon: Provide a single implementation of fbcon_set_rotation()
Date: Thu, 26 Nov 2026 16:36:00 +0000 [thread overview]
Message-ID: <sashiko-outbox-235924@kernel.org> (raw)
In-Reply-To: <20261126163150.91355-3-tzimmermann@suse.de>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] fbcon: unrotated mode fallback clobbered by set_blitting_type()
[1]
--
commit b31c406a9ea618e6fff12f41e21bd7c311a16303
Author: Thomas Zimmermann <tzimmermann@suse.de>
fbcon: Provide a single implementation of fbcon_set_rotation()
This commit merges the CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y and =n
implementations of fbcon_set_rotation() into a single function calling
fbcon_display_rotation().
> diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> index 7bd51b9f4fe13..fd89465b0754e 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
[ ... ]
> @@ -281,6 +267,13 @@ static void fbcon_rotate_all(struct fb_info *info, u32 rotate)
> }
> #endif /* CONFIG_FRAMEBUFFER_CONSOLE_ROTATION */
>
> +static void fbcon_set_rotation(struct fb_info *info)
> +{
> + struct fbcon_par *par = info->fbcon_par;
> +
> + par->rotate = fbcon_display_rotation(info, par->p);
> +}
> +
[Severity: High]
This problem wasn't introduced by this patch, but doesn't
fbcon_set_rotation() clobber the unrotated fallback when font rotation
allocation fails [1]?
When par->bitops->rotate_font() fails in fbcon_switch(), fbcon_init() or
fbcon_modechanged(), the caller falls back to unrotated mode by setting
par->rotate = FB_ROTATE_UR and calling set_blitting_type():
drivers/video/fbdev/core/fbcon.c:fbcon_switch() {
...
if (par->bitops->rotate_font && par->bitops->rotate_font(info, vc)) {
par->rotate = FB_ROTATE_UR;
set_blitting_type(vc, info);
}
...
}
set_blitting_type() then calls fbcon_set_rotation(info) followed by
fbcon_set_bitops(par), which overwrites par->rotate with
fbcon_display_rotation(info, par->p) (derived from par->p->con_rotate)
and reinstalls the rotated bitops without an allocated rotated font
buffer, leaving the console blank.
[1] https://sashiko.dev/#/bug/linux-752875af-5863-44fb-8a6c-f76bb439e2f3
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126163150.91355-1-tzimmermann@suse.de?part=2
prev parent reply other threads:[~2026-11-26 16:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 16:23 [PATCH 0/2] fbcon: Fix segfault on re-orientation Thomas Zimmermann
2026-11-26 16:23 ` [PATCH 1/2] fbcon: Don't change shared blitting state for hidden consoles Thomas Zimmermann
2026-11-26 16:53 ` sashiko-bot
2026-11-26 16:23 ` [PATCH 2/2] fbcon: Provide a single implementation of fbcon_set_rotation() Thomas Zimmermann
2026-11-26 16:36 ` sashiko-bot [this message]
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=sashiko-outbox-235924@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tzimmermann@suse.de \
/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