Screen rotation

600 views
Skip to first unread message

Marlon Smith

unread,
Dec 12, 2013, 4:03:17 PM12/12/13
to wand...@googlegroups.com
Hi everyone,

I'm running a Qt application on my Wandboard, and display video and images on the screen at the same time. I would like to rotate everything together, so I can use my screen either in portrait or landscape mode.

I've tried xrandr, but it complains:

root@linaro-ubuntu-desktop:/opt/lcd# xrandr -o left
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  151 (RANDR)
  Minor opcode of failed request:  2 (RRSetScreenConfig)
  Serial number of failed request:  14
  Current serial number in output stream:  14
root@linaro-ubuntu-desktop:/opt/lcd#



root@linaro-ubuntu-desktop:/opt/lcd# xrandr --output default --rotate left
xrandr: output default cannot use rotation "left" reflection "none"
root@linaro-ubuntu-desktop:/opt/lcd#

On the raspberry pi, I could make this change by editing /boot/config.txt and rebooting the system. Is there a similar solution for the Wandboard?

Thanks

Marlon

Clay D. Montgomery

unread,
Dec 16, 2013, 9:47:40 PM12/16/13
to wand...@googlegroups.com
Display rotation should ideally be done by the IPU, but I have not seen any evidence that it is working yet on the i.MX6.  The video unit tests currently only work through v4l2 and not the IPU, for example.  I have used the IPU for rotation on the i.MX53, and I think it will work on the i.MX6 as well, eventually.

Until Freescale gets the IPU support fixed, you could use the ContentRotation or Decoration property of the QWindow class to do rotation.  Take a look at:

http://qt-project.org/doc/qt-5.0/qtgui/qwindow.html#contentOrientation-prop

Rotation is working on Android, but it uses OpenGL ES to rotate the desktop, instead of the IPU.

You might also take a look at Wayland's capabilities, but I am not familiar with that.

Regards, Clay

Marlon Smith

unread,
Dec 18, 2013, 2:57:11 PM12/18/13
to wand...@googlegroups.com
Thanks for your response Clay.  I'm using Qt 4.8 instead of 5 unfortunately, so I'm going to see if I can place my entire application in a QGraphicsView and rotate it using OpenGL.
Reply all
Reply to author
Forward
0 new messages