How to use TouchGFX framebuffer to mirror x axis only

816 Views Asked by At

I have a circular MIPI-DSI display and need to rotate the image by 180 deg. I've read the SW-only implementation post here, but it specifically mentions that this makes memory use highly inefficient, which is not ideal for our battery powered device. The manufacturer of the display recommended that the 180 degree flip is done with flipping just the x-axis in TouchGFX code (basically just changing x coordinates to 454-x (454 is the max disp width)) and then using a scan direction switch command on their display HW to flip the y-axis. Ideally this all would be completely transparent to the higher level TouchGFX code - i.e. the graphics configuration utility would know nothing about this and would just let me configure a normal display view. Any thoughts on the best approach to this as well as if there is any benefit to this approach vs just doing the whole rotation in SW as shown in the thread above? Thanks in advance!

1

There are 1 best solutions below

0
On

Currently, TouchGFX does not support 180 degree rotation because usually this is configurable in hardware drivers. It does happen, though, that manufacturers mount things the wrong way and have no option of changing hardware that's already been mounted/produced.

The Software version, remembering that it's not directly supported, is really expensive. I've posted a Mirror widget (Mirror.hpp) on the TouchGFX sub-community (community.st.com) that does this mirror by swapping each pixel, but don't use it if you're after performance.