[Galaxy S I9000 Android Development] Lukiqq:
Many of you (and me too) are complaining about the screen used in our Galaxy S. In some cases terrible color reproduction, black is not black, image is too shallow, red/green or blue tint, blurry or too much sharpen text, yellowish white, too bright or too dark screen. After a weeks of investigating I can show you where to look for to make these annoying things better :) In the first post of this topic I'll explain the most important things useful for kernel makers. For now you can test effects of my work by trying Galaxian* kernel attached to this post. This version has never been published before. Please enjoy the discussion.

* Based on JVT initramfs, will work with every Gingerbread ROM

​

Theory (still in progress):

AMOLED vs TFT LCD , what are the major differences?

On AMOLED screen each pixel controls it's own color and brightness, since it is an individual LED, so black on AMOLED is an off pixel technically, on LCD black still has a light behind it because LCD screens require a backlight. Basically colors are more rich and vibrant on AMOLED. Next important difference between these two screens is power consumption. While an OLED will consume around 40% of the power of an LCD displaying an image which is primarily black, for the majority of images it will consume 60–80% of the power of an LCD: however it can use over three times as much power to display an image with a white background such as a document or website. This can lead to reduced real-world battery life in mobile devices.

What we can do to improve our SAMOLED screen quality?

Galaxy S screen is controlled by s6e63m0 AMOLED Panel Driver which is implemented inside the kernel and occurs in many places in the form of multiple files. Values in mentioned files are present in the hexadecimal system which can be converted to decimal for better understanding. Useful site: http://easycalculation.com/hex-converter.php

most important for us are:

/arch/arm/mach-s5pv210/aries-panel.c

static const u16 s6e63m0_SEQ_ETC_SETTING[] = {
/* ETC Condition Set Command */
0x0F6,
0x100, 0x18E,
0x107,
0x0B3,
0x16C,
0x0B5,
0x12C,	0x112,
0x10C,	0x10A,
0x110,	0x10E,
0x117,	0x113,
0x11F,	0x11A,
0x12A,	0x124,
0x11F,	0x11B,
0x11A, 0x117,
0x12B, 0x126,
0x122, 0x120,
0x13A, 0x134,
0x130, 0x12C,
0x129, 0x126,
0x125, 0x123,
0x121, 0x120,
0x11E, 0x11E,
0x0B6,
0x100, 0x100,
0x111, 0x133, [COLOR="Red"][B]//red color saturation[/B][/COLOR]
0x133, 0x144,
0x144, 0x144,
0x155, 0x155,
0x166, 0x166,
0x166, 0x166,
0x166, 0x166,
0x0B7,
0x12C,	0x112,
0x10C,	0x10A,
0x110,	0x10E,
0x117,	0x113,
0x11F,	0x11A,
0x12A, 0x124,
0x11F, 0x11B,
0x11A, 0x117,
0x12B, 0x126,
0x122, 0x120,
0x13A, 0x134,
0x130, 0x12C,
0x129, 0x126,
0x125, 0x123,
0x121, 0x120,
0x11E, 0x11E,
0x0B8,
0x100, 0x100,
0x111, 0x133, [COLOR="Green"][B]//green color saturation[/B][/COLOR]
0x133, 0x144,
0x144, 0x144,
0x155, 0x155,
0x166, 0x166,
0x166, 0x166,
0x166, 0x166,
0x0B9,
0x12C,	0x112,
0x10C,	0x10A,
0x110,	0x10E,
0x117,	0x113,
0x11F,	0x11A,
0x12A, 0x124,
0x11F, 0x11B,
0x11A, 0x117,
0x12B, 0x126,
0x122, 0x120,
0x13A, 0x134,
0x130, 0x12C,
0x129, 0x126,
0x125, 0x123,
0x121, 0x120,
0x11E, 0x11E,
0x0BA,
0x100, 0x100,
0x111, 0x133, [COLOR="Blue"][B]//blue color saturation[/B][/COLOR]
0x133, 0x144,
0x144, 0x144,
0x155, 0x155,
0x166, 0x166,
0x166, 0x166,
0x166, 0x166,
0x011,
SLEEPMSEC, 120,
0x029,
ENDDEF, 0x0000
};

There are also gamma steps (from 30 to 300), 19gamma and 22gamma. We are using 22gamma because of much better looking colors. The three colored values are strategic for us, the rest can be used to fine tune color tone. By modifying these three values we can tune color tone for each backlight step independently.

static const u16 s6e63m0_22gamma_300cd[] = {
0x0FA,
0x102,

0x118,
0x108,
0x124,
0x15A, [COLOR="Red"][B]//r main color[/B][/COLOR]
0x164, [COLOR="Green"][B]//g main color[/B][/COLOR]
0x14E, [COLOR="Blue"][B]//b main color[/B][/COLOR]
0x1BC, //r tint medium
0x1C0, //g tint medium
0x1AF, //b tint medium
0x1B3, //r tint hard
0x1B8, //G tint hard
0x1A5, //B tint hard
0x1C5, //r tint low/medium
0x1C7, //g tint low/medium
0x1BB, //b tint low/medium
0x100,
0x1B9, //r
0x100,
0x1B8, //g
0x100,
0x1FC, //b

ENDDEF, 0x0000
};

/drivers/video/samsung/s3cfb_tl2796.c

/drivers/video/backlight/s6e63m0.c

/drivers/video/backlight/s6e63m0_gamma.h

and MDNIE (Samsung color profiles) module:

/drivers/video/samsung/s3cfb_mdnie.c