armbian_build/patch/misc/0001-Revert-fbdev-fbcon-Properly-revert-changes-when-vc_r.patch
Igor Pečovnik 814017affa
Clean boot logo patches (#4155)
Tested building on 5.15.y and 5.19.y
2022-09-05 11:12:48 +02:00

75 lines
2.3 KiB
Diff

From 34329038e08a285761f74d454c2a050788b9323c Mon Sep 17 00:00:00 2001
From: Igor Pecovnik <igor.pecovnik@gmail.com>
Date: Mon, 5 Sep 2022 08:37:35 +0200
Subject: [PATCH] Revert "fbdev: fbcon: Properly revert changes when
vc_resize() failed"
This reverts commit f08ccb792d3eaf1dc62d8cbf6a30d6522329f660.
---
drivers/video/fbdev/core/fbcon.c | 27 ++-------------------------
1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 2efaed36a3ad..b89075f3b6ab 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -2402,21 +2402,15 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount,
struct fb_info *info = fbcon_info_from_console(vc->vc_num);
struct fbcon_ops *ops = info->fbcon_par;
struct fbcon_display *p = &fb_display[vc->vc_num];
- int resize, ret, old_userfont, old_width, old_height, old_charcount;
+ int resize;
char *old_data = NULL;
resize = (w != vc->vc_font.width) || (h != vc->vc_font.height);
if (p->userfont)
old_data = vc->vc_font.data;
vc->vc_font.data = (void *)(p->fontdata = data);
- old_userfont = p->userfont;
if ((p->userfont = userfont))
REFCOUNT(data)++;
-
- old_width = vc->vc_font.width;
- old_height = vc->vc_font.height;
- old_charcount = vc->vc_font.charcount;
-
vc->vc_font.width = w;
vc->vc_font.height = h;
vc->vc_font.charcount = charcount;
@@ -2432,9 +2426,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount,
rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
cols /= w;
rows /= h;
- ret = vc_resize(vc, cols, rows);
- if (ret)
- goto err_out;
+ vc_resize(vc, cols, rows);
} else if (con_is_visible(vc)
&& vc->vc_mode == KD_TEXT) {
fbcon_clear_margins(vc, 0);
@@ -2444,21 +2436,6 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, int charcount,
if (old_data && (--REFCOUNT(old_data) == 0))
kfree(old_data - FONT_EXTRA_WORDS * sizeof(int));
return 0;
-
-err_out:
- p->fontdata = old_data;
- vc->vc_font.data = (void *)old_data;
-
- if (userfont) {
- p->userfont = old_userfont;
- REFCOUNT(data)--;
- }
-
- vc->vc_font.width = old_width;
- vc->vc_font.height = old_height;
- vc->vc_font.charcount = old_charcount;
-
- return ret;
}
/*
--
2.34.1