AnsweredAssumed Answered

Error using IPUV3 Library from Android

Question asked by Dragan Ostojic on Apr 18, 2013
Latest reply on Nov 27, 2015 by xueyuan bai

Hi, I'm trying to use IPUv3 block to do some scaling/cropping of the camera capture buffer. Platform is Android r13.4, board is MCIMX6Q-SDP board.

 

 

First I tried to use sp<PostProcessDeviceInterface> class (interface is in hardware/imx/mx6/libcamera/PostProcessDeviceInterface.cpp) to access IPUV3 Library but I get failure. I also tried to access imx_ipu device directly through ioctl(..., IPU_QUEUE_TASK, ...) interface but again it fails. I do see /dev/mxc_ipu device when I do ls -la /dev/mxc_* from the serial console. From within Android LogCat I get the following errors:

 

01-02 01:06:41.559: E/FslHwcomposer(2276): init:63,open ipu dev failed

...

01-02 01:09:35.799: E/FslCameraHAL(2279): open ipu dev fail

 

The first error is from hardware/imx/mx6/hwcomposer/blit_ipu.cpp:

 

int blit_ipu::init()//, hwc_layer_t *layer, struct output_device *output

{

  int status = -EINVAL;

    mIpuFd = open("/dev/mxc_ipu", O_RDWR, 0);

    if(mIpuFd < 0) {

       HWCOMPOSER_LOG_ERR("%s:%d,open ipu dev failed", __FUNCTION__, __LINE__);

        return status;

    }

 

 

    return 0;

}

 

The second error is from me when I tried to do open("/dev/mxc_ipu", ...) from camera HAL.

 

I assumed that the open call ends up in mxc_ipu_open() in kernel_imx/drivers/mxc/ipu3/ipu_device.c so I instrumented this function but I don't see this log show up when open("/dev/mxc_ipu", ...) is made. I do see that ipu_device.c is built when the kernel is built.

 

At this point I'd like some guidance on how to get IPUv3 driver working from within Android so that I can try to use it.

 

Any help will be greatly appreciated.

 

 

 

 

Outcomes