For some platforms due to HW limitation timing db property
can not be a shared property, so making this property as interface
specific for MDSS, instead of shared.
Change-Id: I6e1a482dd23f475c332200f857494a7c848c58c1
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
If timing db(Double Buffered) property is enabled, then MDP FLUSH
bit needs to be set in order to push the data to video interface.
Currently this property is used as a shared property for both DSI
interfaces. But in case of chipsets where there is no FLUSH bit
defined for the secondary DSI interface, this will cause issue.
So moving the property to each controller specific instead of shared.
Change-Id: I25913867da41ca2fb2848ab96f5be5d9228a8f63
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
qseecom_send_modfd_cmd_64 converts non-contiguous ION memory fd to
scatter-gather physical address list, and supports up to 512 SG list
entries. Now, 512 is not enough if client wants to send large data
in a fragmented system. In this change, if SG list entry number is
larger than 512, we will allocate a new contiguous kernel buffer,
then save all SG entries into this new buffer.
Change-Id: Id90eefb98b63bf16db755dae8e1482e448090f47
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Configure the new IPA-interrupt register to get
the IPA-HW irq, also change the tag process to
be compatible to 64 bits platform.
Change-Id: I29a8805cacc8d8df2f0e60ee8e1d2243c718d248
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
Currently, IPC Router statically associates the version of the
protocol to be used with each link. Thus, dynamic version negotiation
is not possible.
Add support for version negotiation that sets IPC Router version
after a successful negotiation.
Change-Id: Iea04742ef30443c1e36760561e7f20175c4fbaa6
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
Fix unbalanced mbhc electrial irq enable/disable to
avoid detection failures when headset or headphone
is inserted into an extension cable at the other
end.
Change-Id: I2eb9096f1cb45957a3d511af86cb630348581e0b
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
MDSS client may want to reuse the pipe during
boot up which are currently in use. The pipe
allocation fails when these pipes are in handoff
state and atomic API tries to reallocate them.
Moving them to used list allows client to reuse
them at early stage without waiting for first valid
kickoff.
Change-Id: Ia6f1282ea192e3a0e948488ba833c2580bebb9bf
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Remove reference to session_info after handle is closed.
Store the peripheral masks in a local variable before closing the
session. Use stored value instead of closed session_info handle.
CRs-fixed: 930676
Change-Id: I08179b100926883f0cb84e0de35cc356e9cc9a03
Signed-off-by: Chris Lew <clew@codeaurora.org>
Add sysfs node to trigger cable disconnect/connect hot plug
interrupts. Power off 5v regulator which provides 5v to sink
which in turn pulls hpd line low resulting in disconnect hot
plug interrupt. Similarly, power on 5v regulator to get connect
hot plug interrupt. This is needed to simulate cable connect
and disconnect for some special requirements like resolution
switch from the user applications.
Change-Id: I882358ddb40acf07a5e7be692aac590880e012c2
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Currently, there is no option to set the version in IPC Router transport.
Add support to set a version in the transport so that the version can be
modified from initial entry after the version negotiation.
Change-Id: Ie6d823a3b4f2608efe2ac992a248a4f0884b856d
Signed-off-by: Atish Kumar Patra <apatra@codeaurora.org>
For audio usecases bus bandwidth voting is required only for
slimbus. Add the check to gracefully handle I2C cases.
Change-Id: I4dcbd0e6a84f8ca9f5429ed0ec0b4795e591981d
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
Add ISENSE based limit management, provide interfaces to GPMU
and hardware LLM and BCL subsystems.
Change-Id: Ic0419509bdc6d4d9d478277cc90ae75dc527ca66
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
Add support for the A540 GPU device:
* Add entry to the GPU list and add adreno_is_a540() functions
* Add VBIF settings
* Add hardware clock gating values
Change-Id: Ibd653597400ded01ca05607fbbdafea3e86e177f
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
mmapsize is no longer important to the memory descriptor
and the APIs that would use it never materialized. It currently
just tracks the size of the memdesc and is no longer needed.
Change-Id: I8fa1001c2f89f23034029de7de6ab77532bf45fa
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Probably overkill, but ensure that the struct pointer we are going
to dereference to send into kref calls is valid before we dereference.
Change-Id: I308176df9f7476a2a9f1357612381a93160ad698
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Alignment checks only need to be done once and can be moved down to
the lower layers.
Change-Id: Ia4683cf9db08506db810e80854c006d94dc80310
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
The code has gotten bloated and repeats the same logic in several
places leading to very stringy code. Consolidate this code to
enable easier readability as well as prep the code for future
changes to this area.
Change-Id: Ibb70cbae3a8a5157e589020ccebefff11b6ffaf1
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
The uapi directory shouldn't contain compat definitions,
so move this file out of there.
Change-Id: I1ee862e522d0b7f9bc4e22fb0e375b4cc1a53504
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
During dynamic resolution switch update the DSI PHY timings
for panel based on the new porch values. Also calculate the
new frame rate as per new porch values.
Change-Id: I683bf1255c77a2575567847cef5edcfb5529b69d
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Add support to check for change in panel video timing
parameters when DSI controller is used for a pluggable
interface.
Change-Id: Ia7ff6b3adf778283c1fc893f2c2eb4335ae4dd68
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Instead of hard-coding the GDSC polling timeouts, use the
"qcom,gds-timeout" property to load the desired values.
These polling times vary for the votable GDSCs especially
depending on the sequence, clock rates and the clock SLEEP
and WAKEUP settings.
Change-Id: Id43ce13fcb5f386d5659280f2b561b6065eb0248
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
The votable SMMU GDSCs might take longer to enable than the
default limit of 100usecs depending on the clock WAKE and SLEEP
settings and the clock rates. Make this polling timeout limit
more configurable.
Change-Id: I26cb00cefa5d45ed2a92f306921e2d95938795af
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
WLAN module needs platform driver support to power up QCA Chip.
Build Platform component independent of CONFIG_CNSS.
Change-Id: I644a42d500c864f7997b9ad6038852fc907ff480
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
The include file <linux/bitops.h> is not available on user space.
remove it from the spcom.h uapi file.
Change-Id: I1a2ea14a4fc1154b63776e83909389cc73398f7d
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Optimize logs in ISR as it effects normal thread
execution and causes frequent preemption.
Change-Id: Iff70f7838408a6abfd68cb501524e3913c8df29c
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
SCM (Secure Channel Manager) driver is used to communicate
with the secure world entities like trustzone and hypervisor.
As a part of the communication we expect to give certain
input, output operands and the caller of the scm_callX
API would expect that output values or return values
of the scm_callX should not get corrupted (if they depend on it).
Due to Kasan instrumentation of the SCM driver following
code is getting instrumented with Kasan __asan_store8_noabort
APIs which would internally check if the memory access is allowed
and it is the functionality of the Kasan to check/instrument
the load and stores.
if (ret1)
*ret1 = r1;
if (ret2)
*ret2 = r2;
if (ret3)
*ret3 = r2;
All will be fine for the first *ret1 = r1; execution since
GCC has generated the code which saves the x1 value (r1)
into the another register but the execution of the
__asan_store8_noabort API after the saving of the register
corrupts the x2 and x3 when it returns. GCC has no knowledge
at this point to save the x2 and x3.
Due to this x2 and x3 is loaded with the Kasan shadow
offset value and Kasan shifted (>> 3) address.
Since x2 and x3 (r2 and r3 in the code above) would be used
as the ret2 and ret3 for the caller of the scm_callX API
the caller would get the wrong return values (if it needs them).
QSEECOM is one such driver which uses these ret2 and ret3 values
and due to this corruption QSEECOM driver was treating it as
SCM call failure, though the bug described above due to Kasan
instrumentation would be applicable to any caller needing
the right values of the ret2 and ret3.
SCM driver is very small and simple and we would not expect
the Out of bound or use-after-free errors for it, so it would
be fine to skip it from the Kasan instrumentation.
Change-Id: I8b2a17759295375c21abc520110f855f349faf4b
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
If headphones is removed during 3-sec polling interval,
it is possible that hs_comp_result is zero while mechanical
switch level will be low. Currently driver reports microphone
insertion followed immediately by removal in this scenario.
These fake events cause audio to continue to play on speaker
even headphones is removed during playback.
Change-Id: Ibf559e207b3370cb2cec5149f8e794cb55ca27ac
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
G-Link uses queue concept per transport to handle the incoming commands.
Introduce the transport receive command lock to pass the commands in a
sequential manner.
CRs-Fixed: 945724
Change-Id: Id6e485bb1d3be360a996fd9ae6745b67bded08d1
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
During sound model de-registration, the message to be sent to CPE is
dynamically allocated but not freed. This causes memory leak in the
driver. Fix by adding kfree() to free the memory once the message
transfer is completed.
CRs-fixed: 933901
Change-Id: I02f25fc3457d530de436eb33da1709517b597e7b
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
The G-Link SSR driver currently does not specify a timeout for
requesting RX intents. If the remote processor is not responding, the
glink_tx() call for sending the SSR notification could wait forever for
an RX intent and block SSR processing for the entire system.
Introduce a 500ms timeout, and restart the remote processor in question
if an intent is not queued within that time. This unblocks SSR
processing in addition to resetting the remote processor.
Change-Id: I2b00afa4e9a1b81355eedcfd7cc786afb058bee7
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
During glink_tx(), G-Link can wait for an unlimited amount of time for
the remote side to queue an RX intent. In some cases, e.g. SSR, the wait
must be restricted to a short time, but in the current implementation,
glink_tx() can continue to block indefinitely.
Add a configurable timeout value to the G-Link channel context, which is
set in the channel open configuration. If the value is set to 0, treat
it as an infinite timeout. This allows a timeout to be put in place by
the client for sensitive cases such as SSR where a very limited amount of
time can be spent waiting for an intent.
Change-Id: I1e480fac286d285f871fe3059de7ae761fc4581e
Signed-off-by: Steven Cahail <scahail@codeaurora.org>
Invalid memory access during vbif debug bus
dump in log leads to crash. This adds null
check before accessing debug bus memory.
Change-Id: I54b74ce1004c4246398f18cd1a262e29a0a20d20
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
QMI timeout can happen if other processor doesn't respond within the
time expected by slimbus driver on apps. It has been noticed that QMI
call to power-on slimbus rarely takes more than 500msec. Timeout
is increased to allow that possibility. Additionally, QMI channel is
drained out of left-over messages and runtime-PM state check is
modified to allow graceful handling of timeout if at all any timeout
still happens.
Change-Id: I392a4fa761735135a261fb543815823cee5eba41
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Update the TDM device information for slot and channel mapping
configuration for MSM8996 device tree.
Change-Id: Ie893184acb1361c5dcf8a6ad7bf9eb7cdf5dbafd
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
Add automotive sound card for Agave and MMXF platform. Update the
TDM device information for slot and channel mapping configuration
for Dragonboard, Agave and MMXF platforms.
Change-Id: If41e6fad527897cf4f0ee164f606357466bbbd52
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
Add support for slot and channel configuration in CPU dai driver
for TDM devices. Remove the probing of slot and channel info from
device tree.
Change-Id: I9d65779b7ef70fac741569f0584b15db29093e0c
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
Rotator modules uses the buffer but does not set the
correct state. Configure the buffer state, alloc time,
free time, data planes to provide valid information
during debugging.
Change-Id: I7e0942699abfbd3a4be9c531a6174cdc917b22a4
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
We should be tracking current frame pattern rather than previous.
Change-Id: I08e7f5b355d13fe235a61dcd8242c77edf2cd305
Signed-off-by: Nagesh Subba Reddy <nageshsreddy@codeaurora.org>
There could be case where send frame is called before frame done
in these cases queue length could be more than 1. To fix this
issue timer used should be set without queue length check.
Change-Id: I2bf15efc36b3a5fb81b97903c323f0ff737eb56b
Signed-off-by: Shilpa Mamidi <shilpam@codeaurora.org>
Reset backlight before blank to prevent backlight from
enabling ahead of unblank. For some special cases like
adb shell stop/start.
Change-Id: I417b47f95ef804a156779cf696e6e610cff9f059
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
If control setup is not done and if userspace calls misr set
via metadata ioctl, then there can be a potential NULL pointer
deference as mixer might be NULL. Add a check to validate if
mixer is not NULL.
Change-Id: I92f5778788cfcce6fa01a038b4321222a8804f28
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Some of the functions that are supposed to be static are not declared to
be static. Cleanup the driver to make sure all functions specific to
this file are marked as static.
Change-Id: Ie2e0a7a1df5d49e8b6ed2af90b1a727e5c08746d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
When CPE services notifies the client that response to any message is
received, it is possible that the client may send another message even
before the CPE services cleared the current message response as these
both are run in different thread contexts, this will cause the command
queue to be corrupted. Fix this issue by clearing internal state of CPE
services command queue before notifying clients the clients the result
of message transfer completion.
CRs-fixed: 946375
Change-Id: I4b31201747edd7fdee57294ff559ccb21e582608
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Currently, it is possible there could be race condition when there are
multiple messages to be sent to CPE. Add changes to fix the possible
race conditions.
CRs-fixed: 946375
Change-Id: I6a290c00b08fa3afc64acf40cd339a0203f73d96
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Notify channel count to soundwire master so that
it can use broadcast command to configure the slave
devices whenever channel count is greater than 1.
Change-Id: I0cb80ebe84e6010f9ea54d73eacf0e8f2782b724
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Use soundwire broadcast command for configuration of all slave
devices simultaneously. This change improves latency during
slave devices configuration.
Change-Id: Ie2985e444e4aa1128856dc6ae372f8f4cca943de
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>