mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Kobo: Refactor various aspects of the Kaleido/MTK support (#12221)
* UIManager: Let the fb backend deal with Kaleido wfm promotion. This fixes a number of quirks that poisoned the refresh queue with spurious full-screen refreshes. See https://github.com/koreader/koreader-base/pull/1865 for more details. * This also means we now disable Kaleido waveform modes when color rendering is disabled (remember to trash your thumbnail cache if you don't want to mix color w/ grayscale thumbnails, though). * UIManager: Merge refreshes that share an edge, because that was driving me nuts (and would have most likely been merged by the kernel anyway). A perfect test-case is the FM, which trips two separate refreshes because of its title bar. * ReaderFlipping: Use sensible dimensions, so that we only refresh the icon's region. * ReaderBookmark: Only refresh the dogear instead of the whole page when toggling bookmarks. * NetworkSetting: Make it a real boy, so it consistently refreshes properly on dismiss instead of relying on UIManager saving the day. * Kobo: Aggressively prevent *both* suspend & standby while MTK devices are plugged-in, as both will horribly implode the kernel (we previously only prevent standby while charging). * Kobo: Switch to 8bpp on B&W MTK devices (or when color rendering is disabled on Kaleido panels).
This commit is contained in:
@@ -332,12 +332,17 @@ ko_do_fbdepth() {
|
||||
fi
|
||||
|
||||
# On color panels, we target 32bpp for, well, color, and sane addressing (it also happens to be their default) ;o).
|
||||
# Also, the current lineup of MTK + Kaleido devices doesn't even *support* switching to 8bpp anymore.
|
||||
eval "$(./fbink -e | tr ';' '\n' | grep -e hasColorPanel | tr '\n' ';')"
|
||||
# shellcheck disable=SC2154
|
||||
if [ "${hasColorPanel}" = "1" ]; then
|
||||
echo "Switching fb bitdepth to 32bpp & rotation to Portrait" >>crash.log 2>&1
|
||||
./fbdepth -d 32 -R UR >>crash.log 2>&1
|
||||
# If color rendering has been disabled by the user, switch to 8bpp to completely skip CFA processing
|
||||
if grep -q '\["color_rendering"\] = false' 'settings.reader.lua' 2>/dev/null; then
|
||||
echo "Switching fb bitdepth to 8bpp (to disable CFA) & rotation to Portrait" >>crash.log 2>&1
|
||||
./fbdepth -d 8 -R UR >>crash.log 2>&1
|
||||
else
|
||||
echo "Switching fb bitdepth to 32bpp & rotation to Portrait" >>crash.log 2>&1
|
||||
./fbdepth -d 32 -R UR >>crash.log 2>&1
|
||||
fi
|
||||
|
||||
return
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user