linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] vgacon: switch vgacon_scrolldelta() and vgacon_restore_screen()
       [not found] <20230712085942.5064-1-jirislaby@kernel.org>
@ 2023-07-12  8:59 ` Jiri Slaby (SUSE)
  2023-07-20  6:16   ` Helge Deller
  2023-07-12  8:59 ` [PATCH 2/7] vgacon: remove unneeded forward declarations Jiri Slaby (SUSE)
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-07-12  8:59 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby (SUSE), Helge Deller,
	linux-fbdev, dri-devel

Switch vgacon_scrolldelta() and vgacon_restore_screen() positions, so
that the former is not needed to be forward-declared.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/console/vgacon.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index e25ba523892e..fbed2862c317 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -142,12 +142,6 @@ static inline void vga_set_mem_top(struct vc_data *c)
 	write_vga(12, (c->vc_visible_origin - vga_vram_base) / 2);
 }
 
-static void vgacon_restore_screen(struct vc_data *c)
-{
-	if (c->vc_origin != c->vc_visible_origin)
-		vgacon_scrolldelta(c, 0);
-}
-
 static void vgacon_scrolldelta(struct vc_data *c, int lines)
 {
 	vc_scrolldelta_helper(c, lines, vga_rolled_over, (void *)vga_vram_base,
@@ -155,6 +149,12 @@ static void vgacon_scrolldelta(struct vc_data *c, int lines)
 	vga_set_mem_top(c);
 }
 
+static void vgacon_restore_screen(struct vc_data *c)
+{
+	if (c->vc_origin != c->vc_visible_origin)
+		vgacon_scrolldelta(c, 0);
+}
+
 static const char *vgacon_startup(void)
 {
 	const char *display_desc = NULL;
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/7] vgacon: remove unneeded forward declarations
       [not found] <20230712085942.5064-1-jirislaby@kernel.org>
  2023-07-12  8:59 ` [PATCH 1/7] vgacon: switch vgacon_scrolldelta() and vgacon_restore_screen() Jiri Slaby (SUSE)
@ 2023-07-12  8:59 ` Jiri Slaby (SUSE)
  2023-07-12  8:59 ` [PATCH 3/7] vgacon: remove unused xpos from vgacon_set_cursor_size() Jiri Slaby (SUSE)
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-07-12  8:59 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby (SUSE), Helge Deller,
	linux-fbdev, dri-devel

Most of the forward declarations in vgacon are not needed. Drop them.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/console/vgacon.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index fbed2862c317..a34cdfcc10c2 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -65,16 +65,8 @@ static struct vgastate vgastate;
  *  Interface used by the world
  */
 
-static const char *vgacon_startup(void);
-static void vgacon_init(struct vc_data *c, int init);
-static void vgacon_deinit(struct vc_data *c);
-static void vgacon_cursor(struct vc_data *c, int mode);
-static int vgacon_switch(struct vc_data *c);
-static int vgacon_blank(struct vc_data *c, int blank, int mode_switch);
-static void vgacon_scrolldelta(struct vc_data *c, int lines);
 static int vgacon_set_origin(struct vc_data *c);
-static void vgacon_save_screen(struct vc_data *c);
-static void vgacon_invert_region(struct vc_data *c, u16 * p, int count);
+
 static struct uni_pagedict *vgacon_uni_pagedir;
 static int vgacon_refcount;
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/7] vgacon: remove unused xpos from vgacon_set_cursor_size()
       [not found] <20230712085942.5064-1-jirislaby@kernel.org>
  2023-07-12  8:59 ` [PATCH 1/7] vgacon: switch vgacon_scrolldelta() and vgacon_restore_screen() Jiri Slaby (SUSE)
  2023-07-12  8:59 ` [PATCH 2/7] vgacon: remove unneeded forward declarations Jiri Slaby (SUSE)
@ 2023-07-12  8:59 ` Jiri Slaby (SUSE)
  2023-07-12  8:59 ` [PATCH 4/7] vgacon: let vgacon_doresize() return void Jiri Slaby (SUSE)
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-07-12  8:59 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby (SUSE), Helge Deller,
	linux-fbdev, dri-devel

xpos is unused, remove it.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/console/vgacon.c | 25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index a34cdfcc10c2..7cb15851ea56 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -437,7 +437,7 @@ static void vgacon_invert_region(struct vc_data *c, u16 * p, int count)
 	}
 }
 
