The lcd we are going to use is simular with the lcd on mobile phones,
Our device need rotate 90 or 270 degree to display
My problem is simular with i.MX6 IPU and rotating a frame buffer
i don't know how to do with it,i tried many times ,just can't solved it.
Any adviece or example code will help
CHIP: IMX6Q
BSP: L3.0.35-4.1.0
Hi,
You can find examples of the IPU here:
rogeriorps/ipu-examples · GitHub
I believe that can help. Just notice that rotation is limited to 1024x1024 resolution.
Best Regards,
Alejandro
Thanks aleiandrolozano,
I have read this code before, and is not work for me.
my project need rotate the framebuffer automatical and continued to display.
the rotation example in rogeriorps/ipu-examples · GitHub is manually rotate a picture to display only once , and i don't know how
to do the change to fit my project.
Hi,
The code rotates the image every 2 seconds:
for (i=1; i < 8 ; i++) { | |
t->output.rotate = i; |
gettimeofday(&begin, NULL); |
ret = ioctl(fd_ipu, IPU_QUEUE_TASK, t); | ||
if (ret < 0) { | ||
printf("ioct IPU_QUEUE_TASK fail\n"); | ||
goto done; | ||
} |
gettimeofday(&end, NULL); | ||
sec = end.tv_sec - begin.tv_sec; | ||
usec = end.tv_usec - begin.tv_usec; | ||
if (usec < 0) { | ||
sec--; | ||
usec = usec + 1000000; | ||
} | ||
run_time = (sec * 1000000) + usec; |
printf("Rotation time: %d usecs\n", run_time);
sleep(2); // Show each image for 2 seconds |
}
Is not that a similar behavior you need?
/Alejandro
I mean ,once the frambuffer has been changed, the ipu will rotate it immediately and display on lcd with no delay.
Hi Chen,
so it was already fixed?
I suppose also want to know how to enable the rotate for each frame instead to set the task each time.
Thanks!
Kenny