Frame buffer Data Access inside the kernel

Hi all,

I am new to this Frame buffer device , My module needs to access the
frame buffer data and send it to the USB via the bulk end point.

Is there any way to access the frame buffer data from my module and
how the frame buffer driver gets notified the page flip event ?

My module need to send the frame buffer data to USB BULK end point
whenever a page flip has occurred.

Please help me out in finding some pointers about this.

I have googled lot but no luck.

Thanks in advance

Venky.

well, you could just look into the frame buffer driver source code.
And there is a "page flip" ioctl, you will sure find where it ends up
in the frame buffer driver.

I didn't find any ioctl related to page flip, but whenever there is a
need for page flip the respective function from the driver
"pan_display()" called and do the actual page flip. I have
implemented even handler at this pace so that my module gets informed
whenever there is a page flip, but could you please point me from how
can I access the frame buffer data from this point.

I browse the frame buffer source code and found out that

registered_fb(index) will return the pointer for struct fb_info ,
through fb_info you can access frame buffer starting address like
this fb_info->fix.smem_start ,from where I can scrap the frame buffer
data.

Now I can take the frame buffer data and successfully transimit to the
host PC over USB BULK end point , but wondering how to display rather
decode this data on the my PC to get the actual window displayed.

Any pointers on this ?

Thanks & Regards,
Venkat.

You can display using X vnc server… if you don´t care about refresh rate…

2010/7/30 venkatraju <venkat.rajuece@gmail.com>

Thanks for your suggestion I looked in to Xvnc application in android
found the below.....

Xvnc server involves network overhead for transferring the frame
buffer data and here in my case, I could able to transfer the frame
buffer data over USB bulk end point and I need a simple application
to display it .

Considering the performance I have implemented a module to scrape
the frame buffer data at the kernel level so that I can use the DMA
which is fast enough to send the data over USB BULK end point.

XVnc is completely at the user level and I think can't be Idle for the
current situation .

Anyways thanks for your advice.

venkatraju wrote:

I browse the frame buffer source code and found out that

registered_fb(index) will return the pointer for struct fb_info ,
through fb_info you can access frame buffer starting address like
this fb_info->fix.smem_start ,from where I can scrap the frame buffer
data.

Now I can take the frame buffer data and successfully transimit to the
host PC over USB BULK end point , but wondering how to display rather
decode this data on the my PC to get the actual window displayed.

decode? there is nothing to decode, you are getting the raw RGB(A)
values from the frame buffer. depending on your setup you habe
either RGB565 or RGB(A)32 values.

yes you are right I am getting the raw RGB values , but found lot of
differences while comparing the data which I read form fb_inf0-

fix.smem_start with the data read from /dev/graphics/fb0 .

Am I missing some thing here or is it right pointer(fb_inf0-

fix.smem_start) from where I can scrape the frame buffer data inside

the kernel ?

Any help on this really appreciated.

Hi all,

finally I got it working the problem here the double buffering , due
to this the y offset is changing between 0 for front buffer and 480
for the second buffer so that I change the staring address of the
frame buffer memory to fb_inf0->fix.smem_start+yoffset and the could
able to see the correct frame buffer data on my host PC.

Any ways thank you guys ,learnt quite alot on this.

Hello,

How many FPS do you get ?

2010/8/20 venkatraju <venkat.rajuece@gmail.com>

Hi Venky,

How did you display the framebuffer data in the host PC ?, did a
reverse module in host ?

Regards
Afzal