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>
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>
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>
commit b312b4f0e2f9 ("iommu: arm-smmu: Preallocate memory for map
only on failure") had the following two errors:
1. The return code we checking when map_sg fails and we preallocte
is wrong. The check should be for 0 and not -ENOMEM.
So the preallocate is never happening when map_sg fails.
2. map_sg could've have mapped certain elements in sglist and later
had got failed. With proper check, we are trying to call map_sg
on the same size again, which would leave to double map of
previously mapped elements in sglist.
Fix this by returning the actual ret code from arm_lpae_map_sg()
and check it against -ENOMEM if we need to preallocate or not.
Also, unmap any partial iovas that was mapped previously.
Change-Id: Ifee7c0bed6b9cf1c35ebb4a03d51a1a80ab0ed58
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
[isaacm@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
When control value is queried, framework is returning the
min value as zero even if min is negative.
This change will make sure that frame work will update
the max value in cases where min is negative.
Change-Id: I4e5c70a659ded61c4094f1622611f82994df86b0
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
Some devices use a watchdog driver which requires each cpu to be able to
handle an IPI within one second. Since printing to serial console disables
interrupts, the large amount of messages generated by dump_tasks() may
trigger this scenario. Therefore, ensure that these messages are
not displayed in nonfatal scenarios.
Also fix a logic error with strcmp.
Change-Id: Ifb6a09431747431478ce26ff89e38d6c6724af2d
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
[isaacm@codeaurora.org: Fixed trivial merge conflicts]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
With hardware having the capability, replicate the faulty transaction
using ATOS to better reflect the fault transaction type with Read/Write,
Privileged/Unprivileged and Data/Instruction access. This is done by
extending the iova_to_phys_hard to account for the transaction type.
Change-Id: Ifb3150ad78f159f04da9ba02b49851e9e119e172
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
[isaacm@codeaurora.org: resolved merge conflicts]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
of_get_device_group() uses pci_bus_type, compilation error will
happen if CONFIG_PCI is disabled, add checks for this config.
Fixes: 6d696b37ead1 ("iommu: arm-smmu: Support default domain attributes")
Change-Id: I7c5073b5bc5004600a4633b75fe7d5ea764cc656
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
Currently, as part of fault recovery, we try to
restart the a6xx gpu five times. This loop is
for legacy reasons for a hardware condition that
existed on a4xx. That doesn’t exist for a6xx so
remove the loop. Also, if there are no need to keep
GPU active, we should transition back to SLUMBER.
Change-Id: Ib6f7437bab2b424c4f632efca459ff8c3fd064e4
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
These both happen when gx is collapsed so its safe to
assume that nothing is inflight. Take an inline snapshot
and then request for a dispatcher based recovery.
Change-Id: I4a3438660953d38406dd8e70868fb38172f9e967
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>