-static void vgacon_set_cursor_size(int xpos, int from, int to)
+static void vgacon_set_cursor_size(int from, int to)
 {
 	unsigned long flags;
 	int curs, cure;
@@ -479,9 +479,9 @@ static void vgacon_cursor(struct vc_data *c, int mode)
 	case CM_ERASE:
 		write_vga(14, (c->vc_pos - vga_vram_base) / 2);
 	        if (vga_video_type >= VIDEO_TYPE_VGAC)
-			vgacon_set_cursor_size(c->state.x, 31, 30);
+			vgacon_set_cursor_size(31, 30);
 		else
-			vgacon_set_cursor_size(c->state.x, 31, 31);
+			vgacon_set_cursor_size(31, 31);
 		break;
 
 	case CM_MOVE:
@@ -489,8 +489,7 @@ static void vgacon_cursor(struct vc_data *c, int mode)
 		write_vga(14, (c->vc_pos - vga_vram_base) / 2);
 		switch (CUR_SIZE(c->vc_cursor_type)) {
 		case CUR_UNDERLINE:
-			vgacon_set_cursor_size(c->state.x,
-					       c->vc_cell_height -
+			vgacon_set_cursor_size(c->vc_cell_height -
 					       (c->vc_cell_height <
 						10 ? 2 : 3),
 					       c->vc_cell_height -
@@ -498,35 +497,31 @@ static void vgacon_cursor(struct vc_data *c, int mode)
 						10 ? 1 : 2));
 			break;
 		case CUR_TWO_THIRDS:
-			vgacon_set_cursor_size(c->state.x,
-					       c->vc_cell_height / 3,
+			vgacon_set_cursor_size(c->vc_cell_height / 3,
 					       c->vc_cell_height -
 					       (c->vc_cell_height <
 						10 ? 1 : 2));
 			break;
 		case CUR_LOWER_THIRD:
-			vgacon_set_cursor_size(c->state.x,
-					       (c->vc_cell_height * 2) / 3,
+			vgacon_set_cursor_size((c->vc_cell_height * 2) / 3,
 					       c->vc_cell_height -
 					       (c->vc_cell_height <
 						10 ? 1 : 2));
 			break;
 		case CUR_LOWER_HALF:
-			vgacon_set_cursor_size(c->state.x,
-					       c->vc_cell_height / 2,
+			vgacon_set_cursor_size(c->vc_cell_height / 2,
 					       c->vc_cell_height -
 					       (c->vc_cell_height <
 						10 ? 1 : 2));
 			break;
 		case CUR_NONE:
 			if (vga_video_type >= VIDEO_TYPE_VGAC)
-				vgacon_set_cursor_size(c->state.x, 31, 30);
+				vgacon_set_cursor_size(31, 30);
 			else
-				vgacon_set_cursor_size(c->state.x, 31, 31);
+				vgacon_set_cursor_size(31, 31);
 			break;
 		default:
-			vgacon_set_cursor_size(c->state.x, 1,
-					       c->vc_cell_height);
+			vgacon_set_cursor_size(1, c->vc_cell_height);
 			break;
 		}
 		break;
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/7] vgacon: let vgacon_doresize() return void
       [not found] <20230712085942.5064-1-jirislaby@kernel.org>
                   ` (2 preceding siblings ...)
  2023-07-12  8:59 ` [PATCH 3/7] vgacon: remove unused xpos from vgacon_set_cursor_size() Jiri Slaby (SUSE)
@ 2023-07-12  8:59 ` Jiri Slaby (SUSE)
  2023-07-12  8:59 ` [PATCH 5/7] vgacon: cache vc_cell_height in vgacon_cursor() Jiri Slaby (SUSE)
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-07-12  8:59 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby (SUSE), Helge Deller,
	linux-fbdev, dri-devel

The return value is neither used, nor vgacon_doresize() returns an
error. So change the reurn type to void.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/console/vgacon.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index 7cb15851ea56..07f6b97d9b81 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -528,7 +528,7 @@ static void vgacon_cursor(struct vc_data *c, int mode)
 	}
 }
 
-static int vgacon_doresize(struct vc_data *c,
+static void vgacon_doresize(struct vc_data *c,
 		unsigned int width, unsigned int height)
 {
 	unsigned long flags;
@@ -587,7 +587,6 @@ static int vgacon_doresize(struct vc_data *c,
 	}
 
 	raw_spin_unlock_irqrestore(&vga_lock, flags);
-	return 0;
 }
 
 static int vgacon_switch(struct vc_data *c)
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/7] vgacon: cache vc_cell_height in vgacon_cursor()
       [not found] <20230712085942.5064-1-jirislaby@kernel.org>
                   ` (3 preceding siblings ...)
  2023-07-12  8:59 ` [PATCH 4/7] vgacon: let vgacon_doresize() return void Jiri Slaby (SUSE)
@ 2023-07-12  8:59 ` Jiri Slaby (SUSE)
  2023-07-12  8:59 ` [PATCH 6/7] sticon: make sticon_set_def_font() void and remove op parameter Jiri Slaby (SUSE)
  2023-07-12  8:59 ` [PATCH 7/7] fbcon: remove unused display (p) from fbcon_redraw() Jiri Slaby (SUSE)
  6 siblings, 0 replies; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-07-12  8:59 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby (SUSE), Helge Deller,
	linux-fbdev, dri-devel

There are many places c->vc_cell_height is used in the code of
vgacon_cursor(). Caching the value to a local variable makes the code
much easier to follow.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/console/vgacon.c | 34 +++++++++++++++-------------------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index 07f6b97d9b81..7ad047bcae17 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -470,11 +470,15 @@ static void vgacon_set_cursor_size(int from, int to)
 
 static void vgacon_cursor(struct vc_data *c, int mode)
 {
+	unsigned int c_height;
+
 	if (c->vc_mode != KD_TEXT)
 		return;
 
 	vgacon_restore_screen(c);
 
+	c_height = c->vc_cell_height;
+
 	switch (mode) {
 	case CM_ERASE:
 		write_vga(14, (c->vc_pos - vga_vram_base) / 2);
@@ -489,30 +493,22 @@ static void vgacon_cursor(struct vc_data *c, int mode)
 		write_vga(14, (c->vc_pos - vga_vram_base) / 2);
 		switch (CUR_SIZE(c->vc_cursor_type)) {
 		case CUR_UNDERLINE:
-			vgacon_set_cursor_size(c->vc_cell_height -
-					       (c->vc_cell_height <
-						10 ? 2 : 3),
-					       c->vc_cell_height -
-					       (c->vc_cell_height <
-						10 ? 1 : 2));
+			vgacon_set_cursor_size(c_height -
+					       (c_height < 10 ? 2 : 3),
+					       c_height -
+					       (c_height < 10 ? 1 : 2));
 			break;
 		case CUR_TWO_THIRDS:
-			vgacon_set_cursor_size(c->vc_cell_height / 3,
-					       c->vc_cell_height -
-					       (c->vc_cell_height <
-						10 ? 1 : 2));
+			vgacon_set_cursor_size(c_height / 3, c_height -
+					       (c_height < 10 ? 1 : 2));
 			break;
 		case CUR_LOWER_THIRD:
-			vgacon_set_cursor_size((c->vc_cell_height * 2) / 3,
-					       c->vc_cell_height -
-					       (c->vc_cell_height <
-						10 ? 1 : 2));
+			vgacon_set_cursor_size(c_height * 2 / 3, c_height -
+					       (c_height < 10 ? 1 : 2));
 			break;
 		case CUR_LOWER_HALF:
-			vgacon_set_cursor_size(c->vc_cell_height / 2,
-					       c->vc_cell_height -
-					       (c->vc_cell_height <
-						10 ? 1 : 2));
+			vgacon_set_cursor_size(c_height / 2, c_height -
+					       (c_height < 10 ? 1 : 2));
 			break;
 		case CUR_NONE:
 			if (vga_video_type >= VIDEO_TYPE_VGAC)
@@ -521,7 +517,7 @@ static void vgacon_cursor(struct vc_data *c, int mode)
 				vgacon_set_cursor_size(31, 31);
 			break;
 		default:
-			vgacon_set_cursor_size(1, c->vc_cell_height);
+			vgacon_set_cursor_size(1, c_height);
 			break;
 		}
 		break;
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/7] sticon: make sticon_set_def_font() void and remove op parameter
       [not found] <20230712085942.5064-1-jirislaby@kernel.org>
                   ` (4 preceding siblings ...)
  2023-07-12  8:59 ` [PATCH 5/7] vgacon: cache vc_cell_height in vgacon_cursor() Jiri Slaby (SUSE)
@ 2023-07-12  8:59 ` Jiri Slaby (SUSE)
  2023-07-12  8:59 ` [PATCH 7/7] fbcon: remove unused display (p) from fbcon_redraw() Jiri Slaby (SUSE)
  6 siblings, 0 replies; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-07-12  8:59 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby (SUSE),
	James E.J. Bottomley, Helge Deller, linux-parisc, linux-fbdev,
	dri-devel

sticon_set_def_font() always returns 0, so make it void. And remove an
unused 'op' parameter.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/console/sticon.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c
index d11cfd2d68b5..992a4fa431aa 100644
--- a/drivers/video/console/sticon.c
+++ b/drivers/video/console/sticon.c
@@ -156,7 +156,7 @@ static bool sticon_scroll(struct vc_data *conp, unsigned int t,
     return false;
 }
 
-static int sticon_set_def_font(int unit, struct console_font *op)
+static void sticon_set_def_font(int unit)
 {
 	if (font_data[unit] != STI_DEF_FONT) {
 		if (--FNTREFCOUNT(font_data[unit]) == 0) {
@@ -165,8 +165,6 @@ static int sticon_set_def_font(int unit, struct console_font *op)
 		}
 		font_data[unit] = STI_DEF_FONT;
 	}
-
-	return 0;
 }
 
 static int sticon_set_font(struct vc_data *vc, struct console_font *op,
@@ -246,7 +244,7 @@ static int sticon_set_font(struct vc_data *vc, struct console_font *op,
 		  vc->vc_video_erase_char, font_data[vc->vc_num]);
 
 	/* delete old font in case it is a user font */
-	sticon_set_def_font(unit, NULL);
+	sticon_set_def_font(unit);
 
 	FNTREFCOUNT(cooked_font)++;
 	font_data[unit] = cooked_font;
@@ -264,7 +262,9 @@ static int sticon_set_font(struct vc_data *vc, struct console_font *op,
 
 static int sticon_font_default(struct vc_data *vc, struct console_font *op, char *name)
 {
-	return sticon_set_def_font(vc->vc_num, op);
+	sticon_set_def_font(vc->vc_num);
+
+	return 0;
 }
 
 static int sticon_font_set(struct vc_data *vc, struct console_font *font,
@@ -297,7 +297,7 @@ static void sticon_deinit(struct vc_data *c)
 
     /* free memory used by user font */
     for (i = 0; i < MAX_NR_CONSOLES; i++)
-	sticon_set_def_font(i, NULL);
+	sticon_set_def_font(i);
 }
 
 static void sticon_clear(struct vc_data *conp, int sy, int sx, int height,
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 7/7] fbcon: remove unused display (p) from fbcon_redraw()
       [not found] <20230712085942.5064-1-jirislaby@kernel.org>
                   ` (5 preceding siblings ...)
  2023-07-12  8:59 ` [PATCH 6/7] sticon: make sticon_set_def_font() void and remove op parameter Jiri Slaby (SUSE)
@ 2023-07-12  8:59 ` Jiri Slaby (SUSE)
  6 siblings, 0 replies; 8+ messages in thread
From: Jiri Slaby (SUSE) @ 2023-07-12  8:59 UTC (permalink / raw)
  To: gregkh
  Cc: linux-serial, linux-kernel, Jiri Slaby (SUSE), Daniel Vetter,
	Helge Deller, linux-fbdev, dri-devel

The parameter is unused.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/fbdev/core/fbcon.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index c6c9d040bdec..887fad44e7ec 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1612,8 +1612,7 @@ static void fbcon_redraw_blit(struct vc_data *vc, struct fb_info *info,
 	}
 }
 
-static void fbcon_redraw(struct vc_data *vc, struct fbcon_display *p,
-			 int line, int count, int offset)
+static void fbcon_redraw(struct vc_data *vc, int line, int count, int offset)
 {
 	unsigned short *d = (unsigned short *)
 	    (vc->vc_origin + vc->vc_size_row * line);
@@ -1827,7 +1826,7 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
 
 		case SCROLL_REDRAW:
 		      redraw_up:
-			fbcon_redraw(vc, p, t, b - t - count,
+			fbcon_redraw(vc, t, b - t - count,
 				     count * vc->vc_cols);
 			fbcon_clear(vc, b - count, 0, count, vc->vc_cols);
 			scr_memsetw((unsigned short *) (vc->vc_origin +
@@ -1913,7 +1912,7 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
 
 		case SCROLL_REDRAW:
 		      redraw_down:
-			fbcon_redraw(vc, p, b - 1, b - t - count,
+			fbcon_redraw(vc, b - 1, b - t - count,
 				     -count * vc->vc_cols);
 			fbcon_clear(vc, t, 0, count, vc->vc_cols);
 			scr_memsetw((unsigned short *) (vc->vc_origin +
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/7] vgacon: switch vgacon_scrolldelta() and vgacon_restore_screen()
  2023-07-12  8:59 ` [PATCH 1/7] vgacon: switch vgacon_scrolldelta() and vgacon_restore_screen() Jiri Slaby (SUSE)
@ 2023-07-20  6:16   ` Helge Deller
  0 siblings, 0 replies; 8+ messages in thread
From: Helge Deller @ 2023-07-20  6:16 UTC (permalink / raw)
  To: Jiri Slaby (SUSE), gregkh
  Cc: linux-serial, linux-kernel, linux-fbdev, dri-devel

On 7/12/23 10:59, Jiri Slaby (SUSE) wrote:
> Switch vgacon_scrolldelta() and vgacon_restore_screen() positions, so
> that the former is not needed to be forward-declared.
>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> Cc: Helge Deller <deller@gmx.de>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org

Thanks Jiri !
I've applied this series to the fbdev git tree.

Helge

> ---
>   drivers/video/console/vgacon.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
> index e25ba523892e..fbed2862c317 100644
> --- a/drivers/video/console/vgacon.c
> +++ b/drivers/video/console/vgacon.c
> @@ -142,12 +142,6 @@ static inline void vga_set_mem_top(struct vc_data *c)
>   	write_vga(12, (c->vc_visible_origin - vga_vram_base) / 2);
>   }
>
> -static void vgacon_restore_screen(struct vc_data *c)
> -{
> -	if (c->vc_origin != c->vc_visible_origin)
> -		vgacon_scrolldelta(c, 0);
> -}
> -
>   static void vgacon_scrolldelta(struct vc_data *c, int lines)
>   {
>   	vc_scrolldelta_helper(c, lines, vga_rolled_over, (void *)vga_vram_base,
> @@ -155,6 +149,12 @@ static void vgacon_scrolldelta(struct vc_data *c, int lines)
>   	vga_set_mem_top(c);
>   }
>
> +static void vgacon_restore_screen(struct vc_data *c)
> +{
> +	if (c->vc_origin != c->vc_visible_origin)
> +		vgacon_scrolldelta(c, 0);
> +}
> +
>   static const char *vgacon_startup(void)
>   {
>   	const char *display_desc = NULL;


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-07-20  6:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230712085942.5064-1-jirislaby@kernel.org>
2023-07-12  8:59 ` [PATCH 1/7] vgacon: switch vgacon_scrolldelta() and vgacon_restore_screen() Jiri Slaby (SUSE)
2023-07-20  6:16   ` Helge Deller
2023-07-12  8:59 ` [PATCH 2/7] vgacon: remove unneeded forward declarations Jiri Slaby (SUSE)
2023-07-12  8:59 ` [PATCH 3/7] vgacon: remove unused xpos from vgacon_set_cursor_size() Jiri Slaby (SUSE)
2023-07-12  8:59 ` [PATCH 4/7] vgacon: let vgacon_doresize() return void Jiri Slaby (SUSE)
2023-07-12  8:59 ` [PATCH 5/7] vgacon: cache vc_cell_height in vgacon_cursor() Jiri Slaby (SUSE)
2023-07-12  8:59 ` [PATCH 6/7] sticon: make sticon_set_def_font() void and remove op parameter Jiri Slaby (SUSE)
2023-07-12  8:59 ` [PATCH 7/7] fbcon: remove unused display (p) from fbcon_redraw() Jiri Slaby (SUSE)

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).