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.

Could DM8168 HDVPSS raise an interrupt or event when framebuffer data send out to LCD completed?

Hi experts,

We want to raise an interrupt when framebuffer data send completed, e.g. framefuffer-to-LCD DMA TxFIFO empty interrupt.

Now it is implemented by VPSS M3, so from VPSS framebuffer driver side, is it possible to capture this event?

Thanks in advance.

Jed ZHU

  • Hi,

    There is no such interrupt possible. But you can use FBIO_WAITFORVSYNC ioctl to make sure that your frame has been submitted to hardware for display.

    Regards,

    Hardik Shah

  • Hi Hardik Shah,

    Thank you for reply.

    Yes, FBIO_WAITFORVSYNC ioctl will make the kernel put the process to sleep until VSYNC interrupt occurs, but our LCD uses Data Enable signal to drive itself, VSYNC and HSYNC are nerver used, so could we use FBIO_WAITFORVSYNC ioctl?

    And the 2nd issue is how does C674x+ DSP capture this event? Could it get such information from HDVPSS dirrectly instead of from Cortex-A8 (Linux FB driver)?

    Best regards,

    Jed ZHU

  • And I check the source code of omap FB driver, it seems FBIO_WAITFORVSYNC doesn't work now, is it possible to use OMAPFB_WAITFORVSYNC instead?

    Ln.772, omapfb_ioctl(), of /ti-ezsdk_dm816x-evm_5_03_01_15/board-support/linux-2.6.37-psp04.00.01.13.patch2/drivers/video/omap2/omapfb/omapfb-ioctl.c

            case FBIO_WAITFORVSYNC:
                    if (get_user(p.crt, (__u32 __user *)arg)) {
                            r = -EFAULT;
                            break;
                    }
                    if (p.crt != 0) {
                            r = -ENODEV;
                            break;
                    }
                    /* FALLTHROUGH */

            case OMAPFB_WAITFORVSYNC:
                    DBG("ioctl WAITFORVSYNC\n");
                    if (!display) {
                            r = -EINVAL;
                            break;
                    }

                    r = display->manager->wait_for_vsync(display->manager);
                    break;

  • You were refering OMAP FBDev source codes, which does not match your HW platform. Please check TI81XX FBdev driver under drivers/video/ti81xx/ti81xxfb/ti81xxfb-ioctl.c/

    FBIO_WAITFORVSYNC is the right one to use.

    Regards,

    yihe

  • Thanks Yihe, I also found the exact source codes.

    I checked the implementation of FBIO_WAITFORVSYNC, it is invoked in vps_grpx_vsync_cb(), in drivers/video/ti81xx/vpss/grpx.c, it is a callback register to VPSSM3 VSYNC ISR, so is it possible to send a notify to C674x DSP via SYS/Link in it, similar with VSYNC interrupt to DSP?

     

    Best regards,

    Jed ZHU