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.

Previewer engine unstable in one-shot mode

Hi,

I am using DM6437 as processor, and PSP_1_10_03 as PSP package.

After I enabled PSP_VIDEO_PATH_ENABLE in psp_vpfe driver, I was able to run both histogram and previewer engines.

However, in my case, I want the CCDC to output raw Bayer image to DDR RAM, and then after processing, I want to use previewer engine to generate YUV422 image. Therefore, I need to configure the previewer in one-shot mode and its source is SDRAM.

If PSP_VIDEO_PATH_ENABLE is disabled, the previewer engine works perfectly.

However, when PSP_VIDEO_PATH_ENABLE is enabled (so that I can use Histogram and H3A engines), GIO_control(prevHandle, PSP_PREVIEWER_IOCTL_PREVIEW, &taskPreviewParams) function returns TIMEOUT error after it runs successfully for about a number of frames (sometime 6 frames, sometime 10 frames, etc.).  Note: the function works for the first few calls.

I traced the driver, and found that the previewer engine stops because the previewer is stuck at BUSY state. (The ONESHOT, SOURCE and ENABLE bits are all '0').

Can anyone tell me what goes wrong with previewer engine, and how I can re-activate it when it is stuck at BUSY state?

 

Thanks.

Alan

  • Alan,

    With reference to your second question, my understanding is that there is no documented support for setting up the CFA coefficients, as the Bayer pattern is the only one supported.  But you should go ahead and post this as a separate question on the DM64x forum to see if anyone can get you any further info.

    Dave

  • Alan,

    It looks like that you are not at all getting the interrupt for the preview engine once you hit the problem scenario. This can be confirmed by putting the breakpoint at DDC_prevISR() in the file ddc_previewer.c. If there is no interrupt, that means preview engine has stopped. At this point of time manually try to enable the preview engine and see the interrupt is being generated or not.

    And also once you load the application, please put the breakpoint inside the "PSP_VIDEO_PATH_ENABLE" in the function DDC_VPFEConfigCcdcParams() of the file ddc_vpfeCcdc.c

    Let me know the result.

    In the mean time I will try to get the possible cause of the issue. 

    Regards,

    Sandeep K

  • Sandeep:

    It is confirmed that there is no interrupt from preview engine. The "BUSY" bit is always set. Though I manually set "ENABLE" bit on preview engine, there is no way to clear "BUSY" bit, and no interrupt happens.

    It seems to me that the VPFE engines (previewer, histogram, h3a) either all work in one-shot mode, or all work in on-the-fly mode. If they work in mixed mode, VPFE is unstable.  Is it right?

    If it is true, I would set all engines in one-shot mode, and work asynchronously.  However, when I set the callback function in GPIO_submit() for histogram, it returned error. 

    Question: does the BIOS drivers for histogram, previewer, and h3a support asynchronous access?

     

    For your 2nd question, it is confirmed that PSP_VIDEO_PATH_ENABLE is set.

    Thanks for support.

    Alan

     

  • Hi,

     

    See if PREVIEWER input from CCDC or PREVIEWER output to RESIER is getting enabled in the register. If this is the case, it can cause busy bit to never get cleared.

     

    Thanks,

    Brijesh Jadav

  • According to VPFE datasheet (spru977c.pdf), the previewer PCR register field description on page 148, it says:

    ONESHOT: If this bit is set to 1 (one-shot mode), it is reset to 0 (continuous mode)  after the ENABLE bit is asserted.

    SOURCE: If this bit is set to 1 (SDRAM), it is reset to 0 (CCDC Video port) after the ENABLE bit is asserted.

    In other words, after ONE one-shot operation (Enable bit asserted once), the previewer will always reset to continuous mode.

    Now because histogram is working in continous mode, is this the cause that the previewer is stuck at BUSY, working in continuous mode? 

    Question: how to stop or exit the previewer engine out of continuous mode?

    Alan

  • Hi,

     

    I agree, but this will take effect only if Enable bit is asserted. Before enabling Previewer by setting 1 to ENABLE bit, if it is changed to one-shot mode and input from SD-RAM, it should be ok.

    As far as i know, there is no way to exit the previewer engine except doing power cycle.

     

    Can you also check if the output to the resizer is enabled or not?

     

    Thanks,

    Brijesh Jadav

  • No, the resizer is not enabled.

  • Hi,

     

    Can you send the regiser dump of previewer module when it hangs?

     

    Thx,

    Brijesh Jadav

  • Alan,

    BTW,

    Alan said:

    It seems to me that the VPFE engines (previewer, histogram, h3a) either all work in one-shot mode, or all work in on-the-fly mode. If they work in mixed mode, VPFE is unstable.  Is it right?

    Yes, You are right. In the BIOS PSP, we have not tried it in mixed mode.

    Anyway, could you please provide the register dump of previewer module as per the Brijesh's request?  

    Thanks and Regards,

    Sandeep K

  • Sorry for the late response.  I was out of vacation for a week.

    Here is the register dump for CCDC and PREV engines when it hungs:

    CCDC registers
            @0X1C70400: 0x0001FE00 0x00000003 0x0003000C 0x004D0008
            @0X1C70410: 0x030B020C 0x0098027F 0x00110011 0x000001DF
            @0X1C70420: 0xFFFF00FF 0x00000500 0x00000000 0x80259E80
            @0X1C70430: 0x00000000 0x00000000 0x00000000 0x00000000
            @0X1C70440: 0x00000000 0x00000000 0x00110000 0x00000004
            @0X1C70450: 0x00000000 0x00000000 0x00008000 0x00980280 (Video Port Enable is ON)
            @0X1C70460: 0x001101E0 0x00000000 0x00000000 0x00000000
            @0X1C70470: 0x00000000 0x00000000 0x00000000 0x00000000
            @0X1C70480: 0x00000000 0x00000000 0x00000000 0x00000000
            @0X1C70490: 0x00000000 0x03BE2800 0x00000000 0x00000000

    Previewer registers
            @0X1C70800: 0x0002FE00 0x04120402 0x0000027F 0x000001DF (Previewer is stuck at BUSY)
            @0X1C70810: 0x802EFF00 0x00000500 0x00000000 0x00000000
            @0X1C70820: 0x80000180 0x00000500 0x00000014 0x00000000
            @0X1C70830: 0x00000000 0x00000100 0x20202020 0xEE44EE44
            @0X1C70840: 0x00002828 0x00000000 0x00000100 0x00000000
            @0X1C70850: 0x00000100 0x00000000 0x00000100 0x00000000
            @0X1C70860: 0x00000000 0x01D2584C 0x080EB3D4 0x3EBE5480
            @0X1C70870: 0x00000000 0x00001000 0x00000000 0xFF00FF00
            @0X1C70880: 0x00001700 0x00000010 0x00000000 0x00000000
            @0X1C70890: 0x00000000 0x00000000 0x00000000 0x00000000