The QMI TMD get device list supports maximum 32 devices. But there
are targets that support more than 32 QMI TMD devices. To add more
devices support as well as to make sure backward compatibility with
legacy device list, add new optional extended device list variable
in QMI TMD interface. The first 32 devices will be filled in legacy
device list variable and all other devices will be filled with new
extended device list variable.
Add support to qmi cooling device driver to get extended device
list if any.
Change-Id: I530669a9f89f8c9da7bbcc7d486dde76f0a7f3ea
Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
Signed-off-by: Priyansh Jain <quic_priyjain@quicinc.com>
There is a race for clients that open sockets before the control port
is bound. If a client gets an idr that was allocated before the control
port is bound, there is a chance the previous address owner sent lookup
packets to the control port. The new address owner will get residual
responses to these lookup packets.
Change the xa_alloc to xa_alloc_cyclic so new ids are allocated
instead of trying to reuse the freed ids.
Call the xa_alloc_cyclic function with GFP_ATOMIC.
Change-Id: Ie1bda7a818309503f80542e739bac646327296f7
Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Sarannya S <quic_sarannya@quicinc.com>
The subdevice list should be populated in a particular order as
the state notifications have a priority. This change re-orders
the subdevice add calls to ensure higher priority subdevices are
present at the start of the list.
This change is inline with
commit c9f2092072 ("remoteproc: qcom: pas: Fix subdevice add order").
Change-Id: I94e0e7af3fe634d5354e0f58f0a818071c3ff918
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
UAF is observed while unloading the interconnect driver.
Interconnect is core to the system and should not
be unloaded once it is probed. Marking the driver as
permanent by removing the module_exit function.
Change-Id: Ia3b1eee450760596ca6a3ea50daa4fe595a70158
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Irq is saved but not restored when deregistering pcie event. Restore irq
so that might_sleep will not report error when removing cnss2 module.
Change-Id: I7d75334afe960b25d3cc218a80bae8c06fec5455
CRs-Fixed: 3377281
Signed-off-by: Guisen Yang <quic_guiseny@quicinc.com>
Signed-off-by: Naga Rashmi Ayiluri <quic_nayiluri@quicinc.com>
This reverts commit b84bd97e37.
Warnings for direct dma clients during cache operations are now being
handled by dma-buf driver. Instead of doing dma_buf_unmap_attachment
early if we do it in destroy path, it helps in saving cycles and
improving performance during app launch.
Change-Id: Ic66dd3b66136318abf59685f95fee17890377fd4
Signed-off-by: Pankaj Gupta <quic_gpankaj@quicinc.com>
Update defconfig to enable usb audio for anorak.
Change-Id: I19b28ec4951636754b7a4d434df54691cab8d379
Signed-off-by: Uttkarsh Aggarwal <quic_uaggarwa@quicinc.com>
Currently after cable disconnect, USB power_supply_type remains
unchanged until next cable connect. Hence add handle to set the
charger type to POWER_SUPPLY_TYPE_UNKNOWN after plug-out.
Change-Id: I8ca4a46684ba095b54563d2148a8fb6276c97f5e
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
This change makes changes to smcinvoke driver to handle suspend and resume
scenarios. If the accept thread gets interrupted, do not set the server
state as defunct if the thread is in freezing state, i.e. if the thread
is going in suspend. In such cases, increase timeout of that server so
that invoke thread waits indefinitely for response from userspace until
the system resumes back.
Also,if the accept thread has invalid cbtxn, start waiting
for new requests instead of going to userspace and then coming
back.
Tests: validated with smcinvoke sampleclient cmds.
Change-Id: I96db9112d3e7dda552de37176c2b8a76c32cf47a
Signed-off-by: Divisha Bisht <quic_divibish@quicinc.com>
All the client drivers irrespective of RPMh or RPM based target,
are using RPMh based ICC tags for setting the flags.
Updating the interconnect code under RPM target to set the flags
according to the RPMh flags sent by the client driver.
if QCOM_ICC_TAG_ALWAYS is passed by client driver then both
RPM_SLEEP_CXT and RPM_ACTIVE_CXT are set.
if QCOM_ICC_TAG_ACTIVE_ONLY is passsed then RPM_ACTIVE_CXT is set.
Perf flags are always ignored under RPM based targets.
Change-Id: I90e0edb8dc6e983d455896b3e9ea04c6b61fac3b
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
As part of commit '2d390a26b7695 ("serial: msm_geni_serial:
Check for wakeup byte after suspend")', wakeup byte is not
being checked as part of suspend resulting in failure.
Enable the check for wakeup byte after suspend, so that
wakeup isr function handles it.
Change-Id: Ibb3276b3e8584b0ef79d5809158f2cbba4e283c1
Signed-off-by: Prasanna S <quic_prass@quicinc.com>
We calculate the number of memory entries of a process first
to make sure we have enough memory. When saving the entries,
we use the ID of the entry as an array index. This can result
into array out of bound access as ID can be greater than
the number of memory entries calculated earlier.
Fix this by using the right array index.
Change-Id: I915e565330c21a2604354a05592ae15d62991617
Signed-off-by: Rakesh Naidu Bhaviripudi <quic_rakeshb@quicinc.com>
QDSS currently increments the usage count for the DWC3 core when a
set_alt() is received, and connect_w is queued. The expectation is that
when qdss_disable() is received, it will schedule disconnect_w to run,
so that the usage count is decremented.
However, there are opportunities for the disconnect_w to be cancelled by
usb_qdss_connect_work(). If a disconnect event is received before
connect_w is run, the usb_connected flag is set to 0, and disconnect_w is
scheduled. Since qdss->wq is a serialized WQ, the connect_w runs first,
and evaluates that usb_connected is 0. If this is the case, it cancels the
disconnect_w routine, and exits. This leaves a hanging vote, and leads to
the DWC3 core not being able to enter runtime suspend.
Fix this by decrementing the usage count in the scenario where disconnect_w
is cancelled.
Change-Id: I40ccb95f6b248dd4d647ba2b4b11f94c0834d760
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
call release tz object in sync manner only in case of EBUSY add
object in to post process list, so that we can retry and process
it later in a seprate kthread.
Change-Id: I6ae44857db0870709db17f8658a0d32cf77c9646
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
Calling object release in sync once if fails with ebusy or enomem
to a queue.
Change-Id: I10a998cd2bc5f8ad803f56dc372b76b98f763336
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
IDT FW version offset has been changed in IDT9415 and above. Update the
offset value accordingly.
Change-Id: Ic8b8c0d3af4c6587e85f1f87bcdf9ac2ea806eae
Signed-off-by: Anjelique Melendez <quic_amelende@quicinc.com>
UAF is observed while unloading the interconnect driver.
Interconnect is core to the system and should not
be unloaded once it is probed. Marking the driver as
permanent by removing the module_exit function.
Change-Id: I123baed132efcc37daf0d7a01298308d9e664c81
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
With unload of dispcc driver, disp_bcm_voter is getting unloaded.
But the interconnect driver keeps committing the votes on both
apps and disp bcm voters causing UAF.
Added remove function to capture the unloaded bcm voter details
and updated the bcm voters list by removing the unloaded bcm voter
from the list.
Added checks under add, commit and clear functions to check if the
voter exists in the bcm voters list. If requested bcm voter is not
present under voter list then returning ENODEV.
Change-Id: I7c4007a23f17a205ef24c9622e10bc4a46c5b67b
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
For some PMICs, there may be a requirement to enable some regulators
through the HW enable control instead of the usual SW voting. In these
cases, there is a PBS RPMh resource exposed to all subsystems and
voting on this will write to a register on PSTM, which triggers a
PBS sequence that toggles the enable state of the required regulator
through HW enable control.
Add support for voting for regulator enable state through the PBS
RPMh resource.
Change-Id: I23b174a7965243e6406b15905bff3b4d9671de3b
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
Glink interrupt handler exits due to -ENODEV error
return from the RX data path. So, failed to
read left-over data from FIFO.
Handle ENODEV error in qcom_glink_rx_data will process left
over data properly.
Change-Id: I7ebfd47b0daf077d8b5399df03464c4e8afdb347
Signed-off-by: Kishore Kumar Ravi <quic_kiskum@quicinc.com>