@baskerville: We (roughly) came to the same conclusion
.
Turns out it really, really doesn't like it when swapping between inverted layouts in the *same* orientation layout.
The ioctls happily go through, and return successfully, but the rotation doesn't actually happen.
Attached a C testcase
.
TL;DR: if the value to be set is equal to the current rotate value, go through an intermediary rotation to do an initial portrait/landscape swap (i.e., (n+1)%4).
EDIT: And here's what it spouts on my H2O:
Code:
Variable fb info: 1080x1440, 32bpp @ rotation: 1 (Clockwise, 90°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 4352 bytes
FB_ROTATE_UR to FB_ROTATE_CCW, +1 increments
Setting rotate to 0 (Upright, 0°)
Rotate is now 2 (Upside Down, 180°)
Variable fb info: 1440x1080, 32bpp @ rotation: 2 (Upside Down, 180°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 5760 bytes
Setting rotate to 1 (Clockwise, 90°)
Rotate is now 3 (Counter Clockwise, 270°)
Variable fb info: 1080x1440, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 4352 bytes
Setting rotate to 2 (Upside Down, 180°)
Rotate is now 0 (Upright, 0°)
Variable fb info: 1440x1080, 32bpp @ rotation: 0 (Upright, 0°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 5760 bytes
Setting rotate to 3 (Counter Clockwise, 270°)
Rotate is now 1 (Clockwise, 90°)
Variable fb info: 1080x1440, 32bpp @ rotation: 1 (Clockwise, 90°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 4352 bytes
FB_ROTATE_UR to FB_ROTATE_CCW, +2 increments
Setting rotate to 0 (Upright, 0°)
Rotate is now 2 (Upside Down, 180°)
Variable fb info: 1440x1080, 32bpp @ rotation: 2 (Upside Down, 180°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 5760 bytes
Setting rotate to 2 (Upside Down, 180°)
Rotate is now 2 (Upside Down, 180°)
Variable fb info: 1440x1080, 32bpp @ rotation: 2 (Upside Down, 180°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 5760 bytes
FB_ROTATE_CW to FB_ROTATE_CCW, +2 increments
Setting rotate to 1 (Clockwise, 90°)
Rotate is now 3 (Counter Clockwise, 270°)
Variable fb info: 1080x1440, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 4352 bytes
Setting rotate to 3 (Counter Clockwise, 270°)
Rotate is now 3 (Counter Clockwise, 270°)
Variable fb info: 1080x1440, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 4352 bytes
FB_ROTATE_UR to FB_ROTATE_CCW, +2 increments, intermerdiary rota if ==
Setting rotate to 0 (Upright, 0°)
Rotate is now 2 (Upside Down, 180°)
Variable fb info: 1440x1080, 32bpp @ rotation: 2 (Upside Down, 180°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 5760 bytes
Intermerdiary rotation...
Setting rotate to 3 (Counter Clockwise, 270°)
Rotate is now 1 (Clockwise, 90°)
Variable fb info: 1080x1440, 32bpp @ rotation: 1 (Clockwise, 90°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 4352 bytes
Requested rotation
Setting rotate to 2 (Upside Down, 180°)
Rotate is now 0 (Upright, 0°)
Variable fb info: 1440x1080, 32bpp @ rotation: 0 (Upright, 0°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 5760 bytes
FB_ROTATE_CW to FB_ROTATE_CCW, +2 increments, intermerdiary rota if ==
Setting rotate to 1 (Clockwise, 90°)
Rotate is now 3 (Counter Clockwise, 270°)
Variable fb info: 1080x1440, 32bpp @ rotation: 3 (Counter Clockwise, 270°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 4352 bytes
Intermerdiary rotation...
Setting rotate to 0 (Upright, 0°)
Rotate is now 2 (Upside Down, 180°)
Variable fb info: 1440x1080, 32bpp @ rotation: 2 (Upside Down, 180°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 5760 bytes
Requested rotation
Setting rotate to 3 (Counter Clockwise, 270°)
Rotate is now 1 (Clockwise, 90°)
Variable fb info: 1080x1440, 32bpp @ rotation: 1 (Clockwise, 90°)
Fixed fb info: ID is "mxc_epdc_fb", length of fb mem: 6684672 bytes & line length: 4352 bytes
EDITē: I wasn't convinced we could trust PUT_V not to mangle rotate without an extra GET_V to confirm, but, yeah, you're right, that works
.