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.

OMAP4430 writeback - SYNC_LOST

Hi,

I'm trying to bring up a writeback driver for OMAP4430, Linux kernel 3.4.29 . I know
that there is much better driver in 3.8.5, but we have to work with older kernel
and I want to understand why it is not working. I have an interface to V4L2 and
want to capture image from LCD1 manager in RGB format as a first stage.

Of course, the target is capturing in the YUV4:2:0 format and passing to Ducati H.264
encoder, but I seriously got stuck with capturing LCD1 contents as an image in RGB24 format with
disabled rescaling and color conversion.
The main issue is SYNC_LOST interrupt when writeback enable bit is set. I was
investigating register settings of existing and working 2.6, I modified some of
my settings to have similar values, but I was unable to discover main
differences causing SYNC_LOST.

Differences between my approach in 3.4 and 2.6:
* kernel 2.6 uses buffers in TILER area and 2D DMA transfers, I don't - for simplicity, Is it required even for simple capture?
* When I disable TRUNCATIONENABLE in DISPC_WB_ATTRIBUTES I have "L3 custom error: MASTER:DSS TARGET:DMM2"

Does anyone have an idea how to overcome SYNC_LOST error and achieve basic capture? What causes this error?

Regards,
Grzegorz Bielski

I have attached register settings for 3.4 and 2.6.34 (working)

  • Hi Grzegorz.

    Since I don't do writeback, this is a big shot in the dark, but...

    I had issues with getting a SYNC_LOST interrupt and needed to ignore it if it came before the first VSYNC pulse.  The TRM says this should be done, but the 3.4.x kernel I was using didn't do so.  The attached patch implements this.

    Regards,

        Steve

  • Hi Steve,

    Thanks for some idea. I have to confess that I was investigating and tracing 2.6.34 kernel but didn't notice code to disable "parasitic" SYNC_LOST interrupt before VSYNC in case when WB is being enabled. Did I omit it? I looked into code when ENABLE bit is set in DISPC_WB_ATTRIBUTES : function dispc_enable_plane() in drivers/video/omap2/dss/dispc.c. Of course in other parts code is prepared for unexpected SYNC_LOST.

    Could you give me a point where in TRM is it described? I was strongly focused on DISPC_WB_BUF_THRESHOLD settings - there is comment that only settings 0x00100008 does not cause SYNC_LOST. I also suspected that fifo thresholds and preload values of GFX or VID1 may cause this interrupt - I copied settings from 2.6, but without success.

    I haven't applied your patches yet.

    Regards,

    Grzegorz

  • Hi Grzegorz.

    This is a patch that I ported over from the OMAP4 Android kernel.  The Android commit message also indicates that this is according to the TRM and I believe that I verified that at the time I ported it over.  However, I'm afraid that I don't have notes on where this is described in the TRM.

    Regards,

        Steve