msm: kgsl: Lower bounds check the number of power levels

A misconfigured board file could cause an out-of-bounds
array access through this value.

Change-Id: I64bbad0c096a2efe65376991537d810141370d72
CRs-Fixed: 439230
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
msm_fb: hdmi: Check for stale HDCP variables

Check for stale HDCP variables like An from previous authentication
failure. In case of stale data, wait for some time to make sure HDCP
has has fresh data.

Change-Id: I37685a0246f3b60c383e3bf8d024c2b13fb3e5f6
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: dcvs: fail gracefully if TZ does not support dcvs

If dcvs attempts to initialize on a system where TZ does not support
dcvs, it will eventually cause a crash. Prevent this by disabling
dcvs if TZ does not successfully initialize its part of dcvs.

Change-Id: Ic9cd361243c03c3832133614c4847a2815b0bbb4
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
input: synaptics_i2c_rmi4: Add low power mode

Enable regulators to go into low power mode when
device enters suspend, to save power.  In resume,
return regulators to full power.

Change-Id: I6f5a6d398732b2e23aeba81b3569ae2c081f31e5
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_i2c_rmi4: allocate memory for interrupt status

In synaptics_rmi4_i2c_read, intr_status is a char variant.  So
if num_of_intr_regs > 1, then intr_status will write 2 bytes.  This
will destroy the stack, so avoid it.

Change-Id: I5c16e491a84d3f8dd96a11810c060944a457b99a
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_fw_update: Add firmware ID reading

- Fix issue of converting config id
- Support "Option 1 (bit0)" in image file header
  -- Query firmware build id from image file header

Change-Id: Iabd24d662762b67de7163ad7321f95f1c58f1459
Git-commit: 7e811dcd8eaf3fc0df765335d0ef14926f325f64
Git-repo: git://github.com/synaptics-touch/synaptics-dsx-i2c.git
[amaloche@codeaurora.org: only portion of patch taken.
 Custom changes were necessary to add for integration
 with mainline]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_fw_update: Add force update entry

Add sysfs entry option to force update firmware, regardless
of versioning.

Change-Id: I85a12c531ee3d64a74da272b6e73b514eafc136a
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
msm: msm_bus: Correct the return value from register-client

On failure, return 0, and not a non-zero value as that can
be interpreted as a valid client ID.

CRs-Fixed: 486328
Change-Id: I7a5b448bc398b4a4792170147a5e5317d25f8b3c
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
input: synaptics_i2c_rmi4: Properly enter low power mode

When entering low power mode, i2c pull up regulator
must be set with LPM current, not active current.

Change-Id: Idc87cd57b8a4f75b665d3045123176b158b16691
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
arm: board-8930: Add synaptics firmware name in platform data

Add synaptics firmware name in platform data

Change-Id: I011144acc82f4fca25b9d40e05a3850117001230
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
msm: camera: Optimize the live snapshot state machine

Send the ack for live snapshot done event once its
completed instead of waiting for stop request from
user. This helps in saving a wait time which could
be upto 2 frame time in worst case

Change-Id: Ibbef211512e4b9f06ff6b8d3ca52d1dc591c0b46
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
msm: camera: Added the NULL pointer check

Added the NULL pointer check for isp_config
to avoid the crashes

Change-Id: I2df7eeb5c633b04c3aac5d985cf50c2ece7f1076
CRs-Fixed: 495652
Signed-off-by: manish gotefode <mgote@codeaurora.org>
msm: rotator: Enable support for 2-pass fast YUV mode

Add support for 2-pass rotator operation for downscaling
and 90 degree rotation when rotator operates in fast YUV
mode. 2-pass is supported for 420 H2V2 formats.

Change-Id: Ib8ce802a5a8aabe10c88422e3b8d82708c5b05d4
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
ARM: 7693/1: mm: clean-up in order to reduce to call kmap_high_get()

In kmap_atomic(), kmap_high_get() is invoked for checking already
mapped area. In __flush_dcache_page() and dma_cache_maint_page(),
we explicitly call kmap_high_get() before kmap_atomic()
when cache_is_vipt(), so kmap_high_get() can be invoked twice.
This is useless operation, so remove one.

v2: change cache_is_vipt() to cache_is_vipt_nonaliasing() in order to
be self-documented

Change-Id: I36e5a63fdae158d9e7562f564f7e593b351f6960
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: dd0f67f4747797f36f0c6bab7fed6a1f2448476d
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/
[Few merge conflict resolved]
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
msm_fb: Increase base fence timeout

The earlier value of 1 second caused unnecessary warnings on
heavy workloads by the GPU.

Change-Id: Ib4a5b098267251d5c63c4d8d2a2f51b339acc1d2
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
msm: camera: Add mechanism to stop overflow recovery and handle IOMMU pagefault

CRs-Fixed: 491200

Change-Id: Ic148007e9402862060c3f4b6d7cc8f2b5c77ad9f
Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
msm: kgsl: Always resume the GPU regardless of its state

Make sure we resume the GPU regardless of its current
state. If the device is not in suspend state restart the
device and  print an error message.

Change-Id: I9e71cbe27d360dc06513c54f3a734aaea5b10d2b
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
msm-camera: Fix for the Ov8825 HFR 60&120 FPS issue.

In HFR case no need of calculating the frame length lines, we can
consider fixed frame length lines.

Change-Id: Ife485e5c6233763e4722626c47ee375263f8ef76
CRs-Fixed: 491709
Signed-off-by: Katta Santhisindhu <kattas@codeaurora.org>
msm: msm_fb: Add range checks for fb cmap.

Add appropriate range checks to ensure valid access
through framebuffer cmap. This prevents illegal
access into memory.

Change-Id: I9e82a27a2d12f31d8150ea577514576824f8b1f5
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
msm:camera: Fix signedness issue in hw_exec_cmds

  In hw_exec_cmds()second argument m_cmds should be
  of type unsigned interger

Change-Id: Idad2eb1a59481f3fe9f90221ff2061e8dae57013
CRs-Fixed: 493314
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>