Skip to contentSkip to conversation

iMX6UL And framebuffer rotation

DISCUSSION Simone 3 participants 8 messages May 24, 2016 1 message not in the archive

lore
Share & tools
lore

Simone

author
#0 lore raw

Dear All,
In a new project I need to develop a portrait GUI.
The hardware is based on iMX6 UltraLite processor.
My screen is a 800x480 and I wonder if there is a way to rotate the framebuffer by 90 degrees in order to "see" a 480x800 display from the application.

Any idea?

Thanks a lot
Simone

#1 lore raw
Quoted 6 lines · Simone

Dear All,
In a new project I need to develop a portrait GUI.
The hardware is based on iMX6 UltraLite processor.
My screen is a 800x480 and I wonder if there is a way to rotate the framebuffer by 90 degrees in order to "see" a 480x800 display from the application.

Any idea?

I was in the same situation a few months ago. I tried some linux kernel patches to support 90 degree rotation, but they all failed (crashed, didn't really rotate, etc...). In the end I/we rotated the UI in the GUI toolkit (Qt5/QML). I don't know if that is an option for you, just wanted to mention it.

Best regards,
Bjørn Forsman

author
#2 lore raw

Thank you Bjørn,
I'm aware of QML rotation capabilities, but unfortunately I need to use Qt5 widgets for that project.. Mmm.. May I know which kernel you used to test the patches?
I'm using the latest linux 4.1 from the community.

Regards,
Simone

Quoted 18 lines

Il giorno 24/mag/2016, alle ore 22:22, Bjørn Forsman <[email protected]> ha scritto:

Quoted 7 lines · Simone

Dear All,
In a new project I need to develop a portrait GUI.
The hardware is based on iMX6 UltraLite processor.
My screen is a 800x480 and I wonder if there is a way to rotate the framebuffer by 90 degrees in order to "see" a 480x800 display from the application.

Any idea?

I was in the same situation a few months ago. I tried some linux kernel patches to support 90 degree rotation, but they all failed (crashed, didn't really rotate, etc...). In the end I/we rotated the UI in the GUI toolkit (Qt5/QML). I don't know if that is an option for you, just wanted to mention it.

Best regards,
Bjørn Forsman

#3 lore raw
Quoted 4 lines · Simone

Thank you Bjørn,
I'm aware of QML rotation capabilities, but unfortunately I need to use Qt5 widgets for that project.. Mmm.. May I know which kernel you used to test the patches?
I'm using the latest linux 4.1 from the community.

Qt5 widgets can also be rotated. We did it for some customers as well.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
author
#4 lore raw

Thanks Otavio, nice to hear that.
Do you have a link with some example or references?

Regards,
Simone

Quoted 14 lines

Il giorno 24/mag/2016, alle ore 23:20, Otavio Salvador <[email protected]> ha scritto:

Quoted 5 lines · Simone

Thank you Bjørn,
I'm aware of QML rotation capabilities, but unfortunately I need to use Qt5 widgets for that project.. Mmm.. May I know which kernel you used to test the patches?
I'm using the latest linux 4.1 from the community.

Qt5 widgets can also be rotated. We did it for some customers as well.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#5 lore raw
Quoted 2 lines · Simone

Thanks Otavio, nice to hear that.
Do you have a link with some example or references?

No but your Qt guys can easily find it, I think.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#6 lore raw
Quoted 5 lines · Otavio Salvador
Quoted 2 lines · Simone

Thanks Otavio, nice to hear that.
Do you have a link with some example or references?

No but your Qt guys can easily find it, I think.

I had success with this[1] (before we switched to QML):

QGraphicsScene *scene = new QGraphicsScene(); QGraphicsView *view = new QGraphicsView(parent); view->setGeometry(0,0,X,Y); // actual Display size view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); QGraphicsProxyWidget *proxy = scene->addWidget(this); view->setScene(scene);
view->show();
view->rotate(90);

[1]: https://forum.qt.io/topic/22852/qt-5-embedded-screen-rotation/13

Best regards,
Bjørn Forsman

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw
Quoted 2 lines · Simone CJB

[...] May I know which kernel you used to test the patches? I'm using the latest linux 4.1 from the community.

Linux 3.14.x. (Wandboard kernel in Yocto Jethro.)

- Bjørn