msm: kgsl: Add secure memory in DRM

Add secure memory in DRM for video playback

Change-Id: I7cefcce056d112fb0a16a2bd55124a99cb5e81a9
Signed-off-by: Alex Wong <waiw@codeaurora.org>
msm: idle-v7: Add no-ops for cortex targets

For Cortex targets a delay of about 300 NOPs is required to prevent
a race condition that might cause the SPM state machine and the CPU to
be out of sync during failed power collapses. The NOPs were present
in code and conditional to a specific target type, make these common
to all Cortex targets.

Change-Id: Ibee691e168df412376f0a042d54a643c731ae0e3
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
msm: mdss: Fix DSPP layer mixer programming

DSPP block being programmed should be the same as layer mixer attached.

Change-Id: If2b051682cc03563b13264b736ddfc2e1c9ed638
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
msm: mdss: Fix register address range check

Register address range was incorrect. Fixed the bounds of the check

Change-Id: Ide6d912c77aa9e182e854d502551fc71f4bd3615
Signed-off-by: Benet Clark <benetc@codeaurora.org>
msm: Kconfig: update msm9625 phys offset

Update phys offset and zreladdr for msm9625 2.0 memory map.

Change-Id: I906e296c7874f1d2ae1d55341bd030158562fd58
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
watchdog: Fix warning caused by use of smp_processor_id()

watchdog driver creates per-cpu kernel threads that are bound to
separate cpus. Use of smp_processor_id() by such threads in
__touch_watchdog() is perfectly fine, as they are generally pinned to
the cpu on which they are running.

During cpu offline event, however, affinity for the watchdog thread
bound to dying cpu is broken before it is killed. There is a small
time window between affinity broken and thread dying in which thread
can run on a cpu with its affinity not set to that cpu exclusively.
This will trigger a warning from use of smp_processor_id(), which is
harmless in this case as it will provide the required heartbeat on cpu
where it is running and moreover that thread will be shortly killed.

Mute the harmless warning by use of raw_smp_processor_id() in
__touch_watchdog(). This seems less intrusive fix than killing threads
in CPU_DOWN_PREPARE event handler.

Change-Id: I7fa22ff529aeea0ec3d5610cfec87aea92cf95a0
CRs-Fixed: 517188
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
msm: mdss: sanitize histogram bin count

Ensure that histogram bin count value is sanitized,
this ensures that the length of data copied back to
user remains in check. This prevents excessive
data in kernel memory from being copied back to user.

Change-Id: I0f7787603bad950c0b187d8c38d4fa3366bc06b6
CRs-Fixed: 517476
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
msm: clock-8084: Add an active-only GPLL0 clock

The clock-krait driver will require an active-only GPLL0
clock to select as a source for the CPU clock(s). Add this
clock for 8084.

Change-Id: I99eec0ee7f5f6287e39968d382b6227084cf819f
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
ARM: dts: msm: Config i2c cntrl on BLSP1 QUP2 for Krypton

Configure an i2c master controller device on BLSP1 QUP2
for the Krypton chipset.

Change-Id: I035bcabe66bdaa5b552d30700703f065a3b09903
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
msm: mdss: Support planar output format for rotator

For high end targets planar format as output from the rotator
can be supported as there are more SMP blocks available relatively.
Also, this gives HAL flexibility with the output buffer as currently
its always defaulted to Psuedo Planar.

Change-Id: I0428ea2a227bf73bc4eada0d2533520799321195
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
msm: board-8084: Modify primary SSUSB core device name

Clock driver is using platform device name for primary
SSUSB core which is causing clk_get failure. Hence modify
device name to device tree generated name for primary SSUSB
core device.

Change-Id: I506794ec173f2d1bba16c470dfaca5accb56c1df
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
msm: camera: Bound check length for Dequeue stream buff info

Bound check the length param from user space given to
copy_from_user function to avoid any invalid memory access.

Change-Id: I926509a5fffd49cfc0130d182f246fbb9335b60e
CRs-Fixed: 519124
Signed-off-by: Hariram Purushothaman <hpurus@codeaurora.org>
ARM: dts: msm: Add BLSP1 UART1 definitions for SAMARIUM

Add device tree entry and clock lookup table entry for
the BLSP1 UART1 device on MSM SAMARIUM.

Change-Id: I03d1f95bbbe0f0187cedc0d5bedffbd66ee859f1
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
ARM: dts: msm: Add battery device tree data for msm8610-skuaa QRD

Add battery device tree data for the 1300mAh 4.2V batteries used
by the hisense board.

Change-Id: I3b1102ff9d4f39623488ddc6538984f095b7221f
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
msm: mdss: Allow DMA pipe sharing only on WB mixer

DMA pipe can only be shared on the writeback mixer for
concurrent line and block mode operations. Only allow
sharing if the mixer attached to the pipe is already a
writeback mixer.

Change-Id: I9a0e5144fdf87f681493cd92d9cc809836ab1a5c
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
msm: clock-local2: Clean up clk_ops_pixel

8974 and 8226 share the same clock ops on pixel clocks.
Therefore, move the set_rate_pixel and round_rate_pixel
into the common clock driver and remove the old unsupported
pixel clock ops.

Change-Id: I5b3867d41d97936c632ce1cdd1fb335ccea55399
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
arm: msm: Fix section mismatch discrepancies in power drivers

Fix section mismatch discrepancies in the power management driver code
for MSM chipsets.

Change-Id: Icd99c39b074bf20cd30beec8393db4b24d1a4829
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
msm: mdss: Avoid deadlock in interrupt handler

Reduce the locking scope in irq_dispatch so that
mdss_lock is not held when the irq_handler is dispatched.
The dispatched irq_handler will try to acquire mdp_lock but
another active process can already have mdp_lock and tries to
procure mdss_lock creating a deadlock situation. Not locking
with mdss_lock is acceptable as the calls will be synchronized
through mdp_lock from MDP clients.

Change-Id: I586b7e00c046dd4081b4e838e62e0a0556f4c717
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
power: qpnp-charger: fix chg done logic for dual charge path

When two chargers are connected simultaneously and one is
removed do not allow chg_done to be set to false. Charging
should only be reported to not be fully if charging is
resumed or both chargers have been removed.

Change-Id: Ic3e0bf244b89c81a66ec92cb641d8463055d959a
CRs-Fixed: 513398
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
mtd: msm_qpic_nand: fix nand density variable data type

The density of the NAND device is usually indicated in bits and not
bytes. Currently the variable used to store this information is a
32-bit variable which is not large enough to store the density.
Updating that variable to a 64-bit variable will fix this issue.

Change-Id: Ia1e2c38e46d118c0356f439b73abae14ed95709f
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>