msm: qdsp6v2: Increase max ports in APR

Increase the maximum ports in APR. Some Apps may support
multiple clients which exceeds the number of clients
supported in APR. This change increases number of ports
used in APR upto 8 sessions.

Change-Id: I06624330845681b4414dd470ab7aed669d690ba0
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
msm: vidc: add input parameter checks to exported functions

Check for invalid null parameter passed to functions

CRs-Fixed: 606467
Change-Id: I860ca3d69d8705c7b3d6f27f9504b567be5aeea3
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
msm: cpr-regulator: change sequence for handling CPR voltage over ceiling

The current CPR driver increases the UP threshold to its maximum value when
the ceiling voltage is hit, but it is not disabling the UP interrupt
because the CPR controller needs a NACK command from software if the new UP
threshold is crossed for any reason. Based on analysis of CPR hardware
behavior, disabling CPR UP interrupt when CPR hits the ceiling voltage
is not harmful even though the CPR controller waits for a response from
software indefinitely. The CPR controller restarts sampling again as soon
as software switches to new voltage corner if it had been halted due to
hitting the ceiling voltage.

Modify the cpr-regulator driver so that the CPR UP interrupt is disabled
for a given voltage corner when the ceiling voltage for that corner is
reached. Re-enable the UP interrupt for a corner if a DOWN interrupt is
ever received for the same corner.

CRs-fixed: 602095
Change-Id: I0f2c479464cc43f784e97422095df395fa0c7b47
Signed-off-by: Ke Liu <keliu@codeaurora.org>
Merge "msm: cpr-regulator: change sequence for handling CPR voltage over ceiling"
msm: kgsl: don't use sscanf()

Friends do not let friends use sscanf().

CRs-Fixed: 563605
Change-Id: Ic0dedbad56af5bbee4fc833701d8bc93b118efa9
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Merge "msm: qdsp6v2: Increase max ports in APR"
Merge "msm: vidc: add input parameter checks to exported functions"
msm: vidc: Add null pointer checks

msm_vidc_inst pointer instance is used in without any null
pointer check, dereferencing t could device crash.
Fix the issue by adding null pointer checks.

Change-Id: Ia17b380063326aa587aac941aac0131871147e8a
CRs-Fixed: 606486,606469
Signed-off-by: Jayasena Sangaraboina <jsanga@codeaurora.org>
msm: vidc: add input check for hfi q6 function

The input parameters may be null. This change adds input checks at
function q6_hfi_iface_eventq_read.

CRs-Fixed: 606516
Change-Id: I801a9d3249e9b97fa218fc29bc3a2a0e7a0d4d3f
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
msm: vidc: add kzalloc success check for new HAL session

Memory allocation must be verified before proceeding.

CRs-Fixed: 606527
Change-Id: Ic340bf9926f84507294c576997948ddbe61dd62f
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
ASoC: msm: qdsp6v2: fix possible integer overflow

Check integer overflow before multiplying struct size. If that happens
should return immediately. In addition if param length is greater than
MAX size from spec, better return error.

Change-Id: Ifa2875f0dfa57e9bad1721aa96b5a50d24eb2030
CRs-fixed: 605273
Signed-off-by: Fred Oh <fred@codeaurora.org>
qseecom: Validate pointer offset in qseecom_send_modfd_cmd

Validate cmd_req_buf pointer offset in qseecom_send_modfy_cmd, and
make sure cmd buffer address to be within shared bufffer.

Change-Id: I431511a92ab2cccbc2daebc0cf76cc3872689a97
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Merge "msm: kgsl: don't use sscanf()"
Merge "msm: vidc: add input check for hfi q6 function"
Merge "qseecom: Validate pointer offset in qseecom_send_modfd_cmd"
Merge "ASoC: msm: qdsp6v2: fix possible integer overflow"
Merge "msm: vidc: Add null pointer checks"
Merge "msm: vidc: add kzalloc success check for new HAL session"