kernel_samsung_d2 - Squashed commit of the following:

commit 90f482b0339452547cc96b6306ddff2143b559c6
Merge: d89a03d 78e800d
Author: Wizard0f0s <jamie.gilmer@gmail.com>
Date:   Fri Jun 14 13:54:26 2013 -0400

    Merge branch 'cm-10.1' of git://github.com/CyanogenMod/android_kernel_samsung_d2 into cm-10.1

commit 78e800d2663cd3d1cf22dd5a235108c0b529a464
Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Sun Jun 9 22:51:01 2013 -0500

    devices-8960: Fix camera failure with newer tz firmware

    Change-Id: I524ff7196d9f3ae268178826b986d5dcee1de88f

commit a5cab2452cdc401d04abfc1f9f89ad79b7c771b2
Author: desterly <d3s7royer@gmail.com>
Date:   Thu Jun 6 08:32:09 2013 -0400

    d2: Squashed revert of msm_serial_hs.c updates

    Reverts d0351295f9774e837d9bd05469ba90a0bac77667 and 9fcb8efb0242207c91e8fe1179f806ae2fb6fb1b

    Commit 9fcb8efb0242207c91e8fe1179f806ae2fb6fb1b is causing issues with Bluetooth issues on d2 devices (d2vzw primarily)

    - Pairing issues with pair failures
    - Handshaking issues after pairing with device timing out or numerious retry to connect
    - Disconnect issues - lack of reconnecting issues

    Revert confirms fix on d2vzw

    Change-Id: I88df917560a7cfe03ff5da6e54c9af89bba6962b

commit 9fc0b2c064f612f493dcbb123a0d36967ab1c851
Author: Bruno Randolf <br1@einfach.org>
Date:   Fri Apr 19 14:27:36 2013 -0500

    bcmdhd: Enable Ad-Hoc (IBSS) mode

    Enable Ad-Hoc (IBSS) mode for bcmdhd. We basically just need to set the
    interface flag and avoid some P2P specific settings while scanning.

    Also add the "station get" command for IBSS mode.

    Change-Id: Ie6f0fa77b55d92a7c22cbda72bad200cbfaede04
    Signed-off-by: Bruno Randolf <br1@einfach.org>

    Change-Id: I598c6d832cfd3dcc0ddbfb5dc29f29cb97cdbd8b

commit e3559939139593a724ddd60818fafcba64070890
Author: Dan Pasanen <dan.pasanen@gmail.com>
Date:   Fri Apr 19 13:56:04 2013 -0500

    net: bcmdhd: update to version 1.61.47 from the GT-9505 source drop

    Change-Id: Ib21e86c4652be47c69aeaa5c22f93676962e6354

commit 7c32bb421bff4c7247ccbef406139d9a17cd396a
Merge: 23e3784 144b626
Author: Shareef Ali <shareefalis@cyanogenmod.org>
Date:   Wed Jun 5 21:11:07 2013 -0700

    Merge "ARM: mutex: use generic atomic_dec-based implementation for ARMv6+" into cm-10.1

commit 23e378434c50583c83822eb0687c8d25be3cb435
Author: detule <ogjoneski@gmail.com>
Date:   Tue May 28 23:56:17 2013 -0400

    M2: msm: grow MM heap size for the iommu use case

    From 56 to 96 MB.

    Too small of a heap and we get vidc induced iommu pagefaults when
    recording 1080p video with the rear camera.

    Change-Id: I70f2a1e76bda98c671ede22592ce564ce5fcd628

commit 32a6183396c15b3f44041d038323de3bcb8ad4d9
Author: detule <ogjoneski@gmail.com>
Date:   Sat May 25 00:25:27 2013 -0400

    M2: msm: Enable IOMMU_GPU_SYNC

    1. We need this to run with the new QdevNet adreno blobs.

    2. HACK: prevent APPS side locking;  it's aggrevating the modem wdog.
    Not sure why this happens, perhaps cpuidle, or preemption is
    somehow responsible for the lock being held longer than anticipated.

    3. Result is: serialized GPU-GPU acess to the context registers.
    Apparently this is all that is needed to be able to use the QdevNet
    adreno blobs.

commit 80d5f59fa0a1d54e1bf74d6b54e3d2a0b563b084
Author: detule <ogjoneski@gmail.com>
Date:   Wed Mar 20 16:02:40 2013 -0400

    M2: msm: Enable MSM_IOMMU for MACH_M2

    And enjoy the free ram!

commit cfb3cd8fff1963c952e58ce3c26a510502cdfe2d
Author: Kevin Chan <ktchan@codeaurora.org>
Date:   Fri Apr 26 08:38:56 2013 -0700

    M2: camera: Move halt logic in case of overflow to ISR.

    Move the halt logic which includes AXI HALT and CAMIF Disable
    to ISR to start the recovery mechanism sooner.
    Add some protection in case of liveshot.

    *detule: Again, omit liveshot lines.

    Change-Id: I28ec462474524c0064cd7ecd4f77801cd494e514
    Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
    Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit 0a670a2b07d15530ba63a6a35c028dfb931d8fdd
Author: Kevin Chan <ktchan@codeaurora.org>
Date:   Thu Apr 25 01:33:44 2013 -0700

    M2: camera: Add recovery routine for live snapshot.

    During live snapshot, if bus overflow happen, recovery routine will
    kick in and reset the hardware. At this point, the live snapshot
    might not be completed and application will continue to wait for
    the snapshot to complete. This change adds the logic to restart
    the snapshot process after recovery is completed.

    *detule: we don't use Live Snapshot.  Mangle the patch, and only port
    recovery_active pertinent code.

    Change-Id: I9ba0a27ce53eb008a4af8d65a3f37a7cded03559
    Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
    Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit 17b780919531be7d72340cac409dd5674d66cee7
Author: Kevin Chan <ktchan@codeaurora.org>
Date:   Fri Apr 19 22:29:55 2013 -0700

    M2: camera: Recovery through camif stop and overall reset.

    Add recovery mechanism in case of bus overflow. As part of the
    recovery, stop the CAMIF, reset the VFE and reload the AXI
    write masters and then restore the IRQ settings to VFE.

    Change-Id: Iba6576777f05135cc13c1ee0c9db764d35c7282a
    Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
    Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit 4ca683ff147c7f6f281135b50c605880afca6252
Author: detule <ogjoneski@gmail.com>
Date:   Wed May 22 13:25:00 2013 -0400

    M2: camera: reset internal variables on reset interrupt

commit bb9ce1cb2924cb0428e8528cdd9edfa3785c4474
Author: Sai Kumar Sanagavarapu <ssanagav@codeaurora.org>
Date:   Mon May 13 16:36:01 2013 +0530

    M2: camera: Enable CAMIF SOF in case of non dual camera usecase.

    When Dual camera usecase is enabled, the ISPIF PIX SOF is enabled
    by default to synchronize with the RDI interfaces.
    But in non dual camera usecases, use CAMIF SOF IRQ to increment
    the frame IDs being embedded inside the output frames.
    Sometimes the SOF IRQs of frame 'n' is clubbed along with the
    Output IRQs of the frame 'n-1'. Thus although the output IRQs
    are supposed for frame 'n-1' it results in a frame ID of 'n' which
    will cause incorrect behaviour downstream. Correct this behaviour
    by checking the SOF and Output status bits in the IRQ Mask and
    adjust the frame ID accordingly.

    *detule: Also add similar checks for camif + stats irqs (as in upstream
    driver)

    CRs-Fixed: 481721
    Change-Id: If7a9db2337febf10e89d44c58b9d980d874c69b6
    Signed-off-by: Sai Kumar Sanagavarapu <ssanagav@codeaurora.org>
    Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>

commit 144b62609c3c936a26364072ede93b916743e945
Author: Will Deacon <will.deacon@arm.com>
Date:   Thu May 9 21:41:21 2013 -0500

    ARM: mutex: use generic atomic_dec-based implementation for ARMv6+

    Commit a76d7bd96d65 ("ARM: 7467/1: mutex: use generic xchg-based
    implementation for ARMv6+") removed the barrier-less, ARM-specific
    mutex implementation in favour of the generic xchg-based code.

    Since then, a bug was uncovered in the xchg code when running on SMP
    platforms, due to interactions between the locking paths and the
    MUTEX_SPIN_ON_OWNER code. This was fixed in 0bce9c46bf3b ("mutex: place
    lock in contended state after fastpath_lock failure"), however, the
    atomic_dec-based mutex algorithm is now marginally more efficient for
    ARM (~0.5% improvement in hackbench scores on dual A15).

    This patch moves ARMv6+ platforms to the atomic_dec-based mutex code.

    Change-Id: I5cb600b15f891dc692356322b38cae1d692a084c
    Cc: Nicolas Pitre <nico@fluxnic.net>
    Signed-off-by: Will Deacon <will.deacon@arm.com>

Change-Id: Id4a911e13f8708baf3c8e9ee894c31f8baf11aca