This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mali T764/RK3288: how to get the ion handler/address from egl window surface

We are using firefly board and run Android 4.4.4.

And we want to display the frame buffer (content generated from GPU) directly instead of using elgswap() for speed critical application.

But we meet one question, how to get the window surface's ion handler or frame buffer virtual address?

window surface is created via eglCreateWindowSurface(),

so how to get the ion handler or frame buffer virtual address?

After the handler or frame buffer virtual address is available, it could be converted to frame buffer physical address, then we could display the frame buffer directly.

Thanks in advance.

Parents
  • Hi,

    On Android the GPU driver doesn't write directly to the framebuffer: everything goes through SurfaceFlinger (The compositor), and all the memory allocations come from Gralloc (The graphic allocator).

    So, if you want to directly access the framebuffer (And bypass both Gralloc and SurfaceFlinger) then you'll have to dig into Gralloc/SurfaceFlinger's code or the kernel sources to find out how they access the framebuffer.

    Regarding the EGL Window Surfaces: There is no way of accessing the underlying buffers (Each surface is generally multi-buffered), and even if you could it would most likely not point at the framebuffer as the window surface would still have to be composited by SurfaceFlinger before reaching the screen.

    Hope this helps,

    Anthony

Reply
  • Hi,

    On Android the GPU driver doesn't write directly to the framebuffer: everything goes through SurfaceFlinger (The compositor), and all the memory allocations come from Gralloc (The graphic allocator).

    So, if you want to directly access the framebuffer (And bypass both Gralloc and SurfaceFlinger) then you'll have to dig into Gralloc/SurfaceFlinger's code or the kernel sources to find out how they access the framebuffer.

    Regarding the EGL Window Surfaces: There is no way of accessing the underlying buffers (Each surface is generally multi-buffered), and even if you could it would most likely not point at the framebuffer as the window surface would still have to be composited by SurfaceFlinger before reaching the screen.

    Hope this helps,

    Anthony

Children