Skip to content

Commit

Permalink
TouchMenu: Workaround an EPDC race in the hold handler w/ flash_ui (#…
Browse files Browse the repository at this point in the history
…7325)

* Also bump base, because it's mildly related

koreader/koreader-base#1312
  • Loading branch information
NiLuJe committed Feb 21, 2021
1 parent 10f65a1 commit e582036
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base
Submodule base updated 1 files
+14 −10 ffi/framebuffer_mxcfb.lua
6 changes: 6 additions & 0 deletions frontend/ui/widget/touchmenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ function TouchMenuItem:onHoldSelect(arg, ges)
UIManager:setDirty(nil, "fast", highlight_dimen)
UIManager:forceRePaint()
-- NOTE: These very specific circumstances appear to reliably upset the EPDC,
-- causing a mild variant of our racey friend the papercut refresh glitch ;).
-- As it appears to stem from the race between *this* refresh for the highlight and the following writes to the fb,
-- let the kernel take a breather. It'll yield back to us when it's done.
-- Expect it to block for ~150 to 350ms. Given the context (a hold gesture), we can absorb the latency hit mostly unnnoticed.
UIManager:waitForVSync()
-- Unhighlight
--
Expand Down

0 comments on commit e582036

Please sign in to comment.