LCD_KCAL: Color Control driver for Nexus 5
msm: mdss: Display gamma control

TODO: confirm rgb channels, identify other tunables, cleanup,
apply values without switching screen (off and) on.

sysfs: /sys/devices/qcom,mdss_dsi_jdi_command_ors.69/*
msm: mdss: Apply commands values without switching screen (off and) on

Change-Id: If91bb71ec272fcf04fb908c686e1739901199096
msm: mdss: Remove tunable for command 32

Even slight changes look ugly or distort the screen.
msm: mdss: distinguish between Gamma RGB polarity Positive/Negative

Change-Id: Iff57031c77068891740382a4b5e4aef56cc93b0a
Signed-off-by: Paul Reioux <reioux@gmail.com>
msm: mdss: Remove sysfs for unused commands

Change-Id: I76a1dd34730220ac20e122da81917f9614e1220e
msm: mdss: Identify white point in sysfs

Change-Id: Ie20ede22dda0dba7c69c6edfecc427e626635319
msm: mdss: Add safety check for user input

Leave more checks either to the control app or the user's intelligence.

Change-Id: I13f24c09bb9f4dd9da1ee2ac79eb85e08d5dadeb
msm: mdss: Finalize gamma interface and cleanup

- Remove all sysfs files of unused commands
- Remove auto sync for negative polarities, these must be written separately
- Protect offset bit of white point command as well
- Apply white point bit 2 as duplicate of bit 1

Change-Id: Ice5ace99c1f11910d058a5f054085cac74169c50
msm: mdss: Send panel commands via separate function

Sending panel comnmands is very expensive, add a separate function to
accomplish this. Once all commands have been stored write anything to
the kgamma_send file.

Change-Id: Ia757be43751960dac934801e0a91861cfbae7c72
msm: mdss: Add hardware revision check

Our gamma interface works with both current hardware revisions,
11 and 11j, although all testing was carried out on 11. As we
don't know about possible future revisions, let's bail out until
correct offsets for panel commands have been added.

Change-Id: I2dbe34577405d9698a690637aec77d9626c7d797
Signed-off-by: Paul Reioux <reioux@gmail.com>
msm: mdss: Use workqueue to send panel commands

Sending panel commands is known to be expensive, honor this by
scheduling this task. Also check for panel state and send commands
only when we're actually awake.

These fixes adress bug reports regarding behaviour during boot.

Change-Id: I39cec6e7e242d06883645e043687d4bf08f6f104
msm: mdss: Find a stable sysfs node for the gamma interface

Move sysfs files to /sys/module/dsi_panel/*

Change-Id: Ia0e5dbb902011c68b2c3e2b265e168092ac8db3b
msm: mdss: Reset panel to apply RGB gamma data

Writing to the reset gpios produces a short flicker. This however
appears to be the only reliable method to apply RGB gamma data
without switching the panel off and on again.

Change-Id: I3f955203339d110d2feff475b80f6f2db728b048
Revert "msm: mdss: Reset panel to apply RGB gamma data"

This reverts commit 3f955203339d110d2feff475b80f6f2db728b048.

Change-Id: I35eb715bf860c840ebc2457aa03da5565b44746e
Revert "msm: mdss: distinguish between Gamma RGB polarity Positive/Negative"

This reverts commit ff57031c77068891740382a4b5e4aef56cc93b0a.

Change-Id: I7208c6f8c752a2634cfce193592d8935a757f3bd
ARM/dt: hammerhead: Reduce minimum panel brightness

Default minimum brightness is a tad too high, this change makes reading
in a dark environment much more enjoyable. A value of 3 is still within
the valid range (see lm3630 blmap).

Change-Id: I40f690e7a06459a06db939c37108bae6fc9c52d6