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.

Linux/AM5728: VIP capturing wrong number of lines

Expert 1935 points

Part Number: AM5728

Tool/software: Linux

Hello,

I've connected a image sensor to vip2 slice0 portA with discrete sync signals.

The sensor's configurability is limited, I went with ACTVID (DE) and VSYNC which now behaves like a VBLANK.

I folllow the description in 9.4.5.19.3

I see vip interrupts (in /proc/interrupts), the register 0x48995530 shows 0x01600011, so 0x160 pixels per line (ok) but only 0x11 lines per frame.

0x48995504 is set to 0x0040B10A.

Can you please advise how to set the configurations bits?

Here are my signals (the pixel clock is fixed continuous 16MHz):

2 = ACTVID 1 = VSYNC/VBLANK

Full frame:

Frame start:

Frame end:

Best regards,

Lo2

  • Hello,

    if  I manually set the following registers after Linux start up:

    0x48990100 = 0x00010001 (clocks)

    0x48995504 = 0x0040A10A (vip config)

    the VIP shows:

    0x48995530: 0x01600120 (which is correct: 0x160 pixels, 0x120 lines)

    When I use the vip.c driver, the reported lines is 0x11.

    I disabled the vpe (so I'm sure that /dev/video0 is my cam).

    What settings/configurations could cause the vip to report less lines?

    Best regards,

    Lo2

  • More debug output from the vip and vpdma:

    [ 62.530496] vip2-s0: IRQ 362 VIP_INT0_STATUS0 0x1
    [ 62.530504] vip2-s0: IRQ 0: handling LIST0_COMPLETE
    [ 62.530511] vip2-s0: vip buffer complete 0xedebe000, 0x0
    [ 62.530524] vip2-s0: added next buffer
    [ 62.530533] vip2-s0: start_dma: buf:0xedd43010edebe200, vb:0x00000000ee384c68, dma_addr:0xfe480000
    [ 62.530539] outbound data transfer descriptor for channel 38
    [ 62.530546] word0: data_type = 39, notify = 1, field = 0, 1D = 1, even_ln_skp = 1, odd_ln_skp = 1, line_stride = 42112
    [ 62.530551] word2: start_addr = 0xfe480000
    [ 62.530557] word3: pkt_type = 10, mode = 0, dir = 1, chan = 38, pri = 0, next_chan = 38
    [ 62.530563] word4: desc_write_addr = 0xadd881e0, write_desc = 1, drp_data = 0, use_desc_reg = 0
    [ 62.530568] word5: max_width 1, max_height 1
    [ 62.530573] word6: client specific attr0 = 0x00000000
    [ 62.530577] word7: client specific attr1 = 0x00000000
  • Hello,

    this is the cause:
    if the camera front end does not use any I2C communication or some other delay (basically a driver where the functions return almost instantly), the VIP starts up wrong and does not report the correct number of lines. This can be reproduced in user space using memory writes only.

    solution:
    Either add delays, fix vip.c or use the new linux 4.9 kernel:
    This issue is solved when the new kernel (linux 4.9, new SDK 04.00.00.04) is used.

    Some more changes to the new vip.c/.h are required to support V4L2_PIX_FMT_RGB565 / MEDIA_BUS_FMT_RGB565_1X16 / VPDMA_DATA_FMT_RGB565.

    Lo2