gpu: ion: Fix lockdep issue in ion_page_pool

Currently the mutex is held while kmalloc is called, under a low memory
condition this might trigger the shrinker which also takes this mutex.
Refactor so the mutex is not held during allocation.

Change-Id: Ic1d3b2f69e61209191bac84724ba56f6b98e2bc4
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
gpu: t6xx: Use mutex instead of a spinlock in freelist

As the time spent inside the free list allocation routine can take a
while when zeroing of pages is needed, holding a spinlock, which
blocks preemption, is unacceptable.

As the freelist code is never called from atomic context a mutex is a
better lock type.

This patch also defer the zeroing of pages to outside of the mutex
protected path.

Bug: 7315681
Change-Id: Ic72f256c04ab74dd41c3eb28668c9c4efe3362ea
Signed-off-by: John Einar Reitan <john.reitan@arm.com>
ARM: SAMSUNG: adc: Fix missing memory barrier for adc->cur

The adc driver was missing a few critical locks that could cause
crashes in SMP environments.  One specific path that was identified
was:

P1: s3c_adc_read()
P1: -> s3c_adc_start()
P1:    -> spin_lock_irqsave()
P1:    -> s3c_adc_try()
P1:       -> adc->cur = next
P1:       -> s3c_adc_convert()
P0: s3c_adc_irq()
P0: -> client = adc->cur

If you don't have weakly-ordered memory then the above is no
problem since you're guaranteed to set adc->cur before you start
the convert and could potentially get an IRQ.  However, once you
get weakly ordered memory that above can go boom and the irq
can get the wrong value for adc->cur.

BUG=chrome-os-partner:14648
TEST=Run the following for many hours and observe no kernel crashes:
 cd /sys/devices/platform/ncp15wb473.0/
 while true; do cat temp1_input > /dev/null; done&
 while true; do cat temp1_input > /dev/null; done&
 while true; do cat temp1_input > /dev/null; done&
 while true; do cat temp1_input > /dev/null; done&
 while true; do cat temp1_input > /dev/null; done&
 while true; do cat temp1_input > /dev/null; done&
 while true; do cat temp1_input > /dev/null; done&
 while true; do cat temp1_input > /dev/null; done&

Change-Id: I1080be089a4c5bc0b41c7f030021b17409c43b72
Signed-off-by: Doug Anderson <dianders@chromium.org>
gpu: ion: Switch to using a single shrink function

The single shrink function will free lower order pages first. This
enables compaction to work properly.

Change-Id: Icbeefa9e84c2eacf6962d9536ab66a8b059cc941
Merge remote-tracking branch 'common/android-3.4' into android-exynos-3.4
video: s5p-dp: Disable ZMUX

ZMUX is test logic for error generation during veritical blanking.
So, it should be disabled.

Bug : 7204717

Change-Id: I901845125b98841062c97c68259653718fbfdfcc
Signed-off-by: Youngmok Song <ym.song@samsung.com>
Signed-off-by: Sanghee Kim <haya93@samsung.com>
media: exynos-tv: Increase mif bus freq to 800Mhz when hdmi is enabled

Bug: 7311707
Change-Id: Ia8662c46a012cc99e53529d3f9928d3145c10906
Signed-off-by: Benoit Goby <benoit@android.com>
sync: dump sync state of fence errors

Change-Id: I297a43aadf83504993040ea875c7f22d988628f1
Signed-off-by: Erik Gilling <konkers@android.com>
Merge branch 'android-3.4' into android-exynos-3.4
gpu: t6xx: go back to using kmap to clean pages instead of vmap

Change-Id: I1ccbf4edab9367837a623ceb179e4741e9aabea2
Signed-off-by: Erik Gilling <konkers@android.com>
video: s3c-fb: change fence wait behavior to make system more robust

We now wait on fence's for 1sec.  If they timeout, an error will be logged and
we'll wait indefinitely.

Change-Id: Ic2632089977ad8be507e521667d2c04f6f69e7a3
Signed-off-by: Erik Gilling <konkers@android.com>
video: s3c-fb: Move the mif/int minimum frequency handle to runtime pm

This patch moves the mif/int minimum frequency handle from
s3c_fb_enable/disable to runtime pm.

Bug: 7324024

Change-Id: I1492b640f6fc8c7d1e1188104bad68bc9df4e1f0
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>