media: exynos: gsc-m2m: Wait asynchronously for fences

Bug: 7286984
Change-Id: I7e8f814b064d9a49be238ecc1f520ec9092ee684
Signed-off-by: Benoit Goby <benoit@android.com>
power: android-battery: Battery health check only when connected to charger

Only check battery health when connected to a charger.

Change-Id: I43e3f73ac1e5862f8e6dbaa19daa6d322f3bba20
Signed-off-by: HongMin Son <hongmin.son@samsung.com>
Merge branch 'android-3.4' into android-exynos-3.4
sync: protect unlocked access to fence status

Fence status is checked outside of locks in both sync_fence_wait and
sync_fence_poll.  This patch adds propper barrier protection in these
cases to avoid seeing stale status.

Change-Id: I9d8b6ce6accb415e797df58068a1ccd54e6be445
Signed-off-by: Erik Gilling <konkers@android.com>
video: dp: added backlight & LCD off control.

When power off, doesn't called FB & DP disable function.
So the shutdown function of DP driver is registerd.
Shutdown function can control backlight & LCD off control.

Bug : 7319583

Change-Id: I5331349ff1748be16155fedaa20534dd224fc014
Signed-off-by: Sanghee Kim <haya93@samsung.com>
ARM: exynos5: smdk5250: add backlightoff function on dp platdata.

Change-Id: Idfe3aa506c97303b6fdebab2190b1d96e2654928
Signed-off-by: Sanghee Kim <haya93@samsung.com>
Merge branch 'android-3.4' into android-exynos-3.4
gpu: ion: Refactor locking

Removes contention for lock between allocate and free by reducing
the length of time the lock is held for.  Split out a seperate
lock to protect the list of heaps and replace it with a rwsem since
the list will most likely only be updated during initialization.

Change-Id: I3017ccaa2126c7a24ab22b18e1ee553983977c37
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Merge remote-tracking branch 'common/android-3.4' into android-exynos-3.4
media: exynos: mfc: Ignore decrease case for DRC

This pach ignores resolution decrease when DRC is happened.
Resolution decrease can be ignored because buffer is already enough.

Bug : 7299083

Change-Id: Ifbff7d8b5194ddfae2fff3d5a6dcfc8ce41514f7
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
media: exynos: gsc: ensure hw is on during drm playback

The secure side assumes that the hardware power domain is on
and the device clocks are enabled when it reconfigures the MMU.

Ensure that we call pm_runtime_get/put when setting up/tearing down
content protected playback.

Bug: 7287429
Change-Id: Ie2823f217d3ad0597a89631cdc4f8ed9d9cd0fc0
Signed-off-by: Dima Zavin <dima@android.com>
drivers: gud: mobicore: reboot system when mobicore halt is detected

If MobiCore driver detects MobiCore halt, it reboots system
because the MobiCore halt is not recoverable.

This driver detects the halt by checking result from a fastcall MC_FC_INFO.

Bug: 7179227

Change-Id: I0be08f629fb300b6787d617ee67fbe5afe356315
Signed-off-by: DongJin Park <djpax.park@samsung.com>
video: s3c-fb: don't use __iomem when initializing fb

The framebuffer isn't I/O memory so it should be an ordinary void *.
Switching from memcpy_io()/memset_io() to memcpy()/memset() dramatically
speeds up probe since the _io variants are unoptimized on Exynos.

Bug: 7336267
Change-Id: I8b036ff7af205c5118503fd37d527a53a086c6cf
Signed-off-by: Greg Hackmann <ghackmann@google.com>
video: s3c-fb: add missing pm runtime calls to ioctls

Bug: 7332043
Change-Id: Ibd22a4511e6f916070593136593a21cd0744dec1
Signed-off-by: Greg Hackmann <ghackmann@google.com>
media: exynos: gsc-m2m: wait for at most 10sec on a fence

Change-Id: I435ed7a99cdf574cfbf026faaf863984c89d8bd0
Signed-off-by: Dima Zavin <dima@android.com>
video: s3c-fb: wait for 10sec max on fence

Change-Id: I11ce1892509a31f721533326fe1c175e4e02efac
Signed-off-by: Dima Zavin <dima@android.com>
ext4: protect group inode free counting with group lock

Now when we set the group inode free count, we don't have a proper
group lock so that multiple threads may decrease the inode free
count at the same time. And e2fsck will complain something like:

Free inodes count wrong for group #1 (1, counted=0).
Fix? no

Free inodes count wrong for group #2 (3, counted=0).
Fix? no

Directories count wrong for group #2 (780, counted=779).
Fix? no

Free inodes count wrong for group #3 (2272, counted=2273).
Fix? no

So this patch try to protect it with the ext4_lock_group.

btw, it is found by xfstests test case 269 and the volume is
mkfsed with the parameter
"-O ^resize_inode,^uninit_bg,extent,meta_bg,flex_bg,ext_attr"
and I have run it 100 times and the error in e2fsck doesn't
show up again.

Change-Id: Icfa95256688b50734e9152cbdc84a851a39b8ed5
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
media: vb2: Create sync point and fence before queuing buffer

Otherwise the point might get signalled before the fence is created
which can caused the fence to stay in the active state.

Bug: 7342416
Change-Id: I037f7947fc010569f52b8eb97f5a659b64a0e09d
Signed-off-by: Benoit Goby <benoit@android.com>
sync: update new fence status with sync_fence_signal_pt

If a fence's pt is signaled before sync_fence_create is called, the fence
will never transition into the signaled state.  This also address a tiny
race if a merged fence's pt after sync_fence_get_status checks it's status
and before fence->status is updated.

Change-Id: Ic8e292a323db26c6f04cb4757d920278b3125ff6
Signed-off-by: Erik Gilling <konkers@android.com>
Merge branch 'android-3.4' into android-exynos-3.4