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

How to share texture memory between CPU/GPU for firefly's/rk3288 fbdev Mali-T764

I got the hardware video decoder working on my firefly/rk3288. I can blit the yuv/nv21 output frame to rgb frame memory using fireflys dedicated 2d acceleration hardware. All I need right now is a memory pointer, pointing directly to the texture memory, in order to use the decoded video frame in shaders. In android I would create a GraphicBuffer object and give it to eglCreateImageKHR() and use glEGLImageTargetTexture2DOES. Right now I use glTexSubImage2D to copy and I get about 12 fps for 1920x1080 frames, too slow for showing a movie.

What is the best way to do this for firefly linux 3.10 with fbdev mali t760 driver? How can I simply get a pointer sharing CPU/GPU texture memory? And is there maybe some sample code available?


Right now I stuck and waiting for X11 mali drivers that support XCreatePixmap that could hopefully bring me further. My goal is XBMC, mplayer, ... running on linux on firefly.


Any help would really be appreciated! TNX!


Mac


Background, see:

accelerated video / video processor (VPU) running on linux on RK3288 / firefly - FreakTab.com

Parents
  • Sorry, forgot to reply to your other questions:

    Here is the RGBA_8888:

    #define RGBA8888_FORMAT: 0x00000000010BB053
    

    Regarding dma_buf: all you need is the file descriptor (int) for your dma_buf allocation.

    Unfortunately there is no standard kernel interface to allocate dma_buf memory, so you will have to look into your platform's kernel sources.

    Sometimes you've got a special IOCTL to get a handle to the framebuffer for example (There is one on Firefly for example).

    I'm confused by what you're asking: are you on Linux FBDev or Android ?  The example code above is for fbdev only, if you're running on Android, you will have to use GraphicBuffer and EGL_NATIVE_BUFFER_ANDROID.

Reply
  • Sorry, forgot to reply to your other questions:

    Here is the RGBA_8888:

    #define RGBA8888_FORMAT: 0x00000000010BB053
    

    Regarding dma_buf: all you need is the file descriptor (int) for your dma_buf allocation.

    Unfortunately there is no standard kernel interface to allocate dma_buf memory, so you will have to look into your platform's kernel sources.

    Sometimes you've got a special IOCTL to get a handle to the framebuffer for example (There is one on Firefly for example).

    I'm confused by what you're asking: are you on Linux FBDev or Android ?  The example code above is for fbdev only, if you're running on Android, you will have to use GraphicBuffer and EGL_NATIVE_BUFFER_ANDROID.

Children