exynos3: libs3cjpeg: read memory configuration from kernel

This improves the flexibility (not all devices have the same FFC
resolution) and also allows optimization of memory usage.

We currently allocate 4 MB to the hardware JPEG encoder, but only
1 MB is actually needed if it's only used for encoding VGA images.
Note that the thumbnail encoding function of the kernel driver is
not used.

This patch is backward compatible with older kernels, but patching
is recommended. Cherry-pick the following commits:

	http://review.cyanogenmod.org/56791
	http://review.cyanogenmod.org/56792

Change-Id: I0e89b24e56b99e8e27f5a38d5c158b23021ed035
mfcdec: Compensate race condition in video thumbnail generation

Calling the decoder immediately after encoding a video often
trips on the ongoing mfc buffer flushes from the encoder that has
just shut down, and fails due to the unavailability of any buffer of
sufficient size. If MFC_DEC_INIT fails, give it 100msec and try
again. This resolves the blank thumbs when switching to the
gallery in the same session that a recording was made.

Change-Id: I13b1be8757b314e1c903a0570f9b053550164616
exynos4x12: liblights: Fix tablets with button backlight

Also, respect the lights API and return errors when attempting to
configure an absent light ID.

Change-Id: Ida430fba2fbfaf646f7e02ce2bd7d9134ae8d917
Fix crash on boot

There is a race condition where the sysfs-vsync thread accesses a value
(in particular a function ptr) that may not have been set yet as this
is done externally.

Change-Id: If1afb1533344e994398b9b6f5bd3dfb125313416
Revert "gralloc: Allow unmapping concurrent handles"

This reverts commit a3a9aaa5bbf0a94f1039e3eda368fa8a28ddecf8.
gralloc: Attribute buffer ownership to last caller

Switch buffer management from creator to latest registrant

Change-Id: If6b1ab1a553f701e4a1038c089f2b2ecb02c2e8b