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;
}