Re: m68k: trying accessing fb memory
angelo <[email protected]>
| Newsgroups | gmane.linux.uclinux.devel |
|---|---|
| Message-ID | <[email protected]> |
Dear Lambert, well i finally managed to use smem_start to access memory, and for screen refresh i have to some ioctl, since i need to refresh some square areas for sprites dislpay. Many Thanks Best Regards Angelo On 13/12/2012 23:07, Gavin Lambert wrote: > Quoth angelo: >> Seems that for my case (m68k-nommu) it is not defined, so none of the >> get_unmapped_area will be called, in any place. > > It doesn't need to be defined. fbmem.c implements get_unmapped_area > regardless (just slightly differently in each case). If you had actually > tried just setting smem_start as I said you should have seen it working. > >> thanks, i tried your solution, works, i am able to write on the lcd >> video memory using mmap() on /dev/mem, but there is still the issue of >> refreshing the lcd i am driving. > > Without an MMU, there is no way to get a callback when an application writes > directly to framebuffer memory. If your device requires you to take some > action beyond just updating the memory (eg. sending some kind of extra > command) then you will either need to use an ioctl to request a screen > refresh each time the app finishes drawing (which only works if you are in > control of the app's code) or to use some other mechanism to detect when the > framebuffer memory has been changed. > > Another LCD driver I have creates a shadow copy of the framebuffer and has a > worker thread periodically compare the main framebuffer and the shadow > buffer; whenever it finds a difference it copies it to the shadow buffer and > updates the LCD. It's a bit crude, and it limits the frame rate to whatever > rate the worker thread runs at, but it works. > -- _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev