Hi-
Below is a small (< 100lines) test program which produces IPU_INT_STAT_10 = 0x0008000.
The program just converts color space between two buffers.
There is no other activity at the time.
The display is a 1200 X 800 RGB888 ldb display, but is only showing the boot image - no video, no gstreamer.
Kernel is 3.0.35.
Any ideas?
Thanks in advance. Program follows
#define WIDTH 120
//0
#define HEIGHT 80
//0
#define INPUT_FMT (IPU_PIX_FMT_UYVY)
#define OUTPUT_FMT (IPU_PIX_FMT_RGB565)
#define BPP 2
#define BUF_SIZE (WIDTH * HEIGHT * BPP)
static int fd_ipu;
static struct ipu_task task;
static uint8_t *inbuf, *outbuf;
static void init_task(void)
{
memset(&task, 0, sizeof(task));
task.input.width = WIDTH;
task.input.height = HEIGHT;
task.input.format = INPUT_FMT;
task.output.width = WIDTH;
task.output.height = HEIGHT;
task.output.format = OUTPUT_FMT;
}
static uint8_t *ipu_allocate(dma_addr_t *paddr)
{
*paddr = BUF_SIZE;
if(ioctl(fd_ipu, IPU_ALLOC, paddr))
{
perror("IPU_ALLOC");
return NULL;
}
return mmap(0, BUF_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd_ipu, *paddr);
}
static void ipu_free(dma_addr_t *paddr)
{
munmap((void *)*paddr, BUF_SIZE);
if(ioctl(fd_ipu, IPU_FREE, paddr))
{
perror("IPU_FREE");
return;
}
}
int main(int argc, char *argv[])
{
int i;
fd_ipu = open("/dev/mxc_ipu", O_RDWR, 0);
if (fd_ipu < 0)
{
perror("/dev/mxc_ipu");
return 1;
}
init_task();
inbuf = ipu_allocate(&task.input.paddr);
outbuf = ipu_allocate(&task.output.paddr);
memset(inbuf, 128, BUF_SIZE);
for(i=0; i<1; i++)
{
int err = ioctl(fd_ipu, IPU_QUEUE_TASK, &task);
if (err)
perror("IPU_QUEUE_TASK");
else
printf("IPU_QUEUE_TASK success\n");
}
ipu_free(&task.input.paddr);
ipu_free(&task.output.paddr);
close(fd_ipu);
printf("Done\n");
return 0;
}
Some more info - if I comment out the ldb display in the board file there is no error so there must be some kind of conflict.
Hi Ed
IPU_INT_STAT_10 =0x00080000" , that is bit 19 of IPU_INT_STAT_10 is DI0_SYNC_DISP_ERR.
This bit is set when there's an error, usually as result of data starvation when
data that should be sent to display is not available in IPUs internal FIFO.
It means that the IPU encounters the data starvation, that is, it can not
get data sometimes from memory.
Most probable cause for this issue is big load on the DDR memory bus.
You may adjust this by decreasing memory access loading (for example
decreasing frame rate) or by optimizing your application (for example increasing
operating frequencies).
For csc example one can also look at
ipu-examples/csc_ex1.c at master · rogeriorps/ipu-examples · GitHub
Best regards
igor
Thanks for the response Igor, but I think it's something else going on.
I did the test in an attempt to isolate the issue. So there was no other activity in the system. I was not capturing video or displaying anything other than the boot logo that was already in the framebuffer. and there was no other programs running.
Also, I used a really small buffer size for my test - 120 x 80.
I did look at Rogerio's examples - that's where I pulled code to make my test program.
Any other thoughts?
Thanks again.
Hi Ed
I would suggest to run rogeriorps/ipu-examples
on Demo image
Also one can look at SDK CSC example i.MX 6Series Platform SDK : Bare-metal SDK
Best regards
igor