Kernel V4.4 _ General Notes - LGE-G5-G6-V20/msm8996_lge_kernel GitHub Wiki

General notes

Here are some notes not specific to any of the sections above, and that work more as a small compendium of development decisions and some minor details on certain features.


Some features like dp alt mode were dropped from the usb stack. None of the developers have a way of testing it, so keeping that older code unmaintained in there would do us no good.

Many, many pr_info and dev_info calls were converted to pr_debug and dev_dbg calls, cutting down on a lot of the logging generated on a release kernel, while still providing DEBUG configs to re-enable them if needed.

We decided to drop as much LGE code as possible, instead relying on qcom's own code for the majority of the usb and battery subsystems' functions. Some problems cropped up here and there, forcing us to look at other 8996 devices with 4.4 kernels such as Lenovo's Zuk Z2, Xiaomi's Gemini and Sony's Tone/Kagura.

A good chunk of the usb stack on all three phones is lifted from sony's msm8996 4.4 kernels. Here's a reference to one of their kernels that's similar to ours.

Not all of the usb problems were located in the kernel. The gadget mode's functions needed to be set up in the init.qcom.usb.rc script, located in the device's common trees. Those changes were also mostly lifted from sony's devices.

Going from 3.18 to 4.4 had qcom adding many new qdsp6v2 audio routes, routes not used at all by devices like ours, so we ended up cutting many of those to remove error logs related to "unused paths". If those removals cause problems, we can revert this and also this one. - We can try cleaning some routes later, since audio now works, but we'll play safe for now and leave basically all of them in, even if the logs complain about lacking widgets for all of those.

Some trace_printk() calls were commented out to save on memory allocation, but the macro definition might make those allocations come back if any new call is introduced anywhere in the kernel's code. This is the commit containing those adjustments.