mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Tweak JIT's loopunroll threshold on Kobo 16bpp (#4157)
* Tweak JIT's loopunroll threshold on Kobo 16bpp
To avoid early blacklist of the blitbuffer code on alpha-blending
workloads.
Least terrible workaround we could come up with to "fix" #4137
* gzip kindle/kobo/pb OTA tarballs w/ --rsyncable
Should make them more zsync friendly.
This commit is contained in:
6
Makefile
6
Makefile
@@ -186,7 +186,7 @@ kindleupdate: all
|
||||
# note that the targz file extension is intended to keep ISP from caching
|
||||
# the file, see koreader#1644.
|
||||
cd $(INSTALL_DIR) && \
|
||||
tar -czah --no-recursion -f ../koreader-$(DIST)-$(MACHINE)-$(VERSION).targz \
|
||||
tar -I"gzip --rsyncable" -cah --no-recursion -f ../koreader-$(DIST)-$(MACHINE)-$(VERSION).targz \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
koboupdate: all
|
||||
@@ -215,7 +215,7 @@ koboupdate: all
|
||||
koreader/ota/package.index koreader.png README_kobo.txt
|
||||
# make gzip koboupdate for zsync OTA update
|
||||
cd $(INSTALL_DIR) && \
|
||||
tar -czah --no-recursion -f ../koreader-kobo-$(MACHINE)-$(VERSION).targz \
|
||||
tar -I"gzip --rsyncable" -cah --no-recursion -f ../koreader-kobo-$(MACHINE)-$(VERSION).targz \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
pbupdate: all
|
||||
@@ -252,7 +252,7 @@ pbupdate: all
|
||||
applications/koreader/ota/package.index system
|
||||
# make gzip pbupdate for zsync OTA update
|
||||
cd $(INSTALL_DIR)/applications && \
|
||||
tar -czah --no-recursion -f ../../koreader-pocketbook-$(MACHINE)-$(VERSION).targz \
|
||||
tar -I"gzip --rsyncable" -cah --no-recursion -f ../../koreader-pocketbook-$(MACHINE)-$(VERSION).targz \
|
||||
-T koreader/ota/package.index
|
||||
|
||||
utupdate: all
|
||||
|
||||
2
base
2
base
Submodule base updated: 08c021af2a...10d3aa4375
@@ -23,7 +23,7 @@ local Kobo = Generic:new{
|
||||
model = "Kobo",
|
||||
isKobo = yes,
|
||||
isTouchDevice = yes, -- all of them are
|
||||
hasBGRFrameBuffer = yes, -- has always been the case, even on 16bpp FWs
|
||||
hasBGRFrameBuffer = yes, -- True when >16bpp
|
||||
|
||||
-- most Kobos have X/Y switched for the touch screen
|
||||
touch_switch_xy = true,
|
||||
@@ -198,6 +198,18 @@ local KoboNova = Kobo:new{
|
||||
|
||||
function Kobo:init()
|
||||
self.screen = require("ffi/framebuffer_mxcfb"):new{device = self, debug = logger.dbg}
|
||||
-- NOTE: Something about the extra work needed to handle RGB565 conversions is making the JIT optimizer crazy when doing
|
||||
-- alpha-blending, causing it to very quickly blacklist the entire blitbuffer code, which basically murders performance.
|
||||
-- The least terrible workaround we could come up with is tweaking the optimizer's thresholds a bit,
|
||||
-- to convince it not to give up too early.
|
||||
-- As this may have a detrimental effect on performance, we try to deviate from defaults as little as possible,
|
||||
-- completely avoiding it if possible...
|
||||
-- c.f., #4137 for the gory details.
|
||||
if self.screen.fb_bpp == 16 then
|
||||
logger.info("Enabling Kobo @ 16bpp tweaks")
|
||||
jit.opt.start("loopunroll=45")
|
||||
self.hasBGRFrameBuffer = no
|
||||
end
|
||||
self.powerd = require("device/kobo/powerd"):new{device = self}
|
||||
self.input = require("device/input"):new{
|
||||
device = self,
|
||||
|
||||
Reference in New Issue
Block a user