linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fbcon: Fix accelerated fbdev scrolling while logo is still shown
@ 2022-06-02 20:08 Helge Deller
  2022-06-08 16:12 ` Daniel Vetter
  0 siblings, 1 reply; 2+ messages in thread
From: Helge Deller @ 2022-06-02 20:08 UTC (permalink / raw)
  To: linux-fbdev, dri-devel

There is no need to directly skip over to the SCROLL_REDRAW case while
the logo is still shown.

When using DRM, this change has no effect because the code will reach
the SCROLL_REDRAW case immediately anyway.

But if you run an accelerated fbdev driver and have
FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION enabled, console scrolling is
slowed down by factors so that it feels as if you use a 9600 baud
terminal.

So, drop those unnecessary checks and speed up fbdev console
acceleration during bootup.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org

diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index c2f9e5711c39..8eb5b73e98bc 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1706,8 +1706,6 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
 	case SM_UP:
 		if (count > vc->vc_rows)	/* Maximum realistic size */
 			count = vc->vc_rows;
-		if (logo_shown >= 0)
-			goto redraw_up;
 		switch (fb_scrollmode(p)) {
 		case SCROLL_MOVE:
 			fbcon_redraw_blit(vc, info, p, t, b - t - count,
@@ -1796,8 +1794,6 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
 	case SM_DOWN:
 		if (count > vc->vc_rows)	/* Maximum realistic size */
 			count = vc->vc_rows;
-		if (logo_shown >= 0)
-			goto redraw_down;
 		switch (fb_scrollmode(p)) {
 		case SCROLL_MOVE:
 			fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,

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

* Re: [PATCH] fbcon: Fix accelerated fbdev scrolling while logo is still shown
  2022-06-02 20:08 [PATCH] fbcon: Fix accelerated fbdev scrolling while logo is still shown Helge Deller
@ 2022-06-08 16:12 ` Daniel Vetter
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2022-06-08 16:12 UTC (permalink / raw)
  To: Helge Deller; +Cc: linux-fbdev, dri-devel

On Thu, Jun 02, 2022 at 10:08:38PM +0200, Helge Deller wrote:
> There is no need to directly skip over to the SCROLL_REDRAW case while
> the logo is still shown.
> 
> When using DRM, this change has no effect because the code will reach
> the SCROLL_REDRAW case immediately anyway.
> 
> But if you run an accelerated fbdev driver and have
> FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION enabled, console scrolling is
> slowed down by factors so that it feels as if you use a 9600 baud
> terminal.
> 
> So, drop those unnecessary checks and speed up fbdev console
> acceleration during bootup.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> Cc: stable@vger.kernel.org

I'm not entirely sure this is 100% perfect, but I don't think it'll make
anything worse, so

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

I'm assuming you'll push this to drm-misc-fixes? I pinged drm-misc
maintainers to make sure that tree is forwarded to -rc1.
-Daniel

> 
> diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> index c2f9e5711c39..8eb5b73e98bc 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
> @@ -1706,8 +1706,6 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
>  	case SM_UP:
>  		if (count > vc->vc_rows)	/* Maximum realistic size */
>  			count = vc->vc_rows;
> -		if (logo_shown >= 0)
> -			goto redraw_up;
>  		switch (fb_scrollmode(p)) {
>  		case SCROLL_MOVE:
>  			fbcon_redraw_blit(vc, info, p, t, b - t - count,
> @@ -1796,8 +1794,6 @@ static bool fbcon_scroll(struct vc_data *vc, unsigned int t, unsigned int b,
>  	case SM_DOWN:
>  		if (count > vc->vc_rows)	/* Maximum realistic size */
>  			count = vc->vc_rows;
> -		if (logo_shown >= 0)
> -			goto redraw_down;
>  		switch (fb_scrollmode(p)) {
>  		case SCROLL_MOVE:
>  			fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

end of thread, other threads:[~2022-06-08 16:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-02 20:08 [PATCH] fbcon: Fix accelerated fbdev scrolling while logo is still shown Helge Deller
2022-06-08 16:12 ` Daniel Vetter

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