[PATCH 3/3] fbcon: use __iowrite{32/64} to speedup the framebuffer console scrolling

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Mar 10 05:58:06 PST 2017


On 08:00 Fri 10 Mar     , Sascha Hauer wrote:
> On Thu, Mar 09, 2017 at 11:31:11AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > this devide the time by 4 on x86
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> > ---
> >  drivers/video/fbconsole.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
> > index b261f1704..b5e951e23 100644
> > --- a/drivers/video/fbconsole.c
> > +++ b/drivers/video/fbconsole.c
> > @@ -6,6 +6,7 @@
> >  #include <gui/image_renderer.h>
> >  #include <gui/graphic_utils.h>
> >  #include <linux/font.h>
> > +#include <linux/io.h>
> >  
> >  enum state_t {
> >  	LIT,				/* Literal input */
> > @@ -202,7 +203,7 @@ static void printchar(struct fbc_priv *priv, int c)
> >  
> >  		buf = gui_screen_render_buffer(priv->sc);
> >  
> > -		memcpy(buf, buf + line_height, line_height * priv->rows);
> > +		__iowrite64_copy(buf, buf + line_height, (line_height * priv->rows) >> 2);
> 
> Shouldn't this be >> 3?
yeah should be 3
> 
> Besides, I'm not sure using __iowrite64_copy is the right weapon here.
> Maybe better port arch/x86/lib/memcpy_64.S to get an optimized memcpy?
we need to test the performance

but as far as I remember __iowrite was kicker on ARM at least

Best Regards,
J.
> 
> Sascha
> 
> 
> -- 
> Pengutronix e.K.                           |                             |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
> Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list