It's fast for use cases that require super fast IOMMU mappings (in
exchange for memory). Enable it.
CRs-Fixed: 997751
Change-Id: I016937309ac8e16775d13e63b630bb98469c9fca
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Certain use cases require performance that can't be achieved with the
general-purpose SMMU page table code. By limiting ourselves to 4K page
mappings (no block mappings) and pre-populating the first and second
levels of the page tables up front, we can eliminate a lot of the work
needed for page table mapping and unmapping.
Add a performance-tuned io-pgtable implementation for ARMv8L page tables
that only supports 4K page mappings. Any size can be mapped, but only
4K page mappings will be installed in the page tables.
CRs-Fixed: 997751
Change-Id: I5861270709675016988052360d196e0a16a0d103
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Currently we restrict the pgsize_bitmap for the entire SMMU every time
we allocate some new page tables. However, certain io-pgtable
implementations might wish to restrict the formats beyond the
restrictions of the SMMU itself, which forces all domains on that SMMU
to the same pgsize_bitmap, even if the other domains would prefer to use
a more permissive page table format. Besides that, some SMMUs in the
system might have different supported page sizes at the hardware level,
so applying those to everyone else is wrong.
Fix these issues by implementing the new .get_pgsize_bitmap IOMMU op.
CRs-Fixed: 997751
Change-Id: I9a73a31ee63a054cc44c50a21f7a616efd4af964
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Currently we use a single pgsize_bitmap per IOMMU driver. However, some
IOMMU drivers might service different IOMMUs with different supported
page sizes. Some drivers might also want to restrict page sizes for
different use cases. Support these use cases by adding a
.get_pgsize_bitmap function to the iommu_ops which can optionally be
used by the driver to return a domain-specific pgsize_bitmap.
CRs-Fixed: 997751
Change-Id: I46d70733be647599e148fe52258a4d8f009ac48a
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Clear IEOB interrupt only for channels that have
IEOB interrupt enabled. This is needed to make sure IEOB interrupt
is not missed after switching from polling to interrupt.
CRs-Fixed: 1014388
Change-Id: Ia6484ed03d9508b827f8c7e4dadb84c14e306bd9
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Add the DUMMY network interface and the crypto ECHAINIV module
needed for tunneling in advanced data call scenarios.
ECHAINIV is the default algorithm for CBC which is needed for
setting up a tunnel using XFRM state. Dummy network device is used
to route the IPv6 tunneled traffic when there is no IPv6 route
present on a wireless device. The default route in the dummy
interface routing table will route egress packets.
CRs-Fixed: 1017216
Change-Id: I8638814f7e06b0e63638c5acd268663d6a627718
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Update v4l_fill_fmtdesc() with qcom specific video
color formats to prevent it from throwing up
a warning stacktrace and flooding the logs.
CRs-Fixed: 1018787
Change-Id: Ia140bfb2fcd699937cd845c4489458e5fefb5150
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Implement clk_osm_get_cpu_cycle_counter() which returns the
running cycle counter value. Register these two functions with
a scheduler-provided callback to allow the scheduler to estimate
CPU frequency without notification. Lastly, setup the cycle
counter to be increased on every rising edge of the XO clock
for improved accuracy.
Change-Id: Ie0f60ca79efc05901a88da13f7a6476f390518a5
CRs-Fixed: 988356
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Most of CPUs increase cycle counter by one every cycle which makes
frequency = cycles / time_delta is correct. Therefore it's reasonable
to get rid of current cpu_cycle_max_scale_factor and ask cycle counter
read callback function to return scaled counter value when it's needed
in such a case that cycle counter doesn't increase every cycle.
Thus multiply NSEC_PER_SEC / HZ_PER_KHZ to CPU cycle counter delta
as we calculate frequency in khz and remove cpu_cycle_max_scale_factor.
This allows us to simplify frequency estimation and cycle counter API.
Change-Id: Ie7a628d4bc77c9b6c769f6099ce8d75740262a14
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Enable bimc_bwmon device and the associated bw_hwmon governor
to scale DDR frequency as per the bandwidth between CPU and DDR.
Change-Id: I4efa37b8bb84ab62e82086b622896173b7d2fc7d
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Substitute 'MSM' in the devfreq device/config names to 'QCOM' to
comply with the current standards.
Change-Id: I156ba6e2b5f8e06a28540ca5def5b178c3604512
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Add cpu-bwmon device that monitors the traffic between CPU and
DDR and raises an interrupt when the byte count crosses a
threshold.
Change-Id: Ib9b508591d28d22e7d5aa8f33d8d829d3378ccea
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
Writeback display now supports more MDP formats. This change adds
the definitions for those formats.
CRs-Fixed: 978785
Change-Id: I72fc29a8d7b286b0766c0483ba69d6e02d29b661
Signed-off-by: Benet Clark <benetc@codeaurora.org>
This patch turns off clock and bus control as well releases other
software resources upon driver exit. This patch
corrects crash due to resource leakage.
CRs-Fixed: 1018309
Change-Id: Ie0c6639fff9b829a58e12037f88c6508864b60a0
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Enable rotator driver to use r3 driver for r3 minor versions.
CRs-Fixed: 1018722
Change-Id: Ida9a93db8459d065ab7850de506e5b9124f6fdd4
Signed-off-by: Alan Kwong <akwong@codeaurora.org>
Copy speaker configuration from active to inactive bank
and perform bank switch operation while speaker channels
are getting enabled or disabled. This will make sure that
soundwire banks are always in sync and allow independent
control of speaker channels.
CRs-fixed: 1007465
Change-Id: Ic1653194c22fa5669b1c04fd9630158633fb00a5
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Request device ungroup of speaker channels for independent
disable. It is possible that stereo speaker channels can be
disabled one after other, so remove them from group otherwise
speaker can be left in enabled state.
CRs-fixed: 1007465
Change-Id: I358ab4edcb85ec65b064ca28368ad744f2d36870
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Handle soundwire slave devices ungroup in master controller.
Set the group device id to 0 when soundwire slave devices
request ungroup for independent control.
CRs-fixed: 1007465
Change-Id: I4f1b39dac949aa3f6aa3abb12ff0310fb0e98d1c
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add soundwire API to remove the soundwire slave devices
from group so that the devices can be controlled
independently as required.
CRs-fixed: 1007465
Change-Id: Ibca3e33c0e85629ae5ce121e75526f4786d6408a
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add support for 48x2 frame structure in soundwire
so that when slave device data path is not enabled,
all control messaging will happen with 48x2 frame.
Soundwire slave devices send an explicit request to
enable data path which in turn change the frame
structure to 48x16.
CRs-fixed: 996586
Change-Id: Ia4329ac982eb2a29a2b925897cd87ca9711c30e3
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add in device tree info to enable flash LED.
CRs-fixed: 1015501
Change-Id: I0c6471549dfa7af435a5ce5f21a56caab1c4ea09
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
If driver is registered before FW ready indication then bus error
observed because of powering off the hardware before calling
driver probe. Fix the issue by powering off only when driver is
not registered.
Also add top level reset after FW ready without which bus error
is observed.
CRs-fixed: 1015484
Change-Id: I26609c4011f10c1a9ee62b092050394e064ee2a2
Signed-off-by: Prashanth Bhatta <bhattap@codeaurora.org>
CONFIG_CPUSET sets affinity to cpu 0 without cgroup setting.
Due to this performance regressed.
CRs-Fixed: 1014436
Change-Id: Icf96a123b8d6e9c007198c2969d60e3707a57098
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Enable energy aware driver for msmcortex targets to support energy aware
scheduler feature.
CRs-fixed: 1018108
Change-Id: I5745dbcbb946ee2f937d1e77a68a4e87bc85e08e
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
This patch addresses kernel addresses leak by changing
the format specifier to adhere to the kptr_restrict system setting.
CRs-Fixed: 987013
Change-Id: I32649a26f54d96c56d80aa2a1bd5f5d9dd0dd9d3
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Allow modem mba, modem pbl and err_ready timeouts to be disabled by
writing to starting of pil_imem region.
CRs-Fixed: 1015492
Change-Id: I786d8edcd89e3624ef05ffc9a6953a8f840bbac0
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
Add DSP memory region node that allows for buffers
to be created to be shared with DSP.
Change-Id: Iffd95234813a5dcd8ab7ec07a4ff1d2c679bb26f
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
PCIe is not used or tested on RUMI or SIM for msmcobalt.
Thus, disable PCIe on these platforms.
Change-Id: I0682801c0893a1b1516033b2ec0b0e2ec2713fdd
Signed-off-by: Tony Truong <truong@codeaurora.org>
Add support for secure session that checks whether the
buffer being passed was allocated from a secure heap and
appropriately maps the buffers in the secure context bank.
Change-Id: If590f65d033e264c04f0ad782895b02765ff4f3d
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Add device node for HW event driver. HW event driver can be used to
configure HW events on msmcobalt device.
Change-Id: I5e633e798a0655d783554538b83b4642ec428c8c
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
This register write allows to select the usb3 phy mode. It is
recommended to explicitly select the usb3 phy mode before
programming the phy init sequence.
Change-Id: I2cb648b976d72d2020357881768674241557c56b
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
qmp phy can run in display port mode or in usb3 mode.
It is recommended to explicitly select the usb3 phy
mode before programming the phy init sequence, since
TCSR_USB3_DP_PHYMODE register is commonly used to
select mode between display port driver as well as
ssphy driver.
Change-Id: I270596868762ccd4f2f2cc9b0daaca647a2bee88
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Video firmware will send a HFI_PIC_STRUCT field in sequence changed
event, which indicates whether the clip is interlaced or progressive.
If the color format is NV12 and the clip is interlaced, DPB mode
would be combined NV12 while the DPB mode is split i.e. DPB is in
UBWC and OPB is in NV12. Also combining the pic struct change and
bit depth change into a single event to the userspace.
CRs-fixed: 1017209
Change-Id: Ife71e31622a53d0ea4cc418d434998e710352e10
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
PCI-e devices on MSM systems need to have their stream IDs configured at
device add time, since they're not known at system design time and
therefore can't be placed in the device tree. Add the necessary calls
into the MSM PCI-e driver to obtain stream IDs for devices behind PCI-e
at device add time.
CRs-Fixed: 1012229
Change-Id: I3645a525c3ab5ef6d89eeaa99894542bd3aa261f
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Uncomment some code which got commented during kernel upgrade by mistake
CRs-Fixed: 1015492
Change-Id: Id46bff3b3803d1316ea769581c0f1b0e7fa41498
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
Add slimbus 6 playback hostless and slimbus_6_rx back-end
dai-link to enable independent backend for different devices
during audio playback.
Change-Id: Idac26ac45f1177db96fc3fb5d4a5e2f837f86d1b
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
Add USB audio via ADSP support in the machine driver.
Change-Id: I9773555fb025a41afd27e078f6ef23a4d140128f
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
Fixup callback is added for dais which
do not follow the FE and BE convention
and is directly controlled by userspace
such as hostless dais. This will restrict
the hw_params based on what is supported by
hardware rather than blindly setting what
is given by userspace.
Change-Id: I401c70ab5de1df10363ec808cb68f72d8d74af96
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
As per the hardware documentation, PON device in pmicobalt need
not have to be configured during any type of reset. Hence remove
the DT property "qcom,secondary-pon-reset" from pmicobalt PON
device.
CRs-Fixed: 1001210
Change-Id: Iaf46a2247e70e17ed0b0032038860bfa64e7f7c6
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Current list of domains in iommu-debug was only
maintained during attach/detach calls. But for
masters like graphics this won't account for all
the domains, as it allocates multiple different
domains but attaches only one domain at a time.
Add support for maintaining list of unattached
domains too by adding them to debug_attachments
list during domain alloc but keeping dev as NULL.
We would add entry in debugfs attachment directory
only on actual attach call.
Change-Id: Ifde043e5c39f356b4187a30cbdf020ee943618f1
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
show_data messages for the value at the addresses
needs to printed in the continuation.
CRs-Fixed: 1010438
Change-Id: I41c48e090ec4c44aeccd0e8fbbcb814b55c0416d
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
While setting up route for a particular device, compare
stream name of CPU DAI and Backend DAI to find the correct
Backend DAI.
Change-Id: Ic3f7c0e5b2a1055e7fdf52c78ded797a9a126d03
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
New country XA is based on Japan. The channels 5170-5250 are marked
as PASSIVE.
CRs-Fixed: 990486
Change-Id: I6dad4ce061316680239b3f9c23e64b23a875eb75
Signed-off-by: Amar Singhal <asinghal@codeaurora.org>
USB GSI function driver uses usb_ipa_w work to queue different events
like EVT_CONNECTED, EVT_DISCONNECTED and more. ipa_event_handler()
uses those events as inputs to make necessary decision about performing
connect and disconnect with IPA driver. It is required that before USB
GSI driver calls ipa_usb_deinit_teth_prot(), it has invoked IPA
disconnect API ipa_usb_xdci_disconnect() if it has called
ipa_usb_xdci_connect() API. Current code is making sure that any
running usb_ipa_w work is being completed before calling
ipa_usb_deinit_teth_prot() but if work is not scheduled and pending,
ipa_usb_xdci_connect() is not called (i.e. later when usb_ipw_w work is
scheduled, EVT_DISCONNECTED is being processed but gsi_unbind() has
changed sm_state as STATE_UNINITIALIZED which results into no-ops.)
which results into USB and IPA driver go out of sync in terms of
expected state machine. Hence calling ipa_usb_init_teth_prot() on next
USB cable connect from gsi_bind_config() fails which results into no
USB GSI functionality. Fix this issue by using drain_workqueue() instead
of flush_workqueue() which makes sure that re-queue work is flushed.
CRs-Fixed: 1005018
Change-Id: I64ff559b85f901688a4abd0110ebb32a5317e34d
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Enable QPNP_POWER_ON device support for msmcobalt platform so
that the power-on/off reasons of PMIC PON devices can be
printed out during bootup. Also, based on the reset type, PON
devices needs to be configured as per the hardware documentation.
CRs-Fixed: 1001210
Change-Id: I3db5f233e7c182e330f5144b4ab0d0769abf4a8d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
The defconfigs have gotten out of sync again. Sync them up.
CRs-Fixed: 1017606
Change-Id: I7d2ac7172396e5e08cde8ef156685222eb8941d8
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>