Message ID | 97f1d292-c3a8-f4d6-0651-b4f5571ecb72@i-love.sakura.ne.jp (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | [v2] tty: vt: always invoke vc->vc_sw->con_resize callback | expand |
On Sat, 15 May 2021, Tetsuo Handa wrote: > diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c > index 3406067985b1..22bb3892f6bd 100644 > --- a/drivers/video/fbdev/core/fbcon.c > +++ b/drivers/video/fbdev/core/fbcon.c > @@ -2019,7 +2019,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, > return -EINVAL; > > pr_debug("resize now %ix%i\n", var.xres, var.yres); > - if (con_is_visible(vc)) { > + if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { > var.activate = FB_ACTIVATE_NOW | > FB_ACTIVATE_FORCE; > fb_set_var(info, &var); LGTM, although I'll yet try to verify it with hardware. But it'll have to wait another week or so as I'm currently away from my lab and this requires physical presence. Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk> Maciej
On Sat, 15 May 2021, Maciej W. Rozycki wrote: > On Sat, 15 May 2021, Tetsuo Handa wrote: > > > diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c > > index 3406067985b1..22bb3892f6bd 100644 > > --- a/drivers/video/fbdev/core/fbcon.c > > +++ b/drivers/video/fbdev/core/fbcon.c > > @@ -2019,7 +2019,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, > > return -EINVAL; > > > > pr_debug("resize now %ix%i\n", var.xres, var.yres); > > - if (con_is_visible(vc)) { > > + if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { > > var.activate = FB_ACTIVATE_NOW | > > FB_ACTIVATE_FORCE; > > fb_set_var(info, &var); > > LGTM, although I'll yet try to verify it with hardware. But it'll have > to wait another week or so as I'm currently away from my lab and this > requires physical presence. NB I suggest that you request your change to be backported, i.e. post v3 with: Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org # v2.6.12+ Maciej
On Sat, May 15, 2021 at 9:33 AM Maciej W. Rozycki <macro@orcam.me.uk> wrote: > > NB I suggest that you request your change to be backported, i.e. post v3 > with: > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > Cc: stable@vger.kernel.org # v2.6.12+ I've applied it to my tree, but let's wait to see that it doesn't cause any issues before notifying the stable people. Linus
On Sat, May 15, 2021 at 6:42 PM Linus Torvalds <torvalds@linux-foundation.org> wrote: > > On Sat, May 15, 2021 at 9:33 AM Maciej W. Rozycki <macro@orcam.me.uk> wrote: > > > > NB I suggest that you request your change to be backported, i.e. post v3 > > with: > > > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > > Cc: stable@vger.kernel.org # v2.6.12+ > > I've applied it to my tree, but let's wait to see that it doesn't > cause any issues before notifying the stable people. Ah I missed all the fun with the long w/e. fwiw I think this looks very reasonable, see my other reply why I think this shouldn't cause issues. Especially when fbcon_resize only touches hw when in KD_TEXT mode. -Daniel
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 01645e87b3d5..fa1548d4f94b 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -1171,7 +1171,7 @@ static inline int resize_screen(struct vc_data *vc, int width, int height, /* Resizes the resolution of the display adapater */ int err = 0; - if (vc->vc_mode != KD_GRAPHICS && vc->vc_sw->con_resize) + if (vc->vc_sw->con_resize) err = vc->vc_sw->con_resize(vc, width, height, user); return err; diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 3406067985b1..22bb3892f6bd 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -2019,7 +2019,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, return -EINVAL; pr_debug("resize now %ix%i\n", var.xres, var.yres); - if (con_is_visible(vc)) { + if (con_is_visible(vc) && vc->vc_mode == KD_TEXT) { var.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; fb_set_var(info, &var);