mxc_ipu_lib_task_init() is suppose to allocate IPU output memory because the pointer passed in is null.
(gdb) print pIpuInfo->ipu_handle
$6 = {inbuf_start = {0x0, 0x0, 0x0}, ovbuf_start = {0x0, 0x0}, ovbuf_alpha_start = {0x0, 0x0}, outbuf_start = {0x0, 0x0, 0x0}, ifr_size = 0,
ovfr_size = 0, ovfr_alpha_size = 0, ofr_size = 0, priv = 0x0}
After calling the init function the pointer is still pointing to 0x0 which is resulting in segmentation fault after decoding the first frame and attempting to memcpy from decoder buffer to IPU buffer.
FB_RENDER_MEMCPY(pIpuInfo->YUV[0],pY,ySize);
Do I need to make the following call myself?
mxc_ipu_lib_task_control(IPU_CTL_ALLOC_MEM, (void *)(&mem), NULL);
For reference I have printed the reset of the parameters passed to mxc_ipu_lib_task_init():
(gdb) print pIpuInfo->sInParam
$8 = {width = 320, height = 256, fmt = 808596553, motion_sel = MED_MOTION, input_crop_win = {pos = {x = 0, y = 0}, win_w = 320, win_h = 256}, user_def_paddr = {0, 0, 0}}
(gdb) print pIpuInfo->sOutParam
$9 = {width = 240, height = 320, fmt = 1346520914, rot = 0, user_def_paddr = {0, 0, 0}, show_to_fb = 1, fb_disp = {pos = {x = 0, y = 0}, fb_num = 1}, output_win = {pos = {x = 0, y = 0}, win_w = 320, win_h = 256}}
(gdb) print mode
$10 = 16
Thanks
Tarek,
I don't know which version of kernel you are using. In user space we are using ioctl for IPU_ALLOC to get the DMA buffers. e.g. ioctl(fd_ipu, IPU_ALLOC, &val), val is the size of allocated buffer as an input, and the physical address of the buffer as the output.
Thanks,
Ray
Hey Ray,
I am currently working on the IMX6. And I also need allocation of buffer but in kernel space.
How should I do ? Is that the same command ?
Thanks is advance for your help,
Best regards,
Yann.
Hi Ray,
I'm using 3.0.35 Freescale kernel. Looks like the ioctl(fd_ipu,IPU_ALLOC,&val) is the correct way of allocating the memory.
One more question: How do I enable debugging message from the IPU driver?
Thanks,
Tarek
same as others, we are using dev_dbg as the debug info print function.
you need to enable DEBUG to open the debug option, then set the debuglevel in your bootloader should be okay.
Regards,
Ray