mmc: msm_sdcc: Fix compilation issues

Fix compilation issues when CONFIG_DEBUG_FS is not defined.

CRs-fixed: 555000
Change-Id: Ic7f30ae79450fa9125499352b80db3fa4c27104d
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
msm: audio: qdsp6v2: Change acdb_mmap size variable to unsigned

The acdb_mmap fuction does a size calculation but
stores the result in an int which makes negitive
numbers possible. Changing the variable to unsigned
ensures that the size used is never out of bounds.

Change-Id: Iffd9c1440d2f28b703a77993fdbb3ccd18f30694
CRs-fixed: 548145
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
(cherry picked from commit 0f3ff246774ae427e602d9b29ed8c8c08e0792bf)
input: touchpanel: fix security issues in GT915 driver

There are multiple buffer overflow and input validation issues
in Goodix gt915 driver, fix these issues by adding data length
check and change file system node mode.

CRs-Fixed: 526101
Change-Id: I5173fc1ca021fd45c939c7c8a4f460651330de5b
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
(cherry picked from commit 56e43d0333d8b06f10cb4367c27e8fd30b1fe7d7)
msm: socinfo: fix memory leak in socinfo_init_sysdev

Under certain error paths in socinfo_init_sysdev the soc_dev_attr
struct does not get freed. Fix this memory leak.

Change-Id: I22a4b60722367798dc5171fe7c00fc7c814168cb
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
(cherry picked from commit e81dc93ca7291f60050ca78dbe7c0f3f00f96e2d)
ASoC: msm: Change acdb_mmap size variable to unsigned

The acdb_mmap fuction does a size calculation but
stores the result in an int which makes negitive
numbers possible. Changing the variable to unsigned
ensures that the size used is never out of bounds.

Change-Id: Ie3cf4c0a1037e7f5fef29b8301becc6c19200ed6
CRs-fixed: 548145
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
(cherry picked from commit 1fdd09704dc811d7b0ab9cd464cddc751f94e99f)
ASoC: msm: Fix for power collapse hostless usecase

For hostless pcm usecases apps processor is not needed
for data path. Once data path is established hostless
driver will remove the pm_qos_request to allow the host
CPU to power collapse. Change adds the support to remove
the pm_qos_request once data path is setup.

Change-Id: Ic6ac8d99628c770061ec785f8549c164f6a9bbd8
CRs-fixed: 561202
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
(cherry picked from commit db065850468a18c80d2a45d775da38a6e58031b3)
msm: kgsl: Handle failure of find_process_private()

Handle the case of NULL return from find_process_private() upon
its failure by failing from get_process_private().

Change-Id: Id42ae795d140bd67d8a36496f840387858e5f779
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
(cherry picked from commit 6bc5e04c3a0d37c7340ea64c7753d4620d2129e2)
leds: leds-qpnp: Added in delay for flash LED operation

Flash LEDs require VIN_CHG to reach 5V to fire stabely. Adding delay
between flash enable and assert strobe when flash LEDs are turned on
and between flash strobe desert and module disable provides an improved
proformance. This also simplifies enable sequence so that the current
module enable sequence 0x00 to 0x80 before going to 0xE0 un-necessary.
CRs-Fixed: 539632, 548259

Change-Id: I26472c9ba445f3a311814ede8a821fa580f460b8
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
(cherry picked from commit 7ce3a9fca6597d2f79722d94308dfff694bd5f74)
msm: cci: fix for invalid error handle

fix for invalid error handle in msm cci
- msm_cci_flush_queue function never return
error because variable rc is unsigned int
- msm_cci_init function return result int32_t
but variable rc is int

Change-Id: I2610b08f4eceedfbb8bd07d8027310f43b9ee6bf
Signed-off-by: Vasko Kalanoski <vaskok@codeaurora.org>
(cherry picked from commit 7a75211feff9de671b23bfc2a1c019bc905669e1)
leds: leds-qpnp: Changes for WLED work function called only once.

Remove the redundant and extra schedule_work() call during
wled initialization sequence as __qpnp_led_work() call just
before schedule_work() has already does the wled initialization.

CRs-Fixed: 554413
Change-Id: I1fc180988c5a42976fc50ef01613c2c279510e3e
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
(cherry picked from commit 6805e6afe394b4c806cc762c8c37767f4653fa3d)
msm: mdss: Reserve framebuffer memory for the splash screen

