View Single Post
Old 07-21-2024, 01:22 PM   #289
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,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by NiLuJe View Post
(i.e., does this *actually* rotate the framebuffer in some way, or does Nickel handle rotation entirely in software on that device).
It does do a HW rotate to CCW (canonical) on a H2O, FWIW.

In which case... does this patch fix it?

Code:
diff --git a/fbink_device_id.c b/fbink_device_id.c
index c324c0c..9a10530 100644
--- a/fbink_device_id.c
+++ b/fbink_device_id.c
@@ -644,8 +644,14 @@ static void
                        strtcpy(deviceQuirks.devicePlatform, "Mark 4", sizeof(deviceQuirks.devicePlatform));
                        break;
                case DEVICE_KOBO_GLO:    // Glo (kraken)
-                       deviceQuirks.isKoboNonMT = true;
-                       deviceQuirks.screenDPI   = 212U;
+                       deviceQuirks.isKoboNonMT                = true;
+                       // {3, 2, 1, 0}, but no ioctl quirks
+                       deviceQuirks.ntxRotaQuirk               = NTX_ROTA_CCW_TOUCH;
+                       deviceQuirks.rotationMap[FB_ROTATE_UR]  = FB_ROTATE_CCW;
+                       deviceQuirks.rotationMap[FB_ROTATE_CW]  = FB_ROTATE_UD;
+                       deviceQuirks.rotationMap[FB_ROTATE_UD]  = FB_ROTATE_CW;
+                       deviceQuirks.rotationMap[FB_ROTATE_CCW] = FB_ROTATE_UR;
+                       deviceQuirks.screenDPI                  = 212U;
                        strtcpy(deviceQuirks.deviceName, "Glo", sizeof(deviceQuirks.deviceName));
                        strtcpy(deviceQuirks.deviceCodename, "Kraken", sizeof(deviceQuirks.deviceCodename));
                        strtcpy(deviceQuirks.devicePlatform, "Mark 4", sizeof(deviceQuirks.devicePlatform));
(Ideally, without breaking other rotations ;p. i.e., check `ftrace` in each rotation: `fbdepth -R UR` then `-R CW` -> `-R UD` -> `-R CCW`).

Keep in mind it means rotating the *device* itself, not the buffer. e.g., what Nickel does for landscape for me is a CCW rotate.

Last edited by NiLuJe; 07-21-2024 at 01:26 PM.
NiLuJe is offline   Reply With Quote