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

"Arnd Bergmann" <[email protected]>
Newsgroups gmane.linux.ports.ia64,gmane.linux.ports.sh.devel,gmane.comp.video.dri.devel,gmane.linux.ports.mips,gmane.linux.kernel.efi,gmane.linux.ports.sparc,gmane.linux.ports.hexagon,gmane.linux.ports.arm.kernel,gmane.linux.kernel,gmane.linux.ports.riscv,gmane.linux.ports.alpha,gmane.linux.ports.ppc64.devel
Message-ID <[email protected]>
On Wed, Jul 19, 2023, at 15:49, Philippe Mathieu-Daudé wrote:
> On 19/7/23 14:39, Arnd Bergmann wrote:

>> @@ -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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.