Skip to content

jerome-pouiller/mxc-video-rotate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iMX display rotate patch
========================

How to use it
-------------

Simplest way is to add "rotate=4" to "video" kernel parameter. For example:

   video=mxcfb0:dev=lcd,UMSH-8065MD-9T,rotate=4

Check IPU_ROTATE_* values (in linux/ipu.h) to choose correct value to pass to 
"rotate".

You can also change rotation during runtime using FBIOPUT_VSCREENINFO. Note you
have to change X/Y resolution accordingly:

     vinfo.rotate = 4;
     vinfo.xres = old_yres;
     vinfo.yres = old_xres;
     vinfo.xres_virtual = vinfo.xres;
     vinfo.yres_virtual = vinfo.yres;
     ioctl(fbfd, FBIOPUT_VSCREENINFO, &vinfo);

This code was based on Linux Freescale 3.10.17 [1]. It have to be adapted to
work with other versions (especially, it known to not work out of the box with
3.10.54 and 3.14.28).


[1] http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git

Limitations
-----------

This patch is known to work with simple configuration. We didn't tested
advanced ioctls provided by original code.

In add, alpha layers are not touched by this patch. It means you will have to
rotate these layer manually if you use them.

This patch try to not change original IRQ handling too much. Therefore, we
think tearing may appear if screen refresh is slower than IPU rotation.

Also notice IPU always refresh screen buffers. It may be annoying if you are
concerned with power consumption.

Generate a patch
----------------

It may be more convenient to patch freescale kernel instead of make an external
module. You can generate patch for freescale kernel using:

     git diff original mxc_ipuv3_fb.c > 0001-add-support-for-screen-rotation.patch

Change file paths in patch header in order to comply with your build
environnement.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published