简体   繁体   中英

Windows Mirror Driver for Linux Framebuffer

for a software i'm writing i need to know when the linux framebuffer gets updated. I need something like Windows Mirror Drivers (for more infos look Mirror_driver on wikipedia).

Looking around i haven't finded anything, so i'm looking a way to accomplish this.

From what i've seen, i need to write a module that gets loaded after framebuffer specific module and that hooks fb ops structure to inject own stuff and catch updates.

Can someone give me an hint? I don't have much experience with kernel module writing.

Thank you!

For general kernel module writing tips, you can read the books: Linux Kernel Development , Linux Kernel in a Nutshell and Linux Device Drivers .

After you understand the basics on how to build & install your own kernel modules, you can read the source code of the kernel to figure out where the framebuffer stuff is (start at Documentation/fb/framebuffer.txt). I'm not sure whether you can just hook up on the framebuffer driver like that, if not, you might need to add the hook support yourself or 'hijack' the main driver's events to simulate hooking. For example, suppose that there's a function that is called whenever there's an update. You find where the pointer to this function is declared, save the value, then modify it with a pointer to your function. Inside your function you call the original function, then your own code to manipulate what you want and return properly.

I don't know much about the framebuffer stuff, so I'm just guessing what your options are. It's possible that there might be a discussion list somewhere specific to the subject of linux-fb. This might me a good start .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM