Additional bound checks for parameters that are used
to calculate target buffer address.
Change-Id: Ib4a00a51c761dc7751a19e6ee7f55cacac97860f
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Framer is responsible for clocking slimbus, and when it reboots, state
of all associated data channels is reset to be consistent with HW
state.
Change-Id: Ie74ace2b20ad6c255440ff6ce593f7d5503bf388
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
G-Link SMD Transitional XPRT resumes RX operation only when a receive
intent is queued. This leads to a communication stall if the receive
intents get re-used and is not queued.
Resume the RX operation in G-Link SMD Transitional XPRT if a receive intent
is re-used. Also access the intent_req flag exclusively to avoid any race
condition.
CRs-Fixed: 938394
Change-Id: I5a1fdc7ee35070a42659c8e701d73ee2de8d6d05
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
If a bulk message times out due to interrupt starvation, a late
coming interrupt may access structures that are not valid.
Improve timeout error handling by resetting variables, and changing
relevant logging.
Change-Id: Ie0ee2fd9c2ce1628c69e1975fe713a2a26d9e716
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
CP_CACHE_FLUSH interrupts can storm on very rare occasions.
Check for this interrupt storm and do nothing when it occurs
rather than thrashing the CPU which can occasionally bring the
system down.
Change-Id: I0528ad4fec43abfaeeba1499d0b0e51e14b09f0d
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Fix plug removal detection by enabling electrical removal
irq when headset/headphone accessory is removed from the
other end of extension cable.
Change-Id: I585a81e6c01b4ddd249f76614fb933beea3755fc
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add smp related files like platsmp, headsmp and
hotplug. Copied from the below caf link
https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.18/
tree/arch/arm/mach-msm?h=caf/3.10/msm-3.10
&id=5724b421fc2db7413048fe5b18135d481d68597a
Change-Id: I2b0be05f939dd97efa6bd187f65f6805d73cb64e
Signed-off-by: Venkatesh Yadav Abbarapu <vabbar@codeaurora.org>
Add device tree support for MSM8996pro along with different PMIC
configurations it supports.
Change-Id: I9d386b79f2324180c2001d382f89c4163fd1af62
Signed-off-by: Sanrio Alvares <salvares@codeaurora.org>
Re-use the same buffer for the hyp assign calls rather than allocating
a new one for every single call.
Change-Id: Ia76f9743c7eb83d3432ac19cc98be243434c2aa8
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Add support for slave_write_array and to pass addr_type with
slave_read.
Change-Id: Ia530dcf684739f43e36fc67fec83bc0be0c8cf78
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
When the backend camera daemon is crashed for some reason,
camera application waits for the completion of the command
processing till the timeout is reached which is unnecessary.
Hence clean all the command queues when the config node is
closed and immediately wake up all the command queues so
that camera application is notified immediately.
Change-Id: Iff5c331e8c5bb39305087fd4defe332690653b10
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
DMIC clock drive strength for tasha codec on 8996 is required to be set
to 2MA as per hardware specification. Add this to tasha codec device
settings.
Change-Id: Idecc9caa484c26a431ea3f2410bd72d441eda550
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
When a qos request is added with IRQ affinity, irq notifier
for that irq is added and with out disabling the irq
notifier if the irq is free it is through a warning.
So disable irq notifier when the qos request is removed.
Change-Id: I50faa4ecbe1b632c0f0f203ca52faf18753c33d4
Signed-off-by: Srinivas Rao L <lsrao@codeaurora.org>
Do not access the node_info pointer when it is null to
avoid the crash.
Change-Id: I8ca1a26fab847469bd205cbfb4adf63b9194a1d0
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
export cnss_get_restart_level cnss API for wlan driver
to get current subsystem restart level.
Change-Id: I7e5d9b0055707bbad06b6cd1496723da6c28d4d5
CRs-Fixed: 961579
Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
Currently, diag driver is not releasing wake
source on receiving 0 length packet from SMD.
This patch ensures that the wake sources
hold are released properly.
Change-Id: I4eefc0d361a130c7f313b8ba215f51ecf32e0923
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Adding null check before regulator enable and also
resetting regulator variable to NULL after regulator disable.
This will avoid using previously disabled regulator in next
session.
Change-Id: I0e8f2f71152064972128f707653e3a2295e1d408
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
Create an API to match voltages across asymmetric CPUs as
this can be useful in systems with a shared rail across CPUs.
The API takes in one input argument which is the frequency of
a big cluster CPU for which a voltage-equivalent little cluster
CPU frequency is desired. The return value is this little
cluster CPU frequency. All frequencies are in units of kHz.
Change-Id: I821819a0761566984dd7f92014599ff0fcb85e90
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
Automotive DragonBoard 820 is a development kit and has an HDMI type A
receptacle. So enable HDMI hot-plug feature.
Change-Id: I2be85cf91f6532110b125050bce0cca441e42960
Signed-off-by: Mathew Joseph Karimpanal <mkarim@codeaurora.org>
In compressed driver streams might get stopped while
ioctl drain is started but not completed, since buffers
are drained in multiple stages when gapless mode is
enabled.
Check stream state before issuing wait commands to
prevent waiting for drain ack on stopped streams.
Change-Id: I606639c103a7aed90dd9a4561fa6dffc3d4c3822
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Define camera bus clients to identify the multiple camera clients.
Add API to support devices consisting of multiple clock rates
in the device tree node and register threaded irq.
Change-Id: Icdaae68b82c441baf988e90fb6d5cc83c2402a93
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Make changes to use strcmp to compare app name, and
avoid the memcpy comparision error if the first
several chars of an app name is exactly equal to
another app name. Besides, on some targets, keymaster
app may be first loaded as "keymaste" by qseecomd,
and then used as "keymaster". To avoid checking app
name error, register "keymaster" into app_list and
thread private data.
Change-Id: I468b4e5cb1d5d77ac5d687d0bddc8614b972785f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Add support to model the graphics clocks on MSMCOBALT.
Change-Id: I31c3dda59a0bb7e9b6b6cee8176fb46f46767629
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
It is possible that differnt platforms could configure to DMIC clock
drive strength differently. Allow this configuration by setting the DMIC
clock drive strength through pdata.
CRs-fixed: 938006
Change-Id: I6f9f8a947e0efca31d0c50dec9a5973079bb48c4
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
On v4l2 stop_streaming, a vb2_buffer_done needs to be done to
ensure that the driver gives back all the buffers it got from
the buf_queue() callback.
Change-Id: I1ba8776381efb41820ed44a8bdf70c99574b09ac
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
Update the logging in SPS driver to catch additional info for
the interaction between SPS driver and BAM client drivers.
Change-Id: Icd5955d2d4dd83124f47e60e052ec3b3a2611025
Signed-off-by: Yan He <yanhe@codeaurora.org>
Give more headroom for headphone PA ramp up and down during
impedance detection to avoid any click and pop or ramp error.
Change-Id: I3e3980e48ce19955b4230876887adfde5b44e8ea
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
During snapshot, we may encounter an invalid IB1 base which
is not found in the current rb. In that case, dump the entire
ringbuffer from start to end and all the IBs in it to get a
more complete picture of the failure.
Change-Id: I4393c7de6f8f4890870fa6e2b5e69073dce922b7
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
For proper memory accounting, a key metric is to know how much
memory kgsl allocated for a process and how much of it the process
is actually using. This is done by keeping track of memory in our
vmfault routines. This information is provided via the process
mem file.
Change-Id: I7e3371a708ea5fdade3840b2384b3bc4012ad004
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
This reverts commit b6db8cdda733821b9d21cc66a5f8c2ce62238065
("ARM: dts: msm: Increase CSIPHY clock rate on 8996") to meet
power test requirement.
Change-Id: I1a1667782dc211c5061ddd5642868d0e2d066631
Signed-off-by: Xu Han <hanxu@codeaurora.org>
Adding mutex unlock before returning in error cases
and also ensured that return value is not over written
in error cases.
Change-Id: I5aceffd2dbf2b456ca421892b691f86c6b1032c3
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
Not all targets have fs regulators, for such devices
crash is seen when firmware load fails. To fix this issue
validity check is made before disabling fs regulators.
Change-Id: Ib1b365bcdda724580e69d35dcf8dbeb25abc2b99
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
If GDSRC is set after FW load this is causing FW timeout.
Setting this before Jump instruction to avoid timeout.
Change-Id: I8b20ae1d8ae627288f1615a6ae6480dd8105ddcb
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
Ratelimit log in msm_vb2_buf_cleanup to prevent excessive logging when
stream is NULL.
Change-Id: Ia687375c8e2a2683a4d32cd0eb984f731b2288e7
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Every bus instance can have 2 NGD devices. Fix the instance number
determination based on NGD device-id.
Change-Id: I515f4f09d58a7abc0c0322ca714b88fb847a0909
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Receive command mutual exclusion is required only for the channel open
& close related operations and is not required for any operations relating
to data exchange.
Remove receive command mutual exclusion from the location where it is not
required.
Change-Id: Icebab0b36d71165d895e0fed2e9cfe2c624056b9
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
when camera_v4l2_close is called for one of the stream
and say backend is taking more time to delete the stream
and in between mediaserver crashes which call close camera
which lead to race condition. To avoid this added a lock
for close camera.
Change-Id: Idc4a72fd1d639619fafd3e2856d5bb502785c0bf
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
During ADSP subsystem restart, all slimbus read/write would fail
as the bus is not available. Avoid codec read/write, until the
slimbus master in ADSP is up.
Change-Id: Iec1933d2625c1cd3dd700b2b3e2ffc7eae64880b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
If page fault handler is triggered from within the same context
as ARM IOMMU driver, it can lead to deadlock due to improper
grabbing of mutexes.
This can be avoided if the page fault handler context is
immediately returned to ARM IOMMU driver after scheduling
work queue for triggering client specific fault handler
registered with CAM SMMU driver.
So, schedule tasklet for triggering page fault handler of all
registered clients.
Change-Id: I7fbe520f7e27c9a4f4917cd259f138c64ee76e78
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
A recent change in the ARM SMMU driver expects either a 0 or an
-EBUSY from any of the registered page fault handlers. Otherwise
it will assume the page fault unhandled and trigger a fatal crash.
So unless the various context bank page fault handlers are updated
to return either a 0 or an -EBUSY, each page fault will trigger a
fatal crash. This will make debugging the underlying problem
causing the page fault in the first place, more difficult.
So fix the page fault handler to return proper error code so that
ARM SMMU driver does not consider the page fault unhandled and the
device does not crash.
Change-Id: I1f1cab324d6ee89400cd7006758a906244368472
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
SW should not be registered for GSI_BREAK_POINT interrupt as
this is for debug purpose only
Change-Id: I17d152955bb52bccc89ff731eabe05582b7fd14c
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
For each successful wsa read and write, we are printing the
values. Moving the print to debug.
Change-Id: I1b5c6b345b1d967d43f26bd9b1d4731d02ad021c
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
zcache store can fail on lowmemory conditions.
Do not throw unnecessary prints on such events, causing
a stall.
Change-Id: I8fba6938f75ef5b6054ee079951b7409279e1c02
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
The following race is possible:
CPU 1 CPU2
zcache_store_page
zbud_alloc
zcache_evict_zpage
zpool = zhandle->zpool;
CRASH
zcache_store_page
zhandle->zpool = zpool
Fix this by properly initializing the zhandle and validating
in zcache_evict_zpage
Change-Id: I02328220b30f415fa1f171236eab3a2e40072fd9
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
MSM Cobalt TSENS can support upto 22 temperature
sensors across two controllers. Use explicity
the msmcobalt to specify changes to the controller
usage such as enabling health monitor check.
Change-Id: I6e0d600e9fe88cc2d835ad051eede4efcbee9563
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
MSM Cobalt TSENS supports upto 22 temperature
sensors across two TSENS controllers. Thermal
clients have the ability to set temperature
threshold and receive notification on a threshold
crossing.
Change-Id: I05d6f7cfceece6c27ef5d03b9ea3b77d409108db
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Currently, while updating the real time vote
there is a possibility that index will go beyond
the array size which will lead to buffer overflow.
This patch rectifies the index checking to avoid
possible buffer overflow.
Change-Id: I71fa3698eacdcb2933dc388ca8571bb6f952becc
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
Define the OOB interrupt interfaces in case that internal
interrupt is unsupported in some platforms.
In some specific platform, only polling mode is supported, with
these OOB interrupt interfaces implementation, it will support
interrupt mode.
To be generic, this OOB feature is default unsupported.
Change-Id: I3b38e59bd7fdb441c85eb82a79cf9c951ca32130
CRs-Fixed: 937303
Signed-off-by: Kai Liu <kaliu@codeaurora.org>
Add support to modify the completion timeout range for
the root complex. This value/range will inform when
the root complex should send out a completion if the
endpoint does not respond.
Change-Id: Iabca3f637d9abf6c93810c84d81ff6b5c77d4528
Signed-off-by: Tony Truong <truong@codeaurora.org>