Reserve memory for the framebuffer in the HLOS partition that
would be used to display splash screen in the bootloader as
well as the initial stages of the kernel bootup. This avoids
copying splash screen memory to a local buffer in the kernel.
The reserved memory would be freed when the first real update
comes in from the userspace.

Change-Id: I7dc256f8ffd69c24e56ac10ed57e37d96c8c9a2f
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit e6de048e54e324e3a3de6b70f6d738d41c9c4b10)
mdss: msm: Add support for Secure Display

Invoke scm call to inform TZ core about the start of secure display.
This TZ call modifies the XPU settings to block the read/write access
for master(MDP) with non-secure VMID.

Change-Id: Ib8d1ec756883efaa7388d632e854c32e9f2885ba
Signed-off-by: Arun Kumar K.R <akumarkr@codeaurora.org>
(cherry picked from commit 9ce1fd62681167080f989d78271579e31b2155ea)
msm: mdss: Configure minimum voltage for CX power rail

For smart panels, we observe abnormal waveforms
and unexpected voltage spikes on DSI data lanes
when the cx power rail goes to minimum voltage.
Vote for the cx regulator in mdp driver and control
the voltage to avoid frame shifting.

Change-Id: I7ec9e29a4972373775406fa29a5037fd43fef315
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
(cherry picked from commit 29b95f4f6f733c3dfdfe9e9c44f092c6c86df9a8)
msm: mdss: Add battery FET regulator usage

During idle power-collapse using smart-panel, when PMIC chip goes to
sleep, it puts battery FET (batfet) to low power mode (LPM) which allows
less than 100mA current to be drawn. Since smart-panel is in self-refresh
mode, it can still draw more than 100mA current causing PMIC and MSM
reset. To fix this issue, batfet has to be kept in high power mode (HPM).
In order to keep batfet in HPM, display driver enables batfet regulator
whenever display panel is on.

Change-Id: I2f3d9f20fcf86b3147ac7396d56f93bfc08377c7
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
(cherry picked from commit 954bbbc9eac0d5fe579a66d59b956b1c1e58de01)

Signed-off-by: Divya sharma <c_shard@codeaurora.org>
msm: mdss: Fix watermark level calculations for pipe updates

Watermark (wm) levels for active pipes are calculated and set for every
surface update regardless of pipe parameters are changed or not. In the
current implementation if reserved MMBs are not changed compared previous
frame then wm levels are reset to zero. This is not a correct behaviour
and may lead to under-runs. Fix this by setting wm levels based on
allocated MMBs.

Change-Id: I857c161f7203b64411e9345553f88c48f7726ee2
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
(cherry picked from commit 1be8950cbc240586b1cfef5b00bee253c1d02458)
msm: mdss: Enable fixed MMBs support for RGB pipes

RGB pipes in some of the chip-sets are statically tied to dedicated
Memory Macro Blocks (MMBs) out of common shared memory pool. These MMBs
cannot be used by other pipes. Enable support for this fixed MMBs by
parsing indexes from device tree and reserving fixed MMBs first before
general pool is used.

Change-Id: Ic4bc7fa790f430a2853719fec7fd849149bc6976
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
(cherry picked from commit 0ced4ecd9aa6e3697547a4c1612cb3b8961957a5)
msm: mdss: Implement overlay handoff for continuous splash screen

In order to support a smooth and seemless transition from the splash
screen to the boot animation, MDP needs to handoff all the
hardware ctl, mixers and pipes that were staged by the bootloader.
Implement this functionality by populating the MDP software structure
to reflect the state of the hardware at probe time. This removes the
the need to turn off the MDP timing generator when transitioning to
the boot animation and reduces this delay to just one frame.

Change-Id: I607e7b8af3e477ad960497548e8617ceb9cfbdfd
CRs-Fixed: 546447
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
(cherry picked from commit a72043450f4b1d0a4623f3612950a5746699427e)
Merge "mmc: msm_sdcc: Fix compilation issues"
Merge "msm: audio: qdsp6v2: Change acdb_mmap size variable to unsigned"
Merge "input: touchpanel: fix security issues in GT915 driver"