How should I update the screen in an fbdev driver?

Dávid Virág virag.david003 at gmail.com
Sat May 29 20:44:45 EDT 2021


Hi!

I am working on trying to figure out how an Android phone's display works
by modifying the original driver, so I can understand how it works to write
a less cluttered, and more non-Android distro friendly driver.

What I noticed is that a register needs to be set in order for the screen
to update (I guess there's some kind of internal double buffering going on
in the background). I couldn't find a way for it to update automatically,
so for now I included the code that sets the register in a VSync thread
created originally to let the android HAL know that a VSync IRQ has
occurred or a timeout has passed.

I feel like this isn't what the solution should be. While looking around I
found the fb_sync function. I thought that sounds like that refresh
register should be set there, so I moved the code in fb_sync and I added it
to the fb_ops struct. Now the display only refreshes on the first frame of
the fbcon, replacing the phone's bootloader logo with the console. What am
I doing wrong? How is this supposed to be handled?

Btw I am using a 4.4 kernel fork, since that's the only kernel that ever
shipped with the phone or the SoC, and there's no mainline support for it
yet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20210530/0e0bf90b/attachment.html>


More information about the Kernelnewbies mailing list