Thread (27 messages) 27 messages, 9 authors, 2023-07-24

Re: [PATCH v2 5/9] vgacon: remove screen_info dependency

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2023-07-19 14:40:10
Also in: dri-devel, linux-alpha, linux-efi, linux-hyperv, linux-mips, linux-riscv, linux-sh, linuxppc-dev, lkml, loongarch, sparclinux

On Wed, Jul 19, 2023, at 15:49, Philippe Mathieu-Daudé wrote:
On 19/7/23 14:39, Arnd Bergmann wrote:
quoted
@@ -1074,13 +1077,13 @@ static int vgacon_resize(struct vc_data *c, unsigned int width,
  		 * Ho ho!  Someone (svgatextmode, eh?) may have reprogrammed
  		 * the video mode!  Set the new defaults then and go away.
  		 */
-		screen_info.orig_video_cols = width;
-		screen_info.orig_video_lines = height;
+		vga_si->orig_video_cols = width;
+		vga_si->orig_video_lines = height;
  		vga_default_font_height = c->vc_cell_height;
  		return 0;
  	}
-	if (width % 2 || width > screen_info.orig_video_cols ||
-	    height > (screen_info.orig_video_lines * vga_default_font_height)/
+	if (width % 2 || width > vga_si->orig_video_cols ||
+	    height > (vga_si->orig_video_lines * vga_default_font_height)/
  	    c->vc_cell_height)
  		return -EINVAL;
  
@@ -1110,8 +1113,8 @@ static void vgacon_save_screen(struct vc_data *c)
  		 * console initialization routines.
  		 */
  		vga_bootup_console = 1;
-		c->state.x = screen_info.orig_x;
-		c->state.y = screen_info.orig_y;
+		c->state.x = vga_si->orig_x;
+		c->state.y = vga_si->orig_y;
Not really my area, so bare with me if this is obviously not
possible :) If using DUMMY_CONSOLE, can we trigger a save_screen
/ resize? If so, we'd reach here with vga_si=NULL.
I think it cannot happen because the only way that anything calls
into vgacon.c is through the "conswitchp = &vga_con;" that now happens
at the same time as the "vga_si = &screen_info;". It's definitely
possible that I'm missing something as well here.

     Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help