View Single Post
Old 12-14-2018, 04:18 PM   #315
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,478
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@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 .
Attached Files
File Type: gz kobo-test-rota.tar.gz (5.9 KB, 144 views)

Last edited by NiLuJe; 12-14-2018 at 05:09 PM.
NiLuJe is offline   Reply With Quote