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.

Resizer sync

I am using the DM355 with a CCD and a small LCD display.  In an effort to get an image on the LCD display as soon as possible, I have written a driver to display the sensor data on the LCD while LInux is booting.  The driver works fine except that while Linux is booting, the LCD image loses horizonal sync about half of the time of the boot.  At the end of the boot, the LCD image is stable.  By placing fixed images in the various memory buffers,  I have been able to isolate the problem to the resizer/image pipe.  I get a stable image during boot if I display the unresized sensor memory buffer, but once I run it through the resizer (1/4 size output), I have the sync issue.  Speculating, it looks like the resizer losses sync when other drivers are accessing memory?  I have tried using both the Pixel clock and SDRAM clock for the image pipe, but still get the sync issue. This is not a memory allocation problem as I have allocated the sensor memory and IPipe output memory in the same manor and the sensor memory does not exhibit this problem.  No memory corruption has been observed.

My image pipe/resizer setup is as follows

    davinci_writel(0x2800, VPFE_CCDC_MODESET);               
    davinci_writel(0x000C, VPFE_EIF_CFG);             // Read YCC from DDR.
    davinci_writel(640, VPFE_EIF_HNUM);  
    davinci_writel(480, VPFE_EIF_VNUM);  
    davinci_writel(640 + 8, VPFE_EIF_PPLN);  
    davinci_writel(480 + 4, VPFE_EIF_LPFR);  
    davinci_writel((mem_sensor_offset  >> 16) >> 5, VPFE_EIF_ADDRU);  
    davinci_writel((mem_sensor_offset  >> 5) & 0xFFFF, VPFE_EIF_ADDRL); 
    davinci_writel(640 >> 4, VPBE_EIF_ADOFS); 
 
    davinci_writel(1, VPFE_PIPE_GCL_ARM); 
    davinci_writel(0, VPFE_PIPE_IRQ_EN);             // Disable all interrupts.
    davinci_writel(3, VPFE_PIPE_DPATHS);             // YCbCr to YCbCr.
    davinci_writel(0, VPFE_PIPE_MODE);             // Continuous scan.
    davinci_writel479, VPFE_PIPE_VSZ);         // Process IMAGE_WIDTH lines.
    davinci_writel(639, VPFE_PIPE_HSZ);         // Process IMAGE_HEIGHT pixels.
 
    davinci_writel(119, VPFE_PIPE_RSZ_O_VSZ);         // Number of lines to save - 1.
    davinci_writel(159, VPFE_PIPE_RSZ_O_HSZ);         // Number of pixels to save - 1.     
    davinci_writel(1024, VPFE_PIPE_RSZ_V_DIF);         // Scale vert by 256 / 1024.
    davinci_writel(1024, VPFE_PIPE_RSZ_H_DIF);         // Scale horz by 256 / 1024.
    davinci_writel(mem_resizer_offset >> 16, VPFE_PIPE_RSZ_SDR_BAD_H);     // Buffer base address high.
    davinci_writel(mem_resizer_offset & 0xFFFF, VPFE_PIPE_RSZ_SDR_BAD_L);     // Buffer base address low.
    davinci_writel(mem_resizer_offset >> 16, VPFE_PIPE_RSZ_SDR_SAD_H);     // Starting address high.
    davinci_writel(mem_resizer_offset & 0xFFFF, VPFE_PIPE_RSZ_SDR_SAD_L);     // Low address.
    davinci_writel(320, VPFE_PIPE_RSZ_SDR_OFT);         // Line offset in bytes 160 * 2 (mult 32)
    davinci_writel(119, VPFE_PIPE_RSZ_SDR_PTR_E);         // Max lines to store - 1.

    davinci_writel(1, VPFE_PIPE_GCL_SDR);             // Enable clock to resizer.
    davinci_writel(1, VPFE_PIPE_RSZ_EN);             // Enable the resizer.

 

My question is;

Am I doing something wrong, missed something or is this a short-coming of the resizer?  Any suggestions would be appreciated.

Thanks