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.

using CPI 16bit interface to caputre HDMI video on OMAP4460 platform

Other Parts Discussed in Thread: SYSCONFIG

hi:

    i am using CPI of omap4460 to capture hdmi video(720p@60fps) , the hdmi receive chip is adv7611. adv7611 convert the hdmi video to 16bits YUV 4:2:2 bits. in particular, the upper 8bits corresponds to Y component, and the lower 8bits corresponds to UV component. we probe the pin of adv7612 by scope, and find that it actually output the effective hs,vs and pclk of 720p@60fps.

     as for the software setting of OMAP4 iss, the pipeline is adv7611 -> ipipeif -> ISIF ->ipipeif -> resizer, INPSRC1 (IPIPEIF_CFG[15:14) and INPSRC2(IPIPEIF_CFG[3:2]) are both set as zero, in addition, the INPUT_SEL (ISS_CTRL[3:2]) is set as 0x3(Parallel interface).

    we can receive ISS level HS_VS_IRQ interrupt, but we cann't receive isp level interrupt, neither isif&ipipeif  nor resizer interrupt occurs.

     so, what is the problem? thanks

    to assist the analysis, the register of omap4 iss is show as below:

 omap4iss omap4iss: -------------RESIZER Register dump-------------
[  688.799530] omap4iss omap4iss: ###RSZ SYSCONFIG=0x00000101
[  688.799530] omap4iss omap4iss: ###RSZ IN_FIFO_CTRL=0x00000000
[  688.799560] omap4iss omap4iss: ###RSZ FRACDIV=0x00000000
[  688.799560] omap4iss omap4iss: ###RSZ SRC_EN=0x00000000
[  688.799591] omap4iss omap4iss: ###RSZ SRC_MODE=0x00000000
[  688.799591] omap4iss omap4iss: ###RSZ SRC_FMT0=0x00000001
[  688.799591] omap4iss omap4iss: ###RSZ SRC_FMT1=0x00000000
[  688.799621] omap4iss omap4iss: ###RSZ SRC_VPS=0x00000000
[  688.799621] omap4iss omap4iss: ###RSZ SRC_VSZ=0x000002ce
[  688.799652] omap4iss omap4iss: ###RSZ SRC_HPS=0x00000000
[  688.799652] omap4iss omap4iss: ###RSZ SRC_HSZ=0x000004ff
[  688.799682] omap4iss omap4iss: ###RSZ DMA_RZA=0x00000000
[  688.799682] omap4iss omap4iss: ###RSZ DMA_RZB=0x00000000
[  688.799713] omap4iss omap4iss: ###RSZ DMA_STA=0x00000000
[  688.799713] omap4iss omap4iss: ###RSZ GCK_MMR=0x00000001
[  688.799743] omap4iss omap4iss: ###RSZ GCK_SDR=0x00000001
[  688.799743] omap4iss omap4iss: ###RSZ IRQ_RZA=0x00000000
[  688.799774] omap4iss omap4iss: ###RSZ IRQ_RZB=0x00000000
[  688.799774] omap4iss omap4iss: ###RSZ YUV_Y_MIN=0x00000000
[  688.799804] omap4iss omap4iss: ###RSZ YUV_Y_MAX=0x000000ff
[  688.799804] omap4iss omap4iss: ###RSZ YUV_C_MIN=0x00000000
[  688.799835] omap4iss omap4iss: ###RSZ YUV_C_MAX=0x000000ff
[  688.799835] omap4iss omap4iss: ###RSZ SEQ=0x00000000
[  688.799835] omap4iss omap4iss: ###RZA EN=0x00000000
[  688.799865] omap4iss omap4iss: ###RZA MODE=0x00000000
[  688.799865] omap4iss omap4iss: ###RZA 420=0x00000003
[  688.799896] omap4iss omap4iss: ###RZA I_VPS=0x00000000
[  688.799896] omap4iss omap4iss: ###RZA I_HPS=0x00000000
[  688.799926] omap4iss omap4iss: ###RZA O_VSZ=0x000002cf
[  688.799926] omap4iss omap4iss: ###RZA O_HSZ=0x000004ff
[  688.799957] omap4iss omap4iss: ###RZA V_PHS_Y=0x00000000
[  688.799957] omap4iss omap4iss: ###RZA V_PHS_C=0x00000000
[  688.799987] omap4iss omap4iss: ###RZA V_DIF=0x00000100
[  688.799987] omap4iss omap4iss: ###RZA V_TYP=0x00000000
[  688.800018] omap4iss omap4iss: ###RZA V_LPF=0x00000000
[  688.800018] omap4iss omap4iss: ###RZA H_PHS=0x00000000
[  688.800018] omap4iss omap4iss: ###RZA H_DIF=0x00000100
[  688.800048] omap4iss omap4iss: ###RZA H_TYP=0x00000000
[  688.800048] omap4iss omap4iss: ###RZA H_LPF=0x00000000
[  688.800079] omap4iss omap4iss: ###RZA DWN_EN=0x00000000
[  688.800079] omap4iss omap4iss: ###RZA SDR_Y_BAD_H=0x00000000
[  688.800109] omap4iss omap4iss: ###RZA SDR_Y_BAD_L=0x00000000
[  688.800109] omap4iss omap4iss: ###RZA SDR_Y_SAD_H=0x00000000
[  688.800140] omap4iss omap4iss: ###RZA SDR_Y_SAD_L=0x00000000
[  688.800140] omap4iss omap4iss: ###RZA SDR_Y_OFT=0x00000500
[  688.800170] omap4iss omap4iss: ###RZA SDR_Y_PTR_S=0x00000000
[  688.800170] omap4iss omap4iss: ###RZA SDR_Y_PTR_E=0x000002cf
[  688.800201] omap4iss omap4iss: ###RZA SDR_C_BAD_H=0x00000000
[  688.800201] omap4iss omap4iss: ###RZA SDR_C_BAD_L=0x00000000
[  688.800231] omap4iss omap4iss: ###RZA SDR_C_SAD_H=0x00000000
[  688.800231] omap4iss omap4iss: ###RZA SDR_C_SAD_L=0x00000000
[  688.800262] omap4iss omap4iss: ###RZA SDR_C_OFT=0x00000500
[  688.800262] omap4iss omap4iss: ###RZA SDR_C_PTR_S=0x00000000
[  688.800292] omap4iss omap4iss: ###RZA SDR_C_PTR_E=0x000002cf
[  688.800292] omap4iss omap4iss: -----------------------------------------------
[  688.800323] yangjianjun media_entity(OMAP4 ISS ISP resizer) return 0 for s_stream operation
[  688.800323] CPI input has been set
[  688.800354] adv7611 ISIF_CCDCFG 0x0
[  688.800354] adv7611 ISIF_REC656IF 0x2
[  688.800384] omap4iss omap4iss: -------------IPIPEIF Register dump-------------
[  688.800415] omap4iss omap4iss: ###IPIPEIF CFG1=0x00000000
[  688.800415] omap4iss omap4iss: ###IPIPEIF CFG2=0x00000008
[  688.800445] omap4iss omap4iss: ###ISIF SYNCEN=0x00000001
[  688.800445] omap4iss omap4iss: ###ISIF CADU=0x00000000
[  688.800445] omap4iss omap4iss: ###ISIF CADL=0x00000000
[  688.800476] omap4iss omap4iss: ###ISIF MODESET=0x00001000
[  688.800476] omap4iss omap4iss: ###ISIF CCOLP=0x00000000
[  688.800506] omap4iss omap4iss: ###ISIF SPH=0x00000000
[  688.800506] omap4iss omap4iss: ###ISIF LNH=0x000004ff
[  688.800537] omap4iss omap4iss: ###ISIF LNV=0x000002cf
[  688.800537] omap4iss omap4iss: ###ISIF VDINT0=0x000002cf
[  688.800567] omap4iss omap4iss: ###ISIF HSIZE=0x00000000
[  688.800567] omap4iss omap4iss: ###ISP5 SYSCONFIG=0x00000021
[  688.800598] omap4iss omap4iss: ###ISP5 CTRL=0x0110d7f8
[  688.800598] omap4iss omap4iss: ###ISP5 IRQSTATUS(0)=0x00000000
[  688.800628] omap4iss omap4iss: ###ISP5 IRQENABLE_SET(0)=0x800c8001
[  688.800628] omap4iss omap4iss: ###ISP5 IRQENABLE_CLR(0)=0x800c8001
[  688.800659] omap4iss omap4iss: -----------------------------------------------
[  688.800659] yangjianjun media_entity(OMAP4 ISS ISP IPIPEIF) return 0 for s_stream operation
[  688.814636] adv7611 stream on succeed
[  688.814666] adv7611 stream(on/off) ret is 0
[  688.814666] yangjianjun media_entity(adv7611 3-004c) return 0 for s_stream operation
[  688.815338] here is iss_isr
[  688.815368] now we receive vs intr,iss status:20000,isp5_irqstaus:0
[  689.149291] here is iss_isr
[  689.149322] now we receive vs intr,iss status:20000,isp5_irqstaus:0
[  689.483245] here is iss_isr
[  689.483276] now we receive vs intr,iss status:20000,isp5_irqstaus:0

 

 

   

 

  • i has solved the problem, the keypoint is to de-assert the mstandby to ISP, we should make sure that ISP be in active state before receiving images from a sensor.

    once ISP is out of standby state, it can receive isif and ipipeif interrupt.

    but ,i encounters another problem, the image captured by resizer has black bar on the left, and i found that the image caputured by isif also has black bar. (note: the pipeline i use is adv7611(hdmi)-> cpi->ipipief->isif->ipipeif->resizer).

    i also check the data on cpi interfac

    e, and found that i doesn't output such black bar signal.

    on the hdmi tx side, the timing is 720p@60fps, and it shows a pure while picutre, but the image captured on OMAP4 isif& resizer is such:

    to assist the analysis,  i dump the regiser as below:

    [ 158.488006] omap4iss omap4iss: ###RSZ SYSCONFIG=0x00000101

    [ 158.494781] omap4iss omap4iss: ###RSZ IN_FIFO_CTRL=0x00000000
    omap4iss omap4iss: ###RSZ FRACDIV=0x00000000
    [ 158.509216] omap4iss omap4iss: ###RSZ SRC_EN=0x00000001

    [ 158.516326] omap4iss omap4iss: ###RSZ SRC_MODE=0x00000000
    [ 158.523223] omap4iss omap4iss: ###RSZ SRC_FMT0=0x00000001
    000
    l[ 158.530334] omap4iss omap4iss: ###RSZ SRC_FMT1=0x00000000
    [ 158.537445] omap4iss omap4iss: ###RSZ SRC_VPS=0x00000000

    [ 158.544464] omap4iss omap4iss: ###RSZ SRC_VSZ=0x00000256
    [ 158.550170] omap4iss omap4iss: ###RSZ SRC_HPS=0x00000000
    [ 158.557067] omap4iss omap4iss: ###RSZ SRC_HSZ=0x0000031f
    [ 158.562713] omap4iss omap4iss: ###RSZ DMA_RZA=0x00000000
    [ 158.568359] omap4iss omap4iss: ###RSZ DMA_RZB=0x00000000
    [ 158.574035] omap4iss omap4iss: ###RSZ DMA_STA=0x00000000
    [ 158.579681] omap4iss omap4iss: ###RSZ GCK_MMR=0x00000001
    [ 158.585327] omap4iss omap4iss: ###RSZ GCK_SDR=0x00000001
    [ 158.590942] omap4iss omap4iss: ###RSZ IRQ_RZA=0x00000000
    [ 158.596588] omap4iss omap4iss: ###RSZ IRQ_RZB=0x00000000
    [ 158.602233] omap4iss omap4iss: ###RSZ YUV_Y_MIN=0x00000000
    [ 158.608062] omap4iss omap4iss: ###RSZ YUV_Y_MAX=0x000000ff
    [ 158.614074] omap4iss omap4iss: ###RSZ YUV_C_MIN=0x00000000
    [ 158.619903] omap4iss omap4iss: ###RSZ YUV_C_MAX=0x000000ff
    [ 158.625732] omap4iss omap4iss: ###RSZ SEQ=0x00000000
    [ 158.630981] omap4iss omap4iss: ###RZA EN=0x00000001
    [ 158.636169] omap4iss omap4iss: ###RZA MODE=0x00000000
    [ 158.641540] omap4iss omap4iss: ###RZA 420=0x00000003
    [ 158.646789] omap4iss omap4iss: ###RZA I_VPS=0x00000000
    [ 158.652252] omap4iss omap4iss: ###RZA I_HPS=0x00000000
    [ 158.657714] omap4iss omap4iss: ###RZA O_VSZ=0x00000257
    [ 158.663146] omap4iss omap4iss: ###RZA O_HSZ=0x0000031f
    [ 158.668609] omap4iss omap4iss: ###RZA V_PHS_Y=0x00000000
    [ 158.674255] omap4iss omap4iss: ###RZA V_PHS_C=0x00000000
    [ 158.679870] omap4iss omap4iss: ###RZA V_DIF=0x00000100
    [ 158.685333] omap4iss omap4iss: ###RZA V_TYP=0x00000000
    [ 158.690795] omap4iss omap4iss: ###RZA V_LPF=0x00000000
    [ 158.696258] omap4iss omap4iss: ###RZA H_PHS=0x00000000
    [ 158.701690] omap4iss omap4iss: ###RZA H_DIF=0x00000100
    [ 158.707336] omap4iss omap4iss: ###RZA H_TYP=0x00000000
    [ 158.712799] omap4iss omap4iss: ###RZA H_LPF=0x00000000
    [ 158.718231] omap4iss omap4iss: ###RZA DWN_EN=0x00000000
    [ 158.723785] omap4iss omap4iss: ###RZA SDR_Y_BAD_H=0x00000000
    [ 158.729797] omap4iss omap4iss: ###RZA SDR_Y_BAD_L=0x00000000
    [ 158.735809] omap4iss omap4iss: ###RZA SDR_Y_SAD_H=0x00000000
    [ 158.741821] omap4iss omap4iss: ###RZA SDR_Y_SAD_L=0x00000000
    [ 158.747802] omap4iss omap4iss: ###RZA SDR_Y_OFT=0x00000320
    [ 158.753662] omap4iss omap4iss: ###RZA SDR_Y_PTR_S=0x00000000
    [ 158.759674] omap4iss omap4iss: ###RZA SDR_Y_PTR_E=0x00000257
    [ 158.765655] omap4iss omap4iss: ###RZA SDR_C_BAD_H=0x00000000
    [ 158.771667] omap4iss omap4iss: ###RZA SDR_C_BAD_L=0x00000000
    [ 158.777679] omap4iss omap4iss: ###RZA SDR_C_SAD_H=0x00000000
    [ 158.783691] omap4iss omap4iss: ###RZA SDR_C_SAD_L=0x00000000
    [ 158.789703] omap4iss omap4iss: ###RZA SDR_C_OFT=0x00000320
    [ 158.795501] omap4iss omap4iss: ###RZA SDR_C_PTR_S=0x00000000
    [ 158.801818] omap4iss omap4iss: ###RZA SDR_C_PTR_E=0x00000257
    [ 158.808013] omap4iss omap4iss: ###IPIPEIF CFG1=0x00000000
    [ 158.813842] omap4iss omap4iss: ###IPIPEIF CFG2=0x00000009
    [ 158.819610] omap4iss omap4iss: ###ISIF SYNCEN=0x00000001
    [ 158.825347] omap4iss omap4iss: ###ISIF CADU=0x00000000
    [ 158.837951] omap4iss omap4iss: ###ISIF CADL=0x00000000
    [ 158.843444] omap4iss omap4iss: ###ISIF MODESET=0x00001000
    [ 158.849273] omap4iss omap4iss: ###ISIF CCOLP=0x00000000
    [ 158.854888] omap4iss omap4iss: ###ISIF SPH=0x00000000
    [ 158.860321] omap4iss omap4iss: ###ISIF LNH=0x0000031f
    [ 158.865753] omap4iss omap4iss: ###ISIF LNV=0x00000257
    [ 158.871185] omap4iss omap4iss: ###ISIF VDINT0=0x00000257
    [ 158.876892] omap4iss omap4iss: ###ISIF HSIZE=0x00000000
    [ 158.882507] omap4iss omap4iss: ###ISP5 SYSCONFIG=0x00000021
    [ 158.888488] omap4iss omap4iss: ###ISP5 CTRL=0x0000d7f8
    [ 158.894195] omap4iss omap4iss: ###ISP5 IRQSTATUS(0)=0x00000000
    [ 158.908233] omap4iss omap4iss: ###ISP5 IRQENABLE_SET(0)=0x800c8001
    [ 158.914916] omap4iss omap4iss: ###ISP5 IRQENABLE_CLR(0)=0x800c8001
    [ 158.921539] omap4iss omap4iss: ###ISS HL_REVISION=0x40000103
    [ 158.927612] omap4iss omap4iss: ###ISS HL_SYSCONFIG=0x00000028
    [ 158.942932] omap4iss omap4iss: ###ISS HL_IRQSTATUS_5=0x00000000
    [ 158.949340] omap4iss omap4iss: ###ISS HL_IRQENABLE_5_SET=0x00020031
    [ 158.956054] omap4iss omap4iss: ###ISS HL_IRQENABLE_5_CLR=0x00020031
    [ 158.971862] omap4iss omap4iss: ###ISS CTRL=0x0000000f
    [ 158.977294] omap4iss omap4iss: ###ISS CLKCTRL=0xf0000000
    [ 158.983001] omap4iss omap4iss: ###ISS CLKSTAT=0xf0000002
    [ 158.988922] omap4iss omap4iss: ###ISS PM_STATUS=0x00002880
    [ 159.022949] omap4iss omap4iss: ###ISS HL_REVISION=0x40000103
    [ 159.039459] omap4iss omap4iss: ###ISS HL_SYSCONFIG=0x00000028
    [ 159.045623] omap4iss omap4iss: ###ISS HL_IRQSTATUS_5=0x00000000
    [ 159.052673] omap4iss omap4iss: ###ISS HL_IRQENABLE_5_SET=0x00020031
    [ 159.059844] omap4iss omap4iss: ###ISS HL_IRQENABLE_5_CLR=0x00020031
    [ 159.077850] omap4iss omap4iss: ###ISS CTRL=0x0000000f
    [ 159.085235] omap4iss omap4iss: ###ISS CLKCTRL=0xf0000000
    [ 159.091125] omap4iss omap4iss: ###ISS CLKSTAT=0xf0000002
    [ 159.108642] omap4iss omap4iss: ###ISS PM_STATUS=0x00002880

  • Hello Guohui Li1,

    I suggest you to see following patch:

    https://gitorious.org/omap4-v4l2-camera/omap4-v4l2-camera/commit/37328b0fdb23474191fd070d293d10d0e0989071

    ISP pipelines

    CSI2A -> IPIPEIF -> MEM

    To reset all links, and link CSI2A VP output pad to IPIPEIF input node, and IPIPEIF to respective v4l2 capture device node:
    ./media-ctl -r -l '"OMAP4 ISS CSI2a":1 -> "OMAP4 ISS ISP IPIPEIF":0 [1]','"OMAP4 ISS ISP IPIPEIF":1 -> "OMAP4 ISS ISP IPIPEIF output":0 [1]'

    To set format on "ov5650 3-0036" sensor output, "OMAP4 ISS CSI2a" and "OMAP4 ISS ISP IPIPEIF" input pads:
    ./media-ctl -f '"ov5650 3-0036":0 [SGRBG10 2592x1944]','"OMAP4 ISS CSI2a":0 [SGRBG10 2592x1944]','"OMAP4 ISS ISP IPIPEIF":0 [SGRBG10 2592x1944]'

    CSI2A -> IPIPEIF -> RESIZER(A) -> MEM

    To reset all links, and link CSI2A VP output pad to IPIPEIF input node, IPIPEIF output to RESIZER input, and RESIZER-A output pad to respective v4l2 capture device node:
    ./media-ctl -r -l '"OMAP4 ISS CSI2a":1 -> "OMAP4 ISS ISP IPIPEIF":0 [1]','"OMAP4 ISS ISP IPIPEIF":2 -> "OMAP4 ISS ISP resizer":0 [1]','"OMAP4 ISS ISP resizer":1 -> "OMAP4 ISS ISP resizer a output":0 [1]'

    To set format on "ov5640 3-003c" sensor output, "OMAP4 ISS CSI2a", "OMAP4 ISS ISP IPIPEIF" and "OMAP4 ISS ISP resizer" input pads:
    ./media-ctl -f '"ov5640 3-003c":0 [UYVY 640x480]','"OMAP4 ISS CSI2a":0 [UYVY 640x480]','"OMAP4 ISS ISP IPIPEIF":0 [UYVY 640x480]','"OMAP4 ISS ISP resizer":0 [UYVY 640x480]'

    Same as above, but enabling UYVY -> NV12 conversion in ISP Resizer:
    ./media-ctl -f '"ov5640 3-003c":0 [UYVY 640x480]','"OMAP4 ISS CSI2a":0 [UYVY 640x480]','"OMAP4 ISS ISP IPIPEIF":0 [UYVY 640x480]','"OMAP4 ISS ISP resizer":0 [UYVY 640x480]','"OMAP4 ISS ISP resizer":1 [YUYV1_5X8 640x480]'

    https://gitorious.org/omap4-v4l2-camera/pages/Home

    Run resizer in one-shot mode and wait for the resizer to complete the one-shot operation by waiting for the RSZ_SRC_EN to become zero.

    Best regards,

    Yanko