Performance gets low after display rotation

Qt application performance gets low after the display is rotated left.

root@apalis-imx6:~# xrandr -o left

In normal display, the application draws line. And /usr/bin/X consumes 23.3% of CUP resource. The Qt5.5 application uses around 74% of CUP. After the display is rotated. /usr/bin/X consumes up to 65% of CUP resource. And the Qt application performance also gets lower.

The test application is uploaded at

It seems X windows limits the performance.

Sorry , it is CPU resource monitored by htop.

In the mxc fb driver, only vertical flip is supported.

Dose it mean rotation 90 degree can only be processed via X11 ?

Yeah it seems that the mxc fb driver we use currently only supports flip. I think the hardware could do other operations, at least there is some discussion around that on NXP Community:

Not sure how X does rotation here, it could be doing it in software (CPU rotates the whole framebuffer)… This probably also depends how Qt and X11 interact. In general it is not a good idea to do rotation in a lower layer. The display always will need the pixels supplied in horizontal lines, hence somebody needs to rotate the framebuffer. And rotating a framebuffer is an expensive operation, especially for higher resolution (19201080 4 Bytes… per Frame!). Even if there is hardware support for the actual rotation, it would still require a lot memory bandwidth and hence affect the overall system performance.

So the best thing is if the framebuffer does not need to be rotated at any time. Instead, just let the application on top render it in a rotated manor. With Qt 5 and Qml 2 this is actually very easy to do: Just add a transformation at the very top. I recently created a small proof of concept:

Thanks, Stefan. With this method rotation in Qt application itself, it can achieve similar performance as normal display. I test it with Qt5_CinematicExperience and the frame rate is 60 fps as well.