Part Number: AM5728
Tool/software: Linux
Board: AM5728
SDK: 3.1.0
I am trying to use OpenCL for some video processing frames from V4L2 and OpenGL to render processed frames, then again send rendered frames to OpenCL/DSP to process them there. So OpenCL/DSP has option to allocate physically continuous memory in RAM and it would be great to share somehow such memory between OpenGL and OpenCL as textures.
From my experiments:
- copying 1080p YUV420p from OpenCL allocated memory to texture and render it is about 6.5 ms. Not bad but it would be great to get rid of memory transfer.
Getting rendered results is total disaster:
- glReadPixels from GBM frame buffer is about 1 second
- glReadPixels from Frame Buffer Object is about 0.5 second ()
- (gbm_bo_get_fd()->mmap->memcpy) is about 135 ms
- (gbm_bo_get_fd()->mmap->OpenCL) is about the same as memcpy ~135 ms
Is there any way to do memory sharing between those two OpenCL/OpenGL? Or is there any way to speedup those transfers?
UPDATE: Tried to use separatelly allocated DUMB DRM DMA buffer (http://manpages.ubuntu.com/manpages/wily/man7/drm-gem.7.html) which can be used in EGLImage (https://e2e.ti.com/support/arm/sitara_arm/f/791/p/516075/2060896#pi316653=1). Still the same 135ms to get (memcpy) RGBA @ 1080p or run OpenCL TI Sobel filter on 2 DSPs.
BUT, at the same time, if memory is allocated by __malloc_ddr(), the same Sobel filter runs just 16 ms.