With the valid SMMU IOVA range WLAN firmware is able to detect invalid
host DDR access before SMMU fault happens.
Change-Id: I3a3aac4e1da7bb7747bfe3b352df33fc87221860
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Wait until all conditions are met instead of busy looping to check if
the channels are finished initializing.
Change-Id: I50bd3bad6ccf3f4957ed0a98cdceed45d49fe851
Acked-by: Chris Henroid <chenroid@qti.qualcomm.com>
Signed-off-by: Chris Lew <clew@codeaurora.org>
Static code analysis tool is detecting a possible NULL pointer
dereference for gsi->d_port.in_ep in the error handling path.
This change adds a NULL pointer check to avoid this issue.
Change-Id: I4adf03e933cece0698cd3761c8758f4bd98925f4
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
EUD extcon device doesn't provide speed and cc_state information.
Hence skip querying speed and cc_state with it.
Change-Id: Ibe9e327fa412c8fd1fac0b1db3ba3be5d210f33c
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
The memory information tag is meant to be used in conjunction with
the memory notification interfaces to associate a label or tag with
a memory parcel. This memory information tag is meant to be used
for distinguishing between different memory resources that can be
transferred between Virtual Machines (VMs).
Change-Id: I6856284430ce5a78461c203904695aed25868706
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Currently gsi driver calling usb_string_id() from bind() callbacks
to allocate string IDs for functions and then store that ID in the
appropriate descriptors and string table. This string_id will cleared
from composite driver in unbind path. During composition switch when
bind happens its checking previously allocated string_id for functions
and doesn't allocating again a new staring_id.
This will cause incorrect string_id assignment to usb functions and
USB CV interface descriptor test failing with no strings for
some compositions.
Hence fix this issue by allocating string_ids upon every function bind.
Change-Id: Icce114a770a13658614fc990e60670ef23044ba1
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
ipa_connect_channels can return failure if gsi prepare trbs fail or
start xfer fails. But currently driver is not checking for the failure
and goes ahead to enable IPA data path. This leads the controller to
access faulty addresses which cause kernel panic. Fix this by checking
the failure returned from ipa_connect_channels. Also cleanup the error
handling path.
Change-Id: Ia1e8e17381e12231d8d78224ba3b07081f143212
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
The GSI operations for GSI_EP_OP_PREPARE_TRBS and GSI_EP_OP_STARTXFER
should not proceed if run/stop is cleared. Since ipa_work_handler runs
in worqueue context there might be a race between run/stop STARTXFER
and ENDXFER which can lead to SMMU fault. This change add checks to
avoid gsi ep operations when run/stop is cleared.
Change-Id: I9f64dee7020aec9cccfde8d247c0b53d9cc1f234
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
The GSI operations for GSI_EP_OP_PREPARE_TRBS and GSI_EP_OP_STARTXFER
should not proceed if the endpoint is disabled and should return an
error code (-ESHUTDOWN). Add error checking in f_gsi when calling
these ops. This is to catch cases where the endpoint is not enabled
(i.e. GSI_EP_OP_CONFIG was not called or GSI_EP_OP_DISABLE was
called) prior to ipa_connect_channels(), and helps to avoid the
situation in which STARTXFER is called on a disabled endpoint and
later GSI_EP_OP_FREE_TRBS is called which causes the HW to
incorrectly access stale DMA addresses the next time STARTXFER is
called.
Change-Id: I45f70524b87ec6303e135e385accd8e68e2b5a01
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Agera PLL print registers are required to get the PLL values
from the debugfs, thus add support for the same.
Change-Id: I4b708958e1125ce7e8eab945a3c15113739230d4
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Agera PLL is required to be supported from HLOS clock controller, thus
add support for agera pll ops.
Change-Id: I77b2a741667accf9bd0eecfcd0dabfaf7596345f
Signed-off-by: Taniya Das <tdas@codeaurora.org>
The Legacy FSM Mode is required to be set when the Fabia PLL needs to be
used in non-FSM mode, thus add support for same.
Change-Id: I23d491cb33391dce1eb21d9ced298001da9ef907
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Burst size must be printed in perf builds as it is a major
characteristic of the system.
Change-Id: I7e6013751333bb487e2d9422726e41b1050aca43
Signed-off-by: Gidon Studinski <gidons@codeaurora.org>
Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Update snapshot register list to add CP_APRIV_CNTL and CP_SMMU_STREAM_ID
registers. This is needed to capture complete CP state required for
debugging.
Change-Id: Icb8c35481de12dde43aab666f0ecad2240dcaa35
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
MHI reset is triggered as part of EP shutdown. Shutdown
is blocked until MHI RESET bit is cleared in MHI CTRL reg.
There is a possibility of PCIe link going down during this
time. Since MHI RESET bit never gets cleared after 2 sec
wait_event_timeout reads the MHI CTRL reg and this results
into a memory abort. Fix this issue by using a boolean flag
as condition in wait_event_timeout. This flag is set when
MHI reset is triggered and cleared when reset is done.
Change-Id: I5b1831518255a38cde5b60406b5b9e9386b5477e
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
When clocks are registered with the framework during probe,
clk_core_hold_state() will call clk_core_prepare_enable() for clocks
already enabled in HW from bootloaders. Some clocks are failing to
actually turn on when this is called, which results in noisy warnings
printed to the kernel log.
These specific GPU clocks are failing to turn on because the required
GDSC isn't enabled yet. However, this isn't a functional issue since GPU
isn't actually being used yet. Since these clocks aren't shared across
multiple client devices, there's no need for the framework to issue a
proxy vote during registration. Thus, set the CLK_DONT_HOLD_STATE flag
for these to skip the clk_core_prepare_enable() during registration.
Change-Id: I4679de06fa903ab68e574b0be3419cdb47a16375
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
Depending on timing there is a chance the channel initialization will
happen at different intervals. When this happens, the first channel
wakeup will be cleared by the init loop and never be set again by the
channel init. This leads to a stall in init because both channels
will never have both their wakeups set to signal channel init done.
Change-Id: I435e78c3e4b83cf6b827d3827f35d1e6a1b297fa
Acked-by: Chris Henroid <chenroid@qti.qualcomm.com>
Signed-off-by: Chris Lew <clew@codeaurora.org>
If a client comes up early in the boot process (perhaps was a built-in
driver), qmi_handle_init() will likely fail with a EAFNOSUPPORT since the
underlying ipc router hasn't init'd and registered the address family.
This should not be a fatal error since chances are, the router will come
up later, so recode the error to EPROBE_DEFER so that clients will retry
later.
Change-Id: Ibbaa0a6665c67dbee7315e353da82ad355162422
Signed-off-by: Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Link: https://lore.kernel.org/r/20191106230511.1290-1-jeffrey.l.hugo@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Git-commit: 52af26e33e700158e6549f1465fcf9da099fabfa
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Chris Lew <clew@codeaurora.org>
This change allows kernel modules to make calls to register external
display interfaces and deregister them.
Change-Id: Ia7236bd458565bbbdec4a8355c40a1c5a1bcab86
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
mhi_reg_write_enqueue API stores reg, val and valid which can go
out of order. In case valid is set to true before val is set,
offload worker running on another core ends up writing stale value
to register. Another possibility is valid being set to true but not
visible to other cores. When offload worker gets a chance to run,
this results into skipping register write. Fix these issues by
adding smp_wmb() between stores of val and valid and another after
valid is set.
Change-Id: I3b930e7fad4252d34386de525491f94997b34f36
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Do not set FAULT_SKIP_SNAPSHOT in case of not collecting inline
snapshot.
Change-Id: I5f3de5881768ab07de989010096a58bea749c680
Signed-off-by: Pankaj Gupta <gpankaj@codeaurora.org>
Add new GPU chip id and required code to
Support A619 GPU.
Change-Id: I9b4e8b35e536486c63661b050a2242538d873c2d
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
CVP SSR crashed when derefencing the pointer to a
shared memory buffer descriptor.
Change-Id: I3f7b690d90496efdf0451b5500578fee636f81fe
Signed-off-by: George Shen <sqiao@codeaurora.org>
Add support for locktorture and rcutorture test modules on Lahaina.
Change-Id: Ib903fab01f8ed84707d5717980f0467d41e67374
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>