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>
There are scenarios when WLAN Host request for
SOC Wake during SSR. If WLAN FW receives the request
before FW_READY it ASSERT.
Avoid sending SOC Wake request to FW during SSR.
Change-Id: Ia42cc17149de7a33da0161a280c79d5dfce0f4c8
Signed-off-by: Naman Padhiar <quic_npadhiar@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>
There is a race condition where the idle timer executes right after
when dispatcher decrements the active count to 0, without waiting for
80 ms(which is the current idle timer duration). Race condition:
Say, everything is idle for 80 ms, and the idle timer gets
scheduled to be executed. At the same time, a new submission comes
in, gets submitted and retired, and at the same time the idle timer
function also starts executing and waits for device mutex. Now, as
soon as the dispatcher decrements the active count and unlocks device
mutex, the idle timer gets the mutex and attempts SLUMBER. However, it
finds GMU isn't idle(busy with TS_RETIRE, or IFPC sequence) and
triggers snapshot/recovery. Fix this by making sure that idle timer
function honors the latest idle_jiffies value before triggering SLUMBER
entry.
Change-Id: Iee0743b41afa616d8a0d1df19f9ae365748d06ce
Signed-off-by: Harshdeep Dhatt <quic_hdhatt@quicinc.com>
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
Extend cx gdsc notifier support to rgmu and non-gmu targets. With this,
KGSL waits for cx collapse notifier event instead of polling for gdsc
state. This helps to remove the CPU cycles spent for polling. Also, it
addresses the corner case scenario where cx gdsc collapse event can get
missed due to sleep operation during polling.
Change-Id: Ie92c77d10768376c0267fffad6d745530c645d58
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
Signed-off-by: Harshitha Sai Neelati <quic_hsaineel@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>