Writing to /dev/fb0

John-Mark Gurney jmg at funkthat.com
Thu Jul 18 13:17:21 UTC 2019


Sergey Manucharian wrote this message on Mon, Jun 24, 2019 at 15:33 -0600:
> Excerpts from Sergey Manucharian's message from Fri 21-Jun-19 13:34:
> > Excerpts from Oleksandr Tymoshenko's message from Fri 21-Jun-19 12:05:
> > > You probably can convert this source file from my tslib branch to
> > > standalone app:
> > > 
> > > https://github.com/gonzoua/tslib/blob/freebsd/tests/fbutils-bsd.c
> > > 
> > I added "main" and it draws a red rectangle!
> > 
> > int main (int argc, char** argv)
> > {       
> >         
> >         open_framebuffer();
> >         setcolor (4, 0xff0000);
> >         rect(100, 200, 200, 300, 4);
> >         close_framebuffer();
> > }
> 
> As I already mentioned, these messages
> 
>   WARNING: Device driver fb has set "memattr" inconsistently (drv 0 pmap 3).
> 
> flood console. So, the actual performance is very poor because of that, 
> thus the framebuffer is practically unusable.
> 
> The message comes from:
> 
>   sys/vm/device_pager.c
> 
> I tried to understand the purpose of the corresponding commit:
> 
> https://lists.freebsd.org/pipermail/svn-src-head/2016-May/085608.html
> https://reviews.freebsd.org/D6149
> 
> However, I don't understand how to eliminate that, how to deal with the
> "memattr". Disabling the message itself in "sys/vm/device_pager.c"
> significantly improves the performance.
> 
> Would anybody advise please?

Looks like those messages need to be rate limited...  There's
counter_ratecheck and ratecheck functions that can be used to easily
fix this..

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-arm mailing list