Re: [PATCH v2 5/9] vgacon: remove screen_info dependency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Phil Mathieu-Daudé <philmd@xxxxxxxxxx>, "Arnd Bergmann" <arnd@xxxxxxxxxx>, linux-fbdev@xxxxxxxxxxxxxxx, "Thomas Zimmermann" <tzimmermann@xxxxxxx>, "Helge Deller" <deller@xxxxxx>, "Javier Martinez Canillas" <javierm@xxxxxxxxxx>
- Subject: Re: [PATCH v2 5/9] vgacon: remove screen_info dependency
- From: "Arnd Bergmann" <arnd@xxxxxxxx>
- Date: Wed, 19 Jul 2023 16:38:57 +0200
- Cc: linux-hyperv@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, "Catalin Marinas" <catalin.marinas@xxxxxxx>, "Linus Walleij" <linus.walleij@xxxxxxxxxx>, "Dave Hansen" <dave.hansen@xxxxxxxxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, "Max Filippov" <jcmvbkbc@xxxxxxxxx>, "Will Deacon" <will@xxxxxxxxxx>, linux-efi@xxxxxxxxxxxxxxx, guoren <guoren@xxxxxxxxxx>, "linux-csky@xxxxxxxxxxxxxxx" <linux-csky@xxxxxxxxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, "WANG Xuerui" <kernel@xxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, "Dave Airlie" <airlied@xxxxxxxxx>, "Ard Biesheuvel" <ardb@xxxxxxxxxx>, "Wei Liu" <wei.liu@xxxxxxxxxx>, "Huacai Chen" <chenhuacai@xxxxxxxxxx>, "Dexuan Cui" <decui@xxxxxxxxxxxxx>, "Russell King" <linux@xxxxxxxxxxxxxxx>, "Deepak Rawat" <drawat.floss@xxxxxxxxx>, "Ingo Molnar" <mingo@xxxxxxxxxx>, "Matt Turner" <mattst88@xxxxxxxxx>, "Haiyang Zhang" <haiyangz@xxxxxxxxxxxxx>, "Nicholas Piggin" <npiggin@xxxxxxxxx>, "Borislav Petkov" <bp@xxxxxxxxx>, loongarch@xxxxxxxxxxxxxxx, "John Paul Adrian Glaubitz" <glaubitz@xxxxxxxxxxxxxxxxxxx>, "Thomas Gleixner" <tglx@xxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, "Khalid Aziz" <khalid@xxxxxxxxxxxxxx>, "Brian Cain" <bcain@xxxxxxxxxxx>, "Thomas Bogendoerfer" <tsbogend@xxxxxxxxxxxxxxxx>, "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, "Dinh Nguyen" <dinguyen@xxxxxxxxxx>, linux-riscv@xxxxxxxxxxxxxxxxxxx, "Palmer Dabbelt" <palmer@xxxxxxxxxxx>, "Daniel Vetter" <daniel@xxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, "David S . Miller" <davem@xxxxxxxxxxxxx>
- Feedback-id: i56a14606:Fastmail
- In-reply-to: <32595080-dd79-5cf0-46e7-b82d0df8f067@linaro.org>
- References: <20230719123944.3438363-1-arnd@kernel.org> <20230719123944.3438363-6-arnd@kernel.org> <32595080-dd79-5cf0-46e7-b82d0df8f067@linaro.org>
- User-agent: Cyrus-JMAP/3.9.0-alpha0-531-gfdfa13a06d-fm-20230703.001-gfdfa13a0
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
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]