Commit 573979dee2 ("perf: Add support for exclude_idle attribute")
registers an idle callback routine armv8pmu_idle_update. Currently
the idle update routine might be called before the pmu has allocated
all the per_cpu structures. This can result in a null pointer
reference. Change arm_pmu_device_probe to allocate the structures
via cpu_pmu_init() before the init_fn() call (which eventually does the
idle_notify_register call). Change a branch to out_free to
out_destroy as out_free doesn't cleanup what was allocated in
cpu_pmu_init(). Also have armv8pmu_idle_update check that the
structure is not null before using it.
Change-Id: Ie1198fc1783804c61467889c68656d6e8c9c9edf
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
Driver is dynamically allocating memory based on bNumInterface from
device configuration descriptor and stores interface context
information using bInterfaceNum. Device can advertise
bInterfaceNum >= bNumInterface which results into out of bound memory
access. Hence create a mapping between interface context index and
interface number. Use this mapping to find unused context index or
load the context information of an interface.
Change-Id: Ic99b10abe662088c2c030526135689f7c78c595a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
LMH DCVS driver doesn't change the low threshold from HLOS. When there is
new request to lower the high threshold, the low threshold will be
modified if the new high threshold is lower than the existing low
threshold. But the low threshold is not increased when the high
threshold is moved back again.
Update the LMH DCVSh driver to always update the low threshold value
when there is a new high threshold request. The new low threshold will
be 0.5C less than the high threshold.
Change-Id: I356e47de585ae81bd27859f790f673b31ae5ba72
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Add battery voltage, current and low SoC thresholds for sdm660.
The BCL module will mitigate the CPU's, when battery reaches
the low voltage threshold, high current threshold or low
state of Charge.
Change-Id: Ie6cf0498bd7ad869640efc602d2573b6def7d5b7
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Enable HW clockgating and preemption for A512 GPU to save power
and for better context switching.
Also update proper size for CP MERCIU size.
Change-Id: If3e5101c2695b1f06d650d320bc8d3bebac29f6f
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
Enable BIMC GFX clock when A512 GPU is ready to access data
from DDR on SDM660.
Change-Id: Ib76ef7a4fd5362f8cb972f1e4e070157a59c2c27
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
Configure the size of the default CMA region to 32 MB in
DT for sdm660.
Configuring the default CMA region in the DT is cleaner
than using CONFIG_CMA_SIZE_MBYTES since it is easier to
configure per target and the alloc ranges can be specified
in DT.
Change-Id: I64d4e1ee379b2a3110ecd403e7ed838948df6ca3
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Add camera node, include rear aux and front camera, also
include corresponding eeprom actuator ois flash and torch node.
Change-Id: I45d5e45ea82bafa78ef83638f1b374e03bb43145
Signed-off-by: Pengfei Liu <pengfeiliu@codeaurora.org>
Speed is not notified in case of platforms having micro USB connector
instead of USB type C connector. In this case, set speed as High speed
only as by default only high speed is supported over micro USB ports.
Change-Id: I6f29914ca9e2345157330651464b7a0c151f1f97
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Enable IPA in SDM660.
IPA shunt data between apps, modem and USB.
Change-Id: I09aa16138d643b17b793162ca0591c143ad8da1f
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
Select which SPSS firmware to load based on 2 fuses.
Change-Id: I7080cc0b58c38965ed7e58808431cf487008de9e
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Use the proper clock for CSIPHY2 for SDM660.
CRs-Fixed: 1111640
Change-Id: If9eaa19a0ee837dbbe335597259a62287a1620d5
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
In msm_buf_mngr_sd_shutdown bufs is a pointer defined
in kernel, and it is printed to userspace using %lx.
changed it to %pK.
Change-Id: Ic2cb1a2ff109364ac2da1bbb3253a2253a0c6be9
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
Currently, CDSP socket instance id on APPS is not
matching with instance id on CDSP peripheral due
to which APPS is thinking that channel has been
opened with WDSP. This patch fixes this discrepancy.
CRs-Fixed: 1111626
Change-Id: I990ae8fd23c95f16be72b4fe207926444244c23e
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Add overflow check for param length to prevent
heap overflow while allocating memory for
ADM parameters.
CRs-Fixed: 1103334
Change-Id: I1163aeaabbc84dba4cd0739a35ecbdee18b42717
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Move preparing/unpreparing the clock source parents from the clk set rate.
This is required as invoking prepare from clk enable with disable irqs and
prepare would take a mutex resulting in sleeping from invalid context.
Change-Id: I90d8a346f684747f635bd9e7254ceb8d45841b05
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Update the 'apm-threshold-voltage' as per recommendation and also enable
the OSM cpu clocks.
Change-Id: I8074699b1ea9e5182a136d4935ffd2938972a91b
Signed-off-by: Taniya Das <tdas@codeaurora.org>