ARM: dts: msm: tuning otm8018b configuration

correct otm8018b resolution and dsi timming.
As this panel`s resolution is 480 * 854 not
480 * 800.

Change-Id: I368d0a60c1c5c48334b11b641f1ff440356c5b1d
Signed-off-by: Shuo Yan <shuoy@codeaurora.org>
radio: iris: Avoid NULL pointer dereferencing

Before dereferencing a pointer check for NULL
pointer.

CRs-Fixed: 537890
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
Change-Id: If010b89fd4f5930d944c9e327c51de4b40f33c3c
radio: iris: Avoid memory leak and NULL pointer dereferencing

 - Avoid memory leak by freeing allocated memory
 - Do not derefer NULL pointer

CRs-Fixed: 537955
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
Change-Id: I7624d73e5c25233e9d03c67e4204c611b9a8fff6
mmc: core : fix arbitrary read/write to user space

In the MMC card debug_fs the read and write handlers use the strlcat
and sscanf, without checking the pointer given.
Since the pointer is not checked it is possible to write
everywhere (ring 0 or 3).
In order to fix it, an access_ok function is being used to verify
the buffer's pointer supplied by user is valid.

CRs-fixed: 545716
Change-Id: Ia710b6af5a95974fc930ca902e8ff18afa4e17ba
Signed-off-by: Raviv Shvili <rshvili@codeaurora.org>
msm: spm: Replace smp_processor_id call with get_cpu

Spm_processor_id call results in warning message when
called with preempt enabled. Instead call get_cpu to get
the current cpu ID and enable preempt again because the
function further calls smp_call_function_single which
disables preempt within.

Change-Id: I246f26b023da97038c5d6b675a820f07ac62fda1
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
msm: kgsl: Add soft reset for A4XX

Make A3XX soft reset function usable for A4XX and A3XX and
make the A4XX soft reset function point to this common reset
function.

Change-Id: I7c6d3081ec53e29330aa954863877924f0ddc5c3
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
msm: kgsl: In snapshot skip object if it is in ib list

When looking for objects to save in snapshot, check whether the
object is already tracked in the ib list first. If it is tracked
there then skip tracking the object as it is already tracked.

Change-Id: Ife408ad16b86482a12e7d9e53a243505451d7fdc
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
msm: kgsl: Add CFF capture for IBs

If CFF is enabled, when an IB is submitted to hardware
parse it to find all objects in it and dump them.

Change-Id: I2caecb6a9c912a59be4c0d2acdd3949c96196653
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
msm: kgsl: Get reference to process private when attaching mem entry

When a memory entry is attached with to a process private list then
increment the refcount of the process private structure so that the
structure is valid as long as the entry is around. The context
structure is also handled in similar manner. Also, the refcount to
the entry needs to be decremented when the handle that created the
entry goes away and not when the process private structure is
destroyed.

Change-Id: I225698ad4081947a93eb553104e5259bbf31f293
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
ARM: dts: msm: disable rpm-smd stand-alone mode for msmsamarium

Remove the rpm-standalone flag for msmsamarium so that RPM SMD
resource requests are sent to the RPM.  This is necessary so that
the hardware state of various resources (regulators, clocks,
buses, etc) is changed based upon consumer requests.

Change-Id: I1f210dccc5bacba55259f7ce11eecb9691221d5d
Signed-off-by: David Collins <collinsd@codeaurora.org>
mdss: display: configure continuous splash mixers with border fill pipe

At end of continuous splash operation, configure mixers with border fill
pipe to avoid unexpected side effects before transition into local home
screen.

Change-Id: Id2a7c1093035956774aef5518a449636ffd57c95
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
USB: Debugfs: Fix compilation issues when debugfs is disabled

When we disable debugfs some of the function driver does not
handle those error properly so we see error of kind variable
undeclared, too many arguements to function. This fixes all
these obseved issue

CRs-fixed: 551713
Change-Id: I18e183fd2381abf680df6c360d6eab477cdb5b76
Signed-off-by: Tarun Gupta <tarung@codeaurora.org>
ARM: dts: msm: enable HSIC interrupt as wake up capable for 8926

HSIC strobe gpio line(#119 for 8926) is routed to MPM for waking
up MSM upon HSIC peripheral connection and remote wakeup. To achieve
this add HSIC interrupt to the MPM wakeup capable list.

Here 8926 & 8226 targets using the same PM DT file. But HSIC gpio
numbers are different for these two targets i.e 8226(#115) & 8926(#119).
Instead of re-spin the new PM DT file for 8926, override the gpio
mapping in msm8926.dtsi file.

Change-Id: Ib96a0fe0a559690792f8ad979368ad5cfd2a4c63
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
mdss: mdp3: Add underrun counter to debugfs stat call

To allow for easier debug we added logs to output current
underrun count.

Change-Id: I61f3911b315193ae5550de0332c5abefe22c12ce
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
mm, sched: Drop voluntary schedule from might_fault()

might_fault() is called from functions like copy_to_user()
which most callers expect to be very fast, like a couple of
instructions.

So functions like memcpy_toiovec() call them many times in a loop.

But might_fault() calls might_sleep() and with CONFIG_PREEMPT_VOLUNTARY
this results in a function call.

Let's not do this - just call __might_sleep() that produces
a diagnostic for sleep within atomic, but drop
might_preempt().

Here's a test sending traffic between the VM and the host,
host is built with CONFIG_PREEMPT_VOLUNTARY:

 before:
	incoming: 7122.77   Mb/s
	outgoing: 8480.37   Mb/s

 after:
	incoming: 8619.24   Mb/s
	outgoing: 9455.42   Mb/s

As a side effect, this fixes an issue pointed
out by Ingo: might_fault might schedule differently
depending on PROVE_LOCKING. Now there's no
preemption point in both cases, so it's consistent.

Change-Id: Ic27fa27635c6f0e76ca348a9e71a21d57531394b
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1369577426-26721-10-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 114276ac0a3beb9c391a410349bd770653e185ce
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
mm, sched: Allow uaccess in atomic with pagefault_disable()

This changes might_fault() so that it does not
trigger a false positive diagnostic for e.g. the following
sequence:

	spin_lock_irqsave()
	pagefault_disable()
	copy_to_user()
	pagefault_enable()
	spin_unlock_irqrestore()

In particular vhost wants to do this, to call
socket ops from under a lock.

There are 3 cases to consider:

 - CONFIG_PROVE_LOCKING - might_fault is non-inline
   so it's easy to move the in_atomic test to fix
   up the false positive warning.

 - CONFIG_DEBUG_ATOMIC_SLEEP - might_fault
   is currently inline, but we are calling a
   non-inline __might_sleep anyway,
   so let's use the non-line version of might_fault
   that does the right thing.

 - !CONFIG_DEBUG_ATOMIC_SLEEP && !CONFIG_PROVE_LOCKING
   __might_sleep is a nop so might_fault is a nop.

Make this explicit.

Change-Id: I5a0cad174b796eddeb9d239b7e114ed3348699bf
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1369577426-26721-11-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 662bbcb2747c2422cf98d3d97619509379eee466
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
ARM: dts: msm: Enable haptics on APQ8084

8084 MTP/CDP uses ISA1200 haptics and liquid uses Piezo
haptics. Relevant device tree infomation is added to bring
enable them.

Change-Id: I7bfba272a6d083084794293f550b531e035a8460
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
ARM: dts: msm: Enable GPIO buttons on 8084 Liquid

8084 Liquid has different GPIO buttons from other platforms. Relevant
device tree information is filled to enable GPIO buttons.

Change-Id: Ib66a4ba4a316e666e7ca79caa63e11506192743e
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
msm: clock-samarium: Adds load-freq table for video codec

Adds required clocks for vcodec clock. Clock values
are read from samarium dtsi file.

Change-Id: I58ca0c5ad300c4f823c891d0939a7569d71f3029
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
ARM: msm: dts: Fix the DT node for recharge threshold on SMB135x

'mV' to 'mv' for recharge threshold.

Increase the recharge threshold to 200mV. This is a workaround
to avoid the continous taper-recharge-termination interrupts
at end-of-charge with a SDP.

Change-Id: Ia3546befed8abe93007a811cf3c89270567d5b35
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>