BAM endpoint TRB ring has usage of 2 TRBs (normal and LINK), and
completion API (dwc3_msm_req_complete_func()) currently only
increments dequeue pointer by 1 assuming that dwc3_gadget_giveback()
does increment dequeue pointer for normal TRB. With newer changes
in dwc3 gadget framework, it moves requests to cancelled list with
usb_ep_dequeue() and reclaim those TRBs on end transfer command
completion. Reclaiming TRB back to trb pool is done only when
req->num_trbs is non zero. dwc3_msm_ep_queue() API checks for
enqueue and dequeue pointers, and on mismatch of it error out.
This results into no BAM2BAM communication after trying to use USB
as sink with QDSS usecase. Fix this issue by incrementing req->num_trbs
with dwc3_msm_ep_queue() API for normal TRB so dequeue pointer is
incremented with dwc3_gadget_ep_cleanup_cancelled_requests() API.
Change-Id: I0777aea7c6add7fb6fea7ea74056786e33435427
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Currently, alarm register is not cleared on resume
leading to reboot during power off charging mode.
Change-Id: Ie2e6bbab8aa46e4e9b9cc984181ffab557cbbdae
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
It fixes an issue that CVP session creation may fail if session runs
out of buffer cache.
Change-Id: I06f2db2132c16aef51b19a9ac0c7bed917390a7b
Signed-off-by: George Shen <sqiao@codeaurora.org>
Enable STM_PROTO_BASIC to support to write log to /dev/coresight-stm.
Change-Id: I12eff41b68ff1b90cc3f66a8f3c07ec757d80aae
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
List register ops is provider supported hence can not be
called on clk framework clks. For example: xo-board,sleep-clk
are fixed clock.
List/print only those clocks who are qcom-regmap clks.
Cast member structure only if clk_hw is valid clk_regmap clk.
Change-Id: Id66856f45166a32e37ea7e477f80360ab020ab25
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
Providers adds ops for list rate and print reg debug nodes
to print necessary debug information, these nodes
can not be added to clk framework and is moved down to provider level.
Since provider does not have complete knowledge on clks owned
at clk framework, providers can not blindly typecast clks owned
by clk framework to call its list/print ops.
A separate qcom_regmap_list is maintained during qcom clk
registration with clk framework. So as when debug list/print
calls are called, provider have knowledge of qcom clks
and only call respective ops on qcom clks maintained
in clk_regmap_list.
Providers can use this API to know if clk is qcom regmaped clk.
Change-Id: I3e4d8280c8fa0c692f855c0d6659dd14f95008df
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
Enable the QRTR MHI transport to enable QRTR/QMI traffic to remotes
connected over MHI/PCIe.
Also, remove this feature from lahaina_debug as it will be enabled
in lahaina_gki config in this change.
Change-Id: I7e6165459c22ec105714acd575000ae1c8e39fdd
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
Enable the IPC Logging driver to enable clients to write debug logs
into a circular buffer that can be read from debugfs.
Also, remove it from lahaina_debug config as it will now be
supported on lahaina_qgki.
Change-Id: I7811c15dc2572e75f3545a072b758232250afe40
Signed-off-by: Jay Jayanna <jayanna@codeaurora.org>
If call tmc_disable_etr_sink in switch mode function, there will be
dead lock issue as there is mem_lock in tmc_disable_etr_sink. So need
to call _tmc_disable_etr_sink.
Change-Id: I6ea242e8f519c6dea8f2b80235841bee7af1931e
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
Instead of using a set size as decode buffer size use the QMI
request structure size avoiding possible out of bound case while
decoding the QMI request message.
Change-Id: Ibda07cb6333daa28153244ca899b1775f80c82b1
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
In order to debug cold boot calibration timeout issues, assert when
it happens in debug builds.
Change-Id: I4ea6ade5fd660e29da2661b95fac2af02758546e
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Say GMU hits a hard fault and saves critical debug state and
sends CM3 fault interrupt. It is possible that subsequent handshake
between kgsl and GMU will timeout and kgsl will trigger GMU snapshot.
This will send an NMI to GMU, which will over-write the critical debug
state. To avoid this, check if there was a CM3 fault before sending
NMI to the GMU.
Change-Id: I0d4d4af3efe31110123f614c8dd8fe8d4a04c812
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
Dwc3 gadget controller driver can still access usb_request
after dequeue() returns due to async cancellation.
Hence usb_request shouldn't be freed after calling
usb_ep_dequeue() which can otherwise cause use after free.
Fix this by allocating & de-allocating from bind and unbind
instead of data_connection & close.
Change-Id: I8155ecbebcf762fc87c17841c72c53c6dca2e4a9
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
AMC requests made while the RSC is in solver mode result in a -EBUSY
response from the rpmh driver. This is expected and is a non-issue since
in this case we just need the request to apply to the WAKE set instead.
It's only possible to see this for secondary RSCs like the Display RSC,
since the primary Apps RSC will only be in solver during the power
collapse/restore sequences while SW isn't running. Ignore -EBUSY so we
don't return an error and short-circuit before sending the necessary
WAKE/SLEEP requests.
Change-Id: Id34b91c6e46d282be2522434d3c2b4837291b3b7
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>