Okita Kernel For Xiaomi Mi 9 SE

Discussion Thread : xda-developers
GitHub Source
Custom Releases : https://github.com/okitavera/msm-4.9-grus-okita
CAF w/ basic Mi 9 SE patches : https://github.com/okitavera/msm-4.9-grus
Magisk Add-on for People in A Hurry

Notes:
The latest build for MIUI 10 Stable is v6.1.
Above than that, it's only for custom (AOSP-based) ROMs.

Version 7.0-r2   Download

Changelog
  • Rebased to CAF kernel.lnx.4.9.r14 with Linux Stable 4.9.189 merged in
  • Reworked Xiaomi patchset with cleaned up unused MIUI-things and non-grus patches.
  • Migrate camera driver to CAF (thanks to @krasCGQ)

R2 Changelog

  • Add High-Brightness-Mode status for LineageOS's LiveDisplay
    (Fix "phone is starting"-loop issues on XenonHD)

Version 6.1   Download

Changelog
  • Merge Upstream Linux 4.9.189
  • Merge CAF tag LA.UM.7.8.r1-06700-SDM710.0 (audio and wlan modules)
  • Revert several AOSP Q beta cgroups changes
  • Reduce unused debugging on goodix_ts even more
  • Security enhancement: disable coresight and don't export debug symbols
  • Re-enable support for any type of ramdisk (fix bootlove issues on non-miui system)

Version 6.0-r2   Download

Changelog
  • Merge Latest CAF Tag LA.UM.7.8.r1-06600-SDM710.0
  • Greatly reduce zRAM limit to 1GB to prevent nonsense xiaomi tweaks
  • Bring several cgroups patches from aosp's kernel/common
  • Fix SoC not keeping full after charging overnight
  • Disable I/O stats collections on queue's flag to get better latency
  • Optimize ext4's fsync for non-rotational drives
    [builder-related changes]
  • Fix clang's warning when building camera modules
  • Silent several warning from dt compiler

R2 Changelog

  • Enable several QTI's needed components for Non-MIUI system

Version 5.6   Download

Changelog
  • Merge Upstream Linux v4.9.188
  • Bring several cpufreq and scheduler improvement from aosp's kernel/common
  • Bring zstd compression from aosp's kernel/common (lz4 are still used by default for zRAM, so experiment yourself)
  • Set maximum zRAM creation limits to 2GB (Xiaomi use 2.6GB by default, so that's why I limit that to 1.5GB before)
  • Also bring the lzo-rle compression from mainline (yes, I'm still with lz4)
  • Fix SchedTune-boosted tasks being migrated to little-cluster (thanks to @RenderBroken)
  • Let SchedTune's top-app boost value to be adjusted by user (たぶんwww)
  • Drop unused selftest from goodix_ts driver (even the QC Test are still working, so...)
  • Reduce cpu idle overheads caused by event logging (thanks to @kdrag0n)
  • Reduce unnecessary logging and overheads on wlan module (thanks to @arter97)

Version 5.5-r2   Download

Changelog
  • Merge CAF tags to LA.UM.7.8.r1-06500-SDM710.0 (audio-kernel and Wi-Fi modules are updated too)
  • Uses a new installer called bootwitch. Open-source too (with GPLv3)
  • Add up/down freq transition rate-limits for schedutil.
  • Fix energy compute when a cluster is only a cpu core in multi-cluster system.
  • Fix massive cpufreq_times memory leaks
  • Update LZ4 from upstream kernel/common/ (now our zRAM is even faster than before 🚀 🚀)

R2 Changelog

  • Fix invalid WiFi signal after merging latest CAF Tags for WiFi driver

Version 5.4   Download

Changelog
  • Add K-lapse v5.0
  • Reduce unused debugging on the audio-kernel even more
  • Remove Adrenoboost mechanism

Version 5.3   Download

Changelog
  • Fix double tap to wake on non-MIUI ROM
  • Add missing US Proximity Driver from kowalski-kernel
  • Reduce some unused logging on audio-dsp
    [builder related changes]
  • Remove my build script from the kernel tree

Version 5.2   Download

Changelog
  • Merge Upstream Linux v4.9.186
  • Fix several performance regression on camera caused by some caf patches
  • NEON accelerated XOR implementation (performance improvement)
  • Force disable trace_printk() usage (reduce unused debug logging)
  • Disable Adreno Driver Logging
  • Disable DRM drivers keep track of fence names by default (reduce CPU bottleneck)
  • Remove Display P3 params being sets when initializing dsi_panel (caused by pyxis's missmerged)
  • Remove exposure adjustment (sorry Havoc users)
    [builder related changes]
  • speed up to 40-50% of build process when hitting techpack/audio/

Version 5.1   Download

Changelog
  • Introduce brightness_clone interface for backlight driver (Fix several brightness issues especially with DC dimming)
  • Synchronize Xiaomi TouchFeature updates (Needed by MIUI - sensor and gamemode)
  • Synchronize Goodix Panel driver with Xiaomi updates
  • and other display-related (doze and dimming) patches that also ported from Mi A3
    [builder related changes]
  • Update dtc to upstream dtc-v1.4.6-9

Version 5.0   Download

Changelog
  • Introduce exposure adjustment driver a.k.a PWM Flicker-free for non MIUI ROM
  • Add sdfat from https://github.com/cryptomilk/kernel-sdfat
  • Removed fsync control (Dangerous, can leads to memory corruptions)
  • Several SELinux changes to reduce overhead
  • Disable qcacld-3.0's qcom_rx_wakelock (Reduce wakeup times)
  • Disable RCU boost and expedited grace periods after init (Reduce idle drain and CPU utils, increase boot time)
  • Suppress verbose output during boot (Reduce boot time and logging)
  • Disable memcg kernel and socket accounting (Reduce kmem caches overhead)
  • Reduce early wakeups before vsync events (Reduce power consumption)
  • Panel and FOD delay-after-sleep correction
  • Revert backlight resend mechanism (fix 100ms dropped backlight on MIUI 10.3.3.0)
  • Cleanup unused ramoops cmdline, driver and input boost value on defconfig
    [builder related changes]
  • Set Optimization level 3 by default when clang is detected as toolchain
  • Update dtc to upstream AOSP 1.4.4 (No need to get the prebuilts/misc/dtc anymore)

Version 4.5   Download

Changelog
  • Upstream kernel to 4.9.185 (android-linux-stable)
  • Allow enforcing deepest cluster idle state selection
  • Use power efficient workqueues on the vmstat and audio-kernel
  • Hardcode dirty_expire_centisecs to 30s (https://android-review.googlesource.com/c/platform/system/core/+/938362)
  • Add IPA_RM12 and IPA_WS to the default block list (thanks to @pengus77 for more wakelock block list)
  • Updated Goodix GT9886 firmware from MIUI Dev
  • Cleaned-up unused touchscreen driver

Version 4.1   Download

Changelog
  • Fix short-peaking issue on the speaker Sound Control

Version 4.0   Download

Changelog
  • Add Sound Control for our Speaker
  • Fix overlapped call and notification values on haptic control
  • Cleanup debug bloat on Wi-Fi driver as much as possible
  • Cleanup some unused xiaomi changes on driver departments (camera and fragmention)
  • Removed schedutil_pixel (blu_schedutil and default schedutil is more than enough)
  • Adjust Dynamic Stune Boost default to 10%
  • Turned-down Performance cluster to 748MHz
  • Keeping boosted freq that based on touch input a litte bit longer
  • Enable workqueue power saving by default

Version 3.5   Download

Changelog
  • Fix unavailable Fingerprint-on-Display on MIUI Developer
  • Added Headphone Sound control
  • Completely reduce GPU timeout

Version 3.0   Download

Changelog
  • Remove xiaomi's memory management and restore it to the default Linux/CAF changes (zram, vmalloc, lmk).
  • Remove unused xiaomi's package runtime info, manual watchdog invocation and other minor changes.
  • Now this kernel uses compiled dtbo.img from the source code itself, thanks to @faust93 for the patch.
  • Merged Qualcomm Atheros WLAN modules (LA.UM.7.8.r4-01000-SDM710.0).
  • More tweaks on the CPU big cluster battery costs.
  • Reduced the GPU idle timeout for earlier low-power state.

Version 2.5   Download

Changelog
  • Updated to the new osmosis's AnyKernel3 (faster installation process)
  • Load initramfs dynamically based on the ramdisk states (no need to magisk hexpatch anymore to preserve the Magisk)
  • Add another CPU Governor : blu_schedutil. (Blu_schedutil is an EAS cpu governor from BluSpark kernel that focusing on battery life)
  • Lower deboost freq on little CPUs
  • UFS Tweaks : Remove unnecessary deep idle states and better pm_qos restrictions to save more battery
  • Disable unused debugging
  • Disable conservative, userspace, and ondemand cpu governor

Version 2.0   Download

Changelog
  • Merge "nathanchance/android-kernel-clang/tree/msm-4.9-pie" (Now this kernel is compiled with aosp clang)
  • Add CAF audio-kernel with Xiaomi's patchset and some fixes from Flex1911, (hope) it fixes proximity problems on some custom MIUI ROMs.
  • Add schedutil CPU Governor from Pixel devices (rebranded as schedutil_pixel)

Version 1.5   Download

Changelog
  • Merge Latest CAF tag LA.UM.7.8.r4-01000-SDM710.0
  • Enable iptables TTL modification target
  • Add more input boost patchsets for snappier app launch
  • Memory optimization with lz4 zram and sigkill reaper
  • Add accessible vibration adjustment and kcal color control

Version 1.0   Download

Changelog
  • Initial Release