Subsystem device add support for subsystem restart
recovery and ramdump device for cnss firmware dump
collection before the subsystem restart.
Refactor subsystem restart wrapper APIs to avoid the name
space collision in cnss platform driver compilation in dual
WiFi mode.
CRs-Fixed: 983677
Change-Id: Ib4a8d1a6d0ce8f1faa43ce0aa8312823b1ca3c15
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
PM QoS adds support to improve the wlan throughput.
The cnss platform driver export PM QoS API to wlan
host driver.
Refactor PM QoS wrapper APIs to avoid the name space
collision in cnss platform driver compilation in dual WiFi
mode.
CRs-Fixed: 983653
Change-Id: Id7a486f2f111476e73d5707eba36611a3530e9cf
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
Store WiFi DFS NOL list and return to wlan host driver
on query. It adds support for no link operation on radar
detection.
This export symbol supported by both SDIO and PCIe platform
driver. So add this API as a common API for both SDIO and PCIe
interface based wlan module and remove the duplicate API from
the SDIO and PCIe platform driver.
CRs-Fixed: 983618
Change-Id: Idc25806de6f919b88130a1633adbb7bc1048ecd5
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
Store WiFi unsafe Channel list and return to wlan host
driver on query. It adds support WiFi unsafe Channel list
for LTE-WiFi coexistence.
This export symbol supported by both SDIO and PCIe platform
driver. So add this API as a common API for both SDIO and PCIe
interface based wlan module and remove the duplicate API from
the SDIO and PCIe platform driver.
CRs-Fixed: 983607
Change-Id: I1698df3fb689ef17294e00032adde5ae635e76de
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
Currently the qmap control pkts are sent back to AP
from modem because of exception. The fix is
to use pkt_init to skip filtering/natting on IPA-HW to
reach modem instead. Also there is a requirement for
AP-side to send back qmap flow control acks immediately
after receiving the requets. The code change is to make
2st level high-watermark for those qmap control pkts to
not be dropped. Also rmnet_ipa driver won't stop queue
if the current pkt is qmap control pkt even when
outstanding pkts above the first level of
high-watermark.
Change-Id: I3074e4a37d74c491593e109c1df0c99da85a5e57
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Pointer map returned from dev_get_name may be null.
Add null check before derefering.
CRs-Fixed: 985337
Change-Id: I952ae63e9b909dde763b3024d90fe4553e852860
Signed-off-by: Meng Wang <mwang@codeaurora.org>
DSI software does not wait for MDP_DONE ISR
before sending new frame if burst mode feature is
enabled. It leads to race condition in below case
* MDP kicks off frame-N and mdp_busy sets to true
* MDP receives new frame-N+1 and waits for
PP_DONE interrupt before sending N+1 frame.
* MDP receives PP_DONE interrupt and kicks off
frame-N+1 (DSI_MDP_DONE interrupt is not received yet).
* Frame-N+1 kickoff sets the mdp_busy wait to true.
* DSI receives DSI_MDP_DONE interrupt for frame-N and
reset the mdp_busy to false.
* Any clock off call can turn off the clock at this moment.
DSI software must always execute busy_wait when kickoff
happens from mdp. That avoids the busy wait race condition.
Change-Id: I462cd5ad21d6ccc08dfb862e98fd6fafeef686d4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Allow the kgsl-event workqueue to run on any available
core. The other workqueues in KGSL were already unbound.
CRs-Fixed: 985082
Change-Id: I7e843b57541b7ddcb53848078f73b05c88238711
Signed-off-by: Jonathan Wicks <jwicks@codeaurora.org>
The video subcore RCGs should be force enabled during rate
scaling to workaround video firmware potentially disabling
the branch clock at the same time on msm8996.
CRs-Fixed: 971305
Change-Id: Ib0223ee33040c365d8a00bb796c44395102754f5
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Firmware running on HW blocks could be powering down the branch
clock or the RCG whilst software is doing frequency changes. If
this happens, the RCG behavior is undefined and may cause issues
with its functioning.
To work around this, use the RCG root_en bit and force turn it on
while scaling the rate. In addition, make the polling timeouts
configurable.
CRs-Fixed: 971305
Change-Id: If2db14c70614c47d673fc735f5f4bac276d4a3d9
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Force ISENSE calibration to stop before starting new calibration.
CRs-Fixed: 973565
Change-Id: I86dcbaa7feaecd630a027c5aca41d62a5855efda
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
There are high chances for hrtimer_interrupt() interrupt on
one of the core and other core executing sys_reboot simultaneously.
In such a situation we could see ipi_cpu_stop() marking a cpu
as 'offline' but hrtimer_wakeup() can schedule a task on
offline core, resulting BUG_ON in smp_send_reschedule().
In fact that the CPU is not really offline but ipi_cpu_stop()
is marking it as offline.
CPU0 CPU1 CPU2
sys_reboot()
kernel_restart()
machine_restart()
machine_shutdown()
smp_send_stop() ...
... ipi_cpu_stop() hrtimer_interrupt()
set_cpu_online(1, false) __run_hrtimer()
local_irq_disable() hrtimer_wakeup()
while(1) try_to_wake_up()
ttwu_do_wakeup()
check_preempt_curr()
smp_send_reschedule()
BUG_ON(cpu_is_offline(1));
This is easily reproducible in device continuous reboot testing.
Since the CPU is not really offline and hasn't gone through the
proper steps to be marked as such, let's mark the CPU as inactive.
Change-Id: Ia1daea407220578d4212ef6c65c4be837ca370fd
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
zbud_alloc if returns free object from pool must also
initialize it to 0 when asked to do so. The same is
already taken care if a fresh object is allocated.
CRs-fixed: 979234
Change-Id: Id171edf131df321385fcdcd7660d06da97689e3e
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
When sending holb monitoring command to uc there is a
possibility that IPA clock is off which can result in
unclocked access. Make change to enable IPA clock before
sending holb monitoring command to uc.
Change-Id: Ia8e7564372d4b4ec9f3ad35927e0d403d0695753
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
The FD hardware needs to be reset everytime after halt
is called. Adding the reset sequence.
CRs-fixed: 961394
Change-Id: I129de341e619d8c8f6faa69d43c9d13ba21dd88f
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
Adapt CPP driver to SOC layer by replacing the msm specific
routines with SOC API which eases the portability of cpp driver
on to non-msm platforms.
Change-Id: I8cd6bdcaa9d310b770f2dfe66047c64316a309de
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Some of the camera modules need to get the clock rate
back after rounded to a new value, Hence change the
msm_camera_clk_set_rate API to return the rounded
clock rate after setting it.
Change-Id: Ie3ed17ad6658e51448a769fd141aef63ff0c79fe
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
On MSMCOBALT, while enabling the gpu_gx_gdsc, the DEMET cells
need to be explicitly reset by using the domain_addr register.
CRs-Fixed: 922984
Change-Id: I794005ac976eff01e5ffff93e4a60970b15f5f05
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
On MSMCOBALT, while enabling the gpu_gx_gdsc, the DEMET cells
need to be explicitly reset by using the domain_addr register.
Add support in the gdsc driver to do this.
CRs-Fixed: 922984
Change-Id: I145a581a50719427b7303720a48cd421e2e1ef45
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
We need to skip checking for link state being in U3
when we receive a Function Suspend. Pass in this information
to GSI EP OP that checks if we are good to suspend channels
with IPA. We skip the check for U3 if we are handling Function
Suspend and check for U3 when we are handling Bus Suspend.
CRs-Fixed: 966352
Change-Id: I29ee0326edbe33b02884495ddc89484bef21e7e0
Signed-off-by: Devdutt Patnaik <dpatnaik@codeaurora.org>
Skip check for U3 link state when we receive Function Suspend.
Link is not in U3 when host sends Function Suspend, but will
be in U3 if/when the subsequent Bus Suspend arrives.
If we check for U3 in the case of Function Suspend, we will
not disconnect channels with IPA as the API that checks
pre-conditions for suspend will always return FALSE.
The U3 check is done as usual in the case of Bus Suspend from
the host.
CRs-Fixed: 966352
Change-Id: Ie9ee045a096b58256d2e8814338ffe0aa3c01163
Signed-off-by: Devdutt Patnaik <dpatnaik@codeaurora.org>
IP address re-assignment fails when we disable and
enable RNDIS adaptor from device manager. This is
observed only in composite functions such as ADB + RNDIS.
In "RNDIS only" compositions the issue is not observed
as host typically sends a RESET when we re-enable the RNDIS
adaptor. Add support in the GSI state machine to connect channels
to IPA and enable GSI data path in response to PACKET FILTER
message with FLOW CONTROL DISABLE option when we are in the
INITIALIZED state. Previously we only treated the PACKET FILTER
message as a valid input when in the CONNECT_IN_PROGRESS state.
CRs-Fixed: 975930
Change-Id: I97471f128958a915001a5b49c98036076fb8c18c
Signed-off-by: Devdutt Patnaik <dpatnaik@codeaurora.org>
Invoke AGC handshake on A540 even when LM is disabled, pass
0 for LM and pass HW patchid.
CRs-Fixed: 973565
Change-Id: I62c32b55bf2e3a1ec498b1ec0a8bebf34ac803a9
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
The root clock for all GPUCC clocks, gpucc_cxo_clk is currently
being sourced off the cxo_clk_src clock. This will not allow XO
shutdown to happen. Use the cxo_clk_src_ao instead.
CRs-Fixed: 983874
Change-Id: I7f8dd9ea28114d3d06fec3397064356b4deb6e7e
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Move device specific features to the device rather than trying
to do them in the common initialization code.
Change-Id: I812db29a2eae90ca532755c265aaa2e52db972d7
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Retrieve and load the HDCP keys before starting authentication so
that HDCP internal state machine can be initialized completely on
cable connection to avoid possible authentication failures.
Change-Id: I873fb02589bb6c19938743d44dc56ed1cfff7260
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Add codec reset gpio device tree node for msm8996 target
specifying active and sleep pinctrl states.
CRs-Fixed: 968161
Change-Id: I040e8f54c6c86ab66d7fc824d5aab006f8d5f08f
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Disable the guardpage workaround for A5x and instead
selectively suppress pagefaults. Suppress read pagefaults
that are likely caused due to UCHE overfetches. For this,
the fault address must be within the first 64 bytes of a
page and the fault page must be preceded by a valid allocation.
CRs-Fixed: 975293
Change-Id: I6a0995af3ab4129c6923726043c5f34c747641f9
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
When we use polling mechanism for holb monitoring command
Uc will still try to send a interrupt to notify the response.
This can result in a sync mismatch between AP and Uc and will
result in a panic. Make changes to use timeout mechanism
for holb monitoring command as well.
Change-Id: I8c74cfedff30f90dceec7f89b153018c307afa0a
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
The return variable is initialized if there is an error and is
left uninitialized otherwise. There is a possibility of returning
garbage.
CRs-Fixed: 980968
Change-Id: I2a21ef7934472ae2fd59d6277df4b3e9b401b489
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
This reverts commit 43c0767e17 ("of/platform: Move platform
devices under /sys/devices/platform"). Userspace code that
expects to find devices under a fixed /sys/devices/... path are
affected by moving platform devices under /sys/devices/platform.
Change-Id: I6a108c46c1b2e3985797bb86a3ed84a29ab286a8
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
This change adds logic to prevent invalid access of qmi ctx
during SSR clean up using mutex.
Change-Id: I689deaf093909a951a9e5847241ee3938fea240b
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Acked-by: David Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: Sivan Reinstein <sivanr@codeaurora.org>
Signed-off-by: Ravinder Konka <rkonka@codeaurora.org>
Report the input current limited status via the power supply in
parallel mode in order to better optimize for HVDCP usecases.
Change-Id: Ibd3865828ccbfa44b36839f5d11e7a60b7ada77d
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Apply voltage adjustments for required voltage corners based on
different values of selected miscellaneous fuse bits. Apply the
adjustments to both open-loop voltages and closed-loop target
quotients.
CRs-Fixed: 982984
Change-Id: Ic45949afc8445d35c245434a7f51e4859a5978ad
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
The LP1 and LP2 flags must be swapped to be in accordance
with the old HAL mapping used by MDP3 driver.
Change-Id: Id4b0b41d102f9aef2836901b2bea5e961ec0962b
Signed-off-by: Sravanthi Kollukuduru <skolluku@codeaurora.org>
In DAPM, when booting up widgets connect variable
is sometimes initialized with value 1 even though
expected to be 0. This is due to val not initialized
locally in API dapm_set_mixer_path_status and can
result in using garbage value.
CRs-Fixed: 982805
Change-Id: I172558f64c19750c461befda3aa16ca6480ab507
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Use the cxo_clk_src_ao resource to source the HMSS CPR RCG. In
addition, remove it's vote on the CX rail since CX is guaranteed
to be at least SVS2 as long as even one CPU is online.
CRs-Fixed: 983870
Change-Id: I5a4d37310e56235a590e8a93dc8a33d6c3e46e4d
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
USB 5V VBUS can be switched independently for the two USB
instances on the CDP_AU board. Add the PM8994 GPIO/MPP
configurations and expose them as usb_vbus_vreg,
usb_otg_switch and usb2_otg_switch regulators that can be
controlled by the USB controller device instances.
Also fix up the &usb3 node. Due to commit c51ea2bbbce87
("ARM: dts: msm: Add GIC ITS extensions for 8996") changing
the size of address-cells for the &intc node, the interrupt-map
property needs to be updated to the new format. Also update
the correct IRQ numbers and add the missing ss_phy_irq to
sync up with the msm8996 SOC DT definition. Finally, remove
the unused vdda supply entries as well.
CRs-fixed: 971957
Change-Id: Id53f0a54e16b194bc12e57fac3e52efc43ebdc6c
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The mmss_mdss_byte0/1_intf_clk clocks are needed by the display
driver. Add support to program them in the clock driver.
CRs-Fixed: 981902
Change-Id: I17b1ecaec9c98261faa49c6f088c4802a716ecf7
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Turn off watchdog on Virtio on MSMCOBALT.
CRs-Fixed: 983131
Change-Id: I2684d52b95cb446013d2620de252b6abe3e1e5bd
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
The active context tracker that we bolted on the side of the
dispatcher was designed mainly to see if there was 1 OR more than 1
active context, not much more than that. Since it is apparent that
we'll need to track up to 4 contexts and possibly more later the
algorithm needs to change.
The new algorithm puts all active contexts on a linked list - every
time a context is used it is popped from the list and put on the
tip with an updated time. To count the number of active contexts
walk the list until you get a context with an active time older than
you are looking for. You also can do other magic on the context,
like see if it matches up with a given command queue.
Change-Id: Ic0dedbad6be9fd1925121ee54e0000c42b089f44
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Currently MPM pin for DP line state change is not mapped to irq.
Only MPM for DM line state chagne is mapped to hs_phy irq. But this
results in delayed device detection in VDDmin when HS/FS devices
are connected in host mode. Hence enable power event irq during
host bus suspend so that MPM pin for DP line state can be also
mapped for early detection of HS/FS devices during VDDmin.
CRs-Fixed: 972212
Change-Id: I71d7c3c374a23b51a0489cf44410d76d5734d009
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
After commit dbe80b7cc96a1f3f23246552fbd2352f334fa857 ("ARM: dts: msm:
remove gpio output settings in dsi pinctrl") driver is no longer
defining in the pinctrl the gpios as output high configuration;
so driver now has to explicitly configure gpio output direction.
This change add the settings in the driver to configure the gpio
as output pin, fixing panel issues when booting-up with
continuous splash disabled.
Change-Id: I1ac3c5dd07cff4a30cce9de3c340f071dd84d49a
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Fixes EP configuration for DPL resume sequence.
Sets correct interrupter number for DPL composition
and also checks for NULL on notify EP in the
resume path.
CRs-Fixed: 983160
Change-Id: I7e9bf0aa839e63d8cfe801d3b81dd5f48a315575
Signed-off-by: Devdutt Patnaik <dpatnaik@codeaurora.org>
Add CTI devices for msmcobalt target. These devices can be used to
send cross triggers between different components
Change-Id: Ia5902c62b699c5f373f567dd18cbe38f10a275a3
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>