Remove the Kobo-specific 16bpp JIT loopunroll tweak (#4784)

* Remove the Kobo-specific 16bpp JIT loopunroll tweak
It's now generic, and handled in ffi/blitbuffer.lua directly.
pull/4793/head
NiLuJe 5 years ago committed by GitHub
parent ce3d181e24
commit fdf92e13ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
Subproject commit 8c9456654369b74813e3932471d307d94647285f
Subproject commit 6d27a176d1bc6124aafe7bee9dbbcaea0651fe35

@ -249,20 +249,9 @@ end
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.
-- FIXME: Might want to make that mandatory, because we've been finding more and more ways to make the JIT go crazy,
-- both at 32bpp and at 8bpp (c.f., #4752).
if self.screen.fb_bpp == 16 then
logger.info("Enabling Kobo @ 16bpp tweaks")
jit.opt.start("loopunroll=45")
elseif self.screen.fb_bpp == 32 then
if self.screen.fb_bpp == 32 then
-- Ensure we decode images properly, as our framebuffer is BGRA...
logger.info("Enabling Kobo @ 32bpp BGR tweaks")
self.hasBGRFrameBuffer = yes
end
self.powerd = require("device/kobo/powerd"):new{device = self}

Loading…
Cancel
Save