This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Adding RGB input support to VPE in Dra7xx

Hi ,

I am trying to add ARGB32 input support to VPE module. I have modified the ti-vps module to add  V4L2_PIX_FMT_RGB32 to include  V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE  along with VPE_FMT_TYPE_CAPTURE support. I have checked that the CSC coefficients are already available for R2Y conversion. 

In my application I can query and allocate buffers with ARGB input format and also I can queue the input buffers to driver, but my dequeue call is hanging infinitely for ARGB format.

What I have observed is hang is caused due to vpe_irq not being called by the driver. 

Do I need to change in any other module apart from ti-vps  for adding ARGB support. What could be the possible reason for driver not calling vpe_irq interrupt handler?

Any help would be greatly appreciated.

Sincerely,

Thushara Jayakumar

  • Hello Thushara, 

    Video processing Engine(VPE) supports following formats for scaling, csc and deinterlacing:

    Supported Input formats: NV12, YUYV, UYVY

    Supported Output formats: NV12, YUYV, UYVY, RGB24, BGR24, ARGB24, ABGR24

    If you want to add new format you must add your format in the structure:

    /board-support/linux/drivers/media/platform/ti-vpe/ vip.c

    For example:

    static struct vip_fmt vip_formats[] = {
    {
    .name = "NV24 YUV 444 co-planar",
    .fourcc = V4L2_PIX_FMT_NV24,
    .code = V4L2_MBUS_FMT_UYVY8_2X8,
    .colorspace = V4L2_COLORSPACE_SMPTE170M,
    .coplanar = 1,
    .vpdma_fmt = { &vpdma_yuv_fmts[VPDMA_DATA_FMT_Y444],
    &vpdma_yuv_fmts[VPDMA_DATA_FMT_C444],
    },......

    },

    For more information about VPE driver see the link - http://processors.wiki.ti.com/index.php/Linux_Core_VPE_User's_Guide

    I suggest you to check the defined formats in Camera adaptation layer - drivers/media/platform/ti-vpe/cal.c 

    See the definition of ARGB32:

    static const struct cal_fmt formats[] = {
    {
    .name = "RGB32",
    .fourcc = V4L2_PIX_FMT_RGB32, /* argb */
    .code = MEDIA_BUS_FMT_ARGB8888_1X32,
    .colorspace = V4L2_COLORSPACE_SRGB,
    .depth = 32,
    .supported = false,
    ................

    See the patch https://lkml.org/lkml/2015/6/23/556

    You can take a look on the definitions for irq handing in the patch.

    Best regards,

    Yanko