Hello Davinci experts,
I am trying to get back physical address of the framebuffers used on OpenMax API to populate GPU-compositing configuration structure (as indicated here http://processors.wiki.ti.com/index.php/GPU_Compositing#Video_Configuration).
I am using VFCC component on my OMX application.
I allocate VFCC buffers like this:
for( i = 0; i < omx_holder->cap_comp->output_port_params->current_buffer_count; i++ ) { #ifdef USER_BUFFER_ALLOCATION void* phy_addr_temp;
void* virtual_addr; omx_holder->heap = SharedRegion_getHeap(SR_ID); /*allocate heap memory */ virtual_addr = (unsigned int)Memory_alloc(omx_holder->heap, omx_holder->cap_comp->output_port_params->buffer_size, 128, NULL); dprintf("%s: Shared region addr: %#x \n",__func__, virtual_addr); if( virtual_addr == NULL) { (void)fprintf(stderr, "allocate_vfcc_buffer: Error allocating memory" " for capture buffer with Memory_alloc \n"); return OMX_ErrorUndefined; } else { phy_addr_temp = (void*)DomxCore_mapUsrVirtualAddr2phy( (uint32_t)virtual_addr); dprintf("%s: Shared region addr: %#x, Physical addr: %#x \n", __func__, (unsigned int)virtual_addr, (unsigned int)phy_addr_temp); } if( (ret = OMX_UseBuffer(omx_holder->capture_handle, &omx_holder->cap_comp->output_port_params->output_buffer[i], OMX_VFCC_OUTPUT_PORT_START_INDEX, omx_holder, omx_holder->cap_comp->output_port_params->buffer_size, virtual_addr)) != OMX_ErrorNone) { (void)fprintf(stderr, "allocate_vfcc_buffer: Error using allocated" " buffer for component output port %s\n", omx_error(ret)); return ret; } }
But I am constantly getting this error and I do not know how to fix it. Can somebody help me with this ?
allocate_vfcc_buffer: Shared region addr: 0x4047e080 main: DomxProcMgrIf_HLOS.c:239: DomxCore_mapUsrVirtualAddr2phy: Assertion `(status >= 0)' failed. Aborted
Thank you very much
Dylan