Debian rotate screen

Started by rspock, August 23, 2013, 06:00:50 PM

Previous topic - Next topic

rspock

I've a 10.1 inch touchscreen display and I need to use it in portrait mode.

I'm using the debian image so, is there a way to rotate the screen of 90°?

thanks

granite_crusher

#1
Hi,
I am also looking into possibility to rotate screen. First I want to ask if android users have rotation functionality?, or is this just Debian and other distros problem?

my board is A13 and LCD is 7', but as I studied the schematics, I think principals is the same.
I looked into this problem and I see two ways to get functionality:
1.Software based
2.Hardware based

Software based
usually in X environment Xorg makes rotation, but that requires capable GPU drivers, I couldn't find if Mali firmware supports it, or if lima drivers (which is still in very development state do that too). There should be also possible to rotate not only X but framebuffer (for example console)
pros: no messing with hardware,
cons: double framebuffer memory consumption, slow.
I am not shure if this is achievable.

hardware based
In schematics of LCD You can see there is lines U/D L/R; which is cuted by open jumper, and instead one line is connected to 3.3V through resistor, other to ground. Because LCD gets serial signal, this defines how screen is populated with pixels/scanned. So to change rotation permanently change of low or high state (3.3V or ground) should be done to U/D L/R line (look to documentation of LCD for U/D L/R attributes). Additionally LCD part in fex script.bin should be changed (I think not only resolution but also V and H freq, offsets etc).

pros: not much to do with software, except fex; no double framebuffer required, no impact to memory usage,
cons: resoldering/soldering needed, messing with hardware


I also have idea of low memory (for A13 it is more important than A10) dynamic rotation using these U/D L/R lines/pins. At this moment 180 dynamic rotation looks most easy to implement: theoretically disconnecting U/D and L/R lines from resistors, and closing jumpers of U/D and L/R so it would have connection with processor/GPIO's. I am just not sure if resistor on U/D & L/R jumpers should be soldered? L/R U/D lines can be programmed as GPIO pins, so switching 1/0 and 0/1 in that GPIO's should rotate LCD 180 degree, with no effort (theoretically it should work without change in fex, it simply would scan LCD instead of from left to right and from up to down, opositive). Implementation of 90 degree looks trickier, because you would need to change resolution. I saw in linux-sunxi page some thing called EDID, and some program for changing HDMI resolution, I couldn't find enough about LCD. If it would be possible to have two resolutions deffined in fex, and switching between them would be possible from OS... things get's more complicated if Touchsreen have to be rotated too..

epd

Hi granite_crusher,

I am working on an android application and I am having a similar problem that I asked about here:
https://www.olimex.com/forum/index.php?topic=1647.0

Is there any chance we could get a response from Olimex on this issue?

Thanks!