On Fri, Nov 13, 2009 at 03:11:48PM +0100, René Kolařík wrote: > Hi > > i am trying to customize framebuffer drivers and i have some questions... > > Please can you give me an advice? > > 1) If I define my own imageblit function, how do I call it? Or is it called automatically? It is called automatically (if it is registered in fb_ops structure) from kernel console. It is not possible to call it from userspace. > 2) I have gpu connected via pci to cpu. I did mmap and have > framebuffer mapped in for example "uchar * data". I have loop and > iterating through some pixel data and do data[i] = pixel[i]. Does this > lead to transmitting via PCI in style - transmit byte ... end ... > transmit byte ... end ... etc? Probably yes, perhaps there is some write combining according to MTRR registers. > 3)what is the difference bethween mmap framebuffer and write to mapped > pointer and calling write() to descriptor previously obtained by open()? The first variant is much faster - video RAM is directly mapped to userspace address space, therefore there is no kernel interaction during writes (in usual fbdev drivers). -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."