Skip to content

Commit 1db808e

Browse files
committed
Update documentation on how to do 90 degrees rotation. #212
1 parent 7c4a05a commit 1db808e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,10 +389,18 @@ The `fbcp` part in the name means *framebuffer copy*; specifically for the ILI93
389389
390390
Yes, it does, although not quite as well as on Pi 3B. If you'd like it to run better on a Pi Zero, leave a thumbs up at https://github.com/raspberrypi/userland/issues/440 - hard problems are difficult to justify prioritizing unless it is known that many people care about them.
391391
392+
#### The driver works well, but image is rotated 90 degrees. How do I rotate the display between landscape and portrait?
393+
394+
Edit the file `config.h` and comment out the line `#define DISPLAY_OUTPUT_LANDSCAPE`. This will make the display output in portrait mode, effectively rotating it by 90 degrees. Note that this only affects the pixel memory reading mode of the display. It is not possible to change the panel scan order to run between landscape and portrait, the SPI displays typically always scan in portrait mode. The result is that it will change the panel vsync tearing mode from "straight line tearing" over to "diagonal tearing" (see the section About Tearing above).
395+
396+
If you do not want to have diagonal tearing, but would prefer straight line tearing, then additionally enable the option `#define DISPLAY_FLIP_ORIENTATION_IN_SOFTWARE` in `config.h`. That will restore straight line tearing, but it will also increase overall CPU consumption.
397+
392398
#### The driver works well, but image is upside down. How do I rotate the display?
393399
394400
Enable the option `#define DISPLAY_ROTATE_180_DEGREES` in `config.h`. This should rotate the SPI display to show up the other way around, while keeping the HDMI connected display orientation unchanged. Another option is to utilize a `/boot/config.txt` option [display_rotate=2](https://www.raspberrypi.org/forums/viewtopic.php?t=120793), which rotates both the SPI output and the HDMI output.
395401
402+
Note that the setting `DISPLAY_ROTATE_180_DEGREES` only affects the pixel memory reading mode of the display. It is not possible to flip the panel scan to run inverted by 180 degrees. This means that adjusting these settings will also have effects of changing the visual appearance of the vsync tearing artifact. If you have the ability to mount the display 180 degrees around in your project, it is recommended to do that instead of using the `DISPLAY_ROTATE_180_DEGREES` option.
403+
396404
#### How exactly do I edit the build options to e.g. remove the statistics lines or change some other option?
397405
398406
Edit the file `config.h` in a text editor (a command line one such as `pico`, `vim`, `nano`, or SSH map the drive to your host), and find the appropriate line in the file. Add comment lines `//` in front of that text to disable the option, or remove the `//` characters to enable it.

config.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@
157157
// install the display in its natural rotation order, if possible.
158158
// #define DISPLAY_ROTATE_180_DEGREES
159159

160-
// If defined, displays in landscape. Undefine to display in portrait. When changing this, swap
161-
// values of DISPLAY_WIDTH and DISPLAY_HEIGHT accordingly
160+
// If defined, displays in landscape. Undefine to display in portrait.
162161
#define DISPLAY_OUTPUT_LANDSCAPE
163162

164163
// If defined, the source video frame is scaled to fit the SPI display by stretching to fit, ignoring

0 commit comments

Comments
 (0)