Does it possible to rotate the i.mx53's RGB LCD output?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does it possible to rotate the i.mx53's RGB LCD output?

2,188 Views
YanjunLuo
Contributor IV

Because of the mechanical and LCD restrictions, I need rotate the RGB LCD output for 180 degree. I mean do the flip on both the Horizontal and Vertical. I'm running Linux 2.6.35.3.

Regards,

Yanjun Luo.

Labels (2)
12 Replies

1,411 Views
maor
Contributor I

Hi yanjun

i also tried to rotate my imx53 board with 90 degree in 3 different ways :

1-

run IPU rotate sample from below link.

https://github.com/rogeriorps/ipu-examples/tree/master/mx5/rotation/example1

The example are work , but i also need to rotate everything ( include Qt display) , so this solution is not good for me.

2-

i tried to patch  the ipu_init_channel_buffer function in   drivers/video/mxc/mxc_ipuv3_fb.c to in order to set IPU_ROTATE_90_X mode ,

only the IPU_ROTATE_180 mode work for me .

3-

i tried to work with the xrander utility  , here i success to rotate in 90 degree , but the rotate done in software -> the cpu load was high .

Do you success to rotate your display with low cpu (with hardware) ?

0 Kudos

1,411 Views
YanjunLuo
Contributor IV

Finally, I compile and run the IPU test, also I run IPU rotate sample from below link.

https://github.com/rogeriorps/ipu-examples/tree/master/mx5/rotation/example1

It do can rotate a image and output on the LCD, but this is not what I need. I need rotate everything output to the LCD, I mean the Linux boot logos, the QT outputs. I got some answer that CPMEM only works for IPUv3 IC, the HF field does not work for display. I'm thinking about do some software rotation now.

Regards,

Yanjun Luo.

0 Kudos

1,411 Views
igorpadykov
NXP Employee
NXP Employee

Hi Yanjun

for rotation examples please refer to mxc_ipudev_test and

document below sect.1.6.2 Unit test and p.11

http://cache.freescale.com/files/32bit/doc/ref_manual/imx51_IPU_LIB_UG.pdf

You can unpack the package using LTIB

<ltib>./ltib -m prep -p imx-test

then build and deploy the unit test package.

<ltib>./ltib -m scbuild -p imx-test

<ltib>./ltib -m scinstall -p imx-test

Then when you build the system you could reach mxc_ipudev_test.out application under imx-test-xx/

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,411 Views
YanjunLuo
Contributor IV

Hi igor,

Thanks for your information, the ltib never works fine for me, after fixed the zlib problem, the elftosb problem, I built one, but the imx-test build always failure.

Also I found something interesting, in the kernel 2.6.35.3 file drivers/mxc/ipu3/ipu_common.c, there is a comment on the parameter of the function ipu_init_channel_buffer, It said "A rotation setting other than IPU_ROTATE_VERT_FLIP should only be used for input buffers of rotation channels.". I think this means the horizontal flip doesn't work for LCD output, this is the same as what I see now. How to fix it? Is this an IPU's bug?

BTW, I need always rotate 180 degree for the whole LCD, I mean from the power on to power off, I don't want some window or part of the screen rotate.

Regards,

Yanjun Luo.

0 Kudos

1,411 Views
igorpadykov
NXP Employee
NXP Employee

Hi Yanjun

Rotation is performed by the IDMAC and the Rotation unit inside the

IC in the IPU module. The bit that makes the rotation is the ROT bit. Please

review chapter 45. Section 45.4.2.11.1 IDMAC Rotation Modes

Best regards

igor

0 Kudos

1,411 Views
YanjunLuo
Contributor IV

Hi igor,

Yes, I did read the 45.4.2.11.1, the bit 120 is Horizontal Flip, and bit 121 is Vertical Flip, the function _ipu_ch_param_set_rotation in the file drivers/mxc/ipu/ipu_param_mem.h set these two bits, I called and I found only vertical flip works.

Regards,

Yanjun Luo.

0 Kudos

1,411 Views
igorpadykov
NXP Employee
NXP Employee

Hi Yanjun

please look at attached mxc_ipudev_test.

Best regards

igor

0 Kudos

1,411 Views
YanjunLuo
Contributor IV

Hi igor,

Many thanks for your support, where can I find the attached file? I'm familiar with the forum usage.

Regards,

Yanjun Luo.

0 Kudos

1,411 Views
igorpadykov
NXP Employee
NXP Employee

do you see picture ? Clock on "mxc_ipudev_test.zip"

on my answer above in previous thread.

Image.jpg

1,411 Views
YanjunLuo
Contributor IV

Hi igor,

Many thanks for your kindly support!, I got the file, I'll test it.

Regards,

Yanjun Luo.

0 Kudos

1,411 Views
YanjunLuo
Contributor IV

After hours check, I found in the iMX53RM.pdf page 2667, I need enable Horizontal flip and Vertical flip it should work fine. I change the drivers/video/mxc/mxc_ipuv3_fb.c, Set the IPU_ROTATE_180 when do ipu_init_channel_buffer. Then I found the Vertical flip works, but Horizontal flip doesn't work. I even try to set the one by one, I found only the IPU_ROTATE_VERT_FLIP works, the IPU_ROTATE_HORIZ_FLIP has no effect at all. Does anybody try this? Is there any IPU bugs there? I checked the errata, but I can't find such IPU problem.

Regards,

Yanjun Luo.

0 Kudos

1,101 Views
danielberhe
Contributor IV

Hi YanjunLuo,

Have you had any luck with this? I'm also able to do vertical flip but horizontal flip doesn't do anything. I know it has been years since you posted this but would be great if you remember anything.

Daniel

0 Kudos