[KERNEL][AOSP/TW][27 Dec] War Kernel r3 // colder than ever

ardicli2000

Senior Member
Sep 30, 2011
586
184
63
I made another interesting discovery today. :) It's related to the Insignal graphics stack I tried to merge last year.

So, last year, Insignal released their jb-mr1.1 source for Exynos 4412 that was insanely great because their graphics stack is entirely revamped from the ground up, looking a lot like what's found in the Nexus 10 which uses an Exynos 5 SoC. When doing the diff, it turns out this SoC is not so different from our Exynos 4, so the code is like 95% similar.

The first thing to do was to merge the userspace code. That's a slightly modified gralloc with an entirely new hwcomposer that does the job. After testing it, it was barely working, crashing a lot, and after some inspection it turned out that we needed to update some kernel drivers.

The Insignal kernel is based on the 3.4 Android kernel reference, s3cfb driver is nuked and replaced by a new s3c-fb framebuffer driver that interacts with the new hwcomposer and uses dmabuf/ION. This new driver in turn depends on a new 3.4 ION driver and Mali blobs with UMP disabled and dmabuf enabled (r3p2).

I could merge the new ION driver without much problems, and the Mali driver was just a matter of replacing the blobs. However, removing the old s3cfb driver meant that the panel driver was also gone (the Origen board uses a LCD, which is completely different), and I had no idea how to get the panel working at this point. Also, merging the s3c-fb driver meant that the kernel was crashing early with no way to debug it. I was hitting a wall...

This morning I looked at the i9500 (S4) kernel code and guess what... Everything's there, the new framebuffer driver with all the panel drivers, even OUR panel driver! It includes: s3c-fb, MIPI-DSI driver, lcdfreq driver, s6e8aa0 panel driver. I know how to merge this sh*t. And we have three reference sources: exynos4 insignal, exynos5 nexus, exynos5 i9500 that share almost the same code.

One problem though, Insignal has taken down the sources and binaries a few months ago. However, we have it all backed up: kernel source, userspace code (1, 2), and the last missing piece, the blobs (thanks @sbrissen !).

This is our chance to get a graphics stack that surpasses what Samsung ships and will ever ship with Touchwiz for i9100/N7000/i9300/N7100 :victory:

Edit: I'm writing this wall of text to help other developers understand what's going on. This is something I needed when I started developing... It is very hard to get any documentation, so I hope it will help others that would like to take part of this.

Edit2: by looking at gralloc_priv.h, it seems Insignal's gralloc is based on r3p2-01rel0 release.
First of all, @GeeckoDev you are amazing :D

Secondly, what I understand from your post is that, due to lack of necessary documentation for exynos devices, Devs were having hard times and difficulties to develop better even TW and AOSP based Roms. Now with your new findings, they are going to be able to dig more info and will have the chance to implement new changes which will bring a stable Rom with a truly and fully working HWComposer, gralloc nad 60Hz Screen.

If these implementations will not result in performance boost at all, they will bring us to the edge of using our Note at full performance with Custom Roms and maybe with TWs. Like Lollipop Rom developed by @bauner, we can use our devices even one year or two more. This time more stable and efficient.

Hope I am right :)

Regards,
Kerem
 

urviagarwal

Senior Member
Nov 24, 2014
156
43
0
New Delhi
Sorry if it sounds nonsensical but...I flashed r7.k44 over Carbon ROM.. got continious FC on startup ..
I had to remove the battery and then boot on recovery and reflash the ROM and then restore..

Few pages back someone posted about flashing the previous version with Carbon and seemed to have worked fine..
 

GeeckoDev

Senior Member
Feb 26, 2013
458
3,331
0
Announcing Raw Kernel r4 for Touchwiz

Changes over Raw Kernel TW r3 :
* FPBug patch included
* misc fixes for initramfs and build

Only compatible with Touchwiz roms.

Download :
* raw_kernel_r4_tw.zip (r3p1 blobs + libc.so included)

FPU corruptions are gone. Touchwiz will be more stable than it ever was. It also seems to fix a little glitch I had where, when using the Google Now Launcher, the wallpaper was slightly lagging behind.

Edit: also fixes unstable USB tethering !

Coming soon for AOSP roms (Omni, CM11, CM12). :good:
 
Last edited:

User_99

Senior Member
Jul 3, 2009
2,857
1,143
193
Any chance to get this fix included in TW r1 kernel becouse of Gallery bug? Finger crossed :)
 
Last edited:

FabreFaction

Senior Member
Oct 22, 2009
935
692
0
www.endoftheinternet.com
@GeeckoDev

Hi

The link for 4.4V7 seems to be down (((raw_kernel_r7_k44.zip)))
When I click on the link it is directing me to http://ge.tt/2xXs4y62/v/0?c
Not sure if this is correct as this is the first time I've tried to download V7
It does look as though ge.tt might be down for some reason though
I don't suppose you've mirrored the file anywhere?
NOTE: Just quickly checked the links for 5.0 and TW, they aren't working either.

Thanks for a groovy year of N7000 development.
Long may you continue to push and improve our ageing device.
All your efforts are much appreciated.
Best wishes to you and yours over the festive season and into the New Year.

Cheers..................... FF