Replay the all the commands that have not been executed by the GPU
in recovery with preamble turned on for the first command to see
if that succeeds. If it does then we have recovered all contexts.
If that fails then replay commands only from contexts that are
in a good state.
Change-Id: Ia2a5c9b0de5556c5182cfab3bd6ae576d15b53eb
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Expire the global timestamp and timestamps of contexts that have
cause at the end of recovery. This will prevent any users waiting
on timestamps of hung contexts to return without waiting.
Change-Id: I373de7211edd09646cdb0fb11d67b562a1ab2966
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Mark the context that has caused a hang in recovery before
calling the extraction function. This updates the context
state correctly early in recovery.
Change-Id: I68cbe5cc6f867c8d32dd0115eed6f1c65c54f796
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Write a separate function that sets the reset status of each
context after recovery.
Change-Id: I0fbd6578625637373beb9a565024043ece186e6d
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
We do not have to restore the per context timestamp states during
recovery as this data is irrelevant after recovery.
Change-Id: I3f0350afda4b4ecbdd60027720b7e4832adf04a3
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Turn on the preamble of the IB sequence in which hang is assumed
to have happened so that the bad sequence can be replayed.
Change-Id: I7123f6b5152a530c38999d6ef4aa5476d64960a7
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Make the code more readable by writing a separate function to
detect the end of last command that is assumed to be successfully
executed by the GPU
Change-Id: Icab1f4e563ea533c48aba9c57afb548501e19552
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Create a separate function that extracts valid commands from good
contexts and invalid commands from bad contexts during recovery
Change-Id: Icffe34821c1b70ca1a8c1a8e13a0b7e23d0ec193
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Add vendor specific controls to get and set the profile and
level of H263 clips.
Change-Id: I79e6eeb8eb2eb4ff3f5cbbe3b537e7b60ff1372a
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Use the data set in the recovery structure when extracting
valid commands from the ringbuffer instead of reading
it from the device/memory.
Change-Id: I9cbcc09b1ce95313c2d3cf59fbb649dad2cb9d99
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Create a new data structure that holds all the information required
for recovering from hangs. This data structure is initialized as soon
as hang is detected because if the GPU is under DOS attack then by
the time we start recovery the recovery data may have changed.
Change-Id: I862787267c582b9ca95bb191fb3503ceba1faa8c
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Add command sequence start identifier for commands submitted from
kgsl as well since this will be used during recovery. We will just
try recovery and not try to differentiate between commands from
kgsl or from user space.
Change-Id: I433e9f2786268c6c51a446e3c7cf9eb5fd429197
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
When performing postmortem, check for IOMMU pagetable change commands
which will allow us to find the IB from the correct pagetable.
Change-Id: I411f4c78632d1673d49d5557da435e2a9d31d420
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Start the sleep timer if recovery from hang is successful.
This prevents GPU from entering low power states during
recovery.
Change-Id: Icb021f1b1bfae7876394fa572acd156115372ac3
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
For MSM8974, communication to RPM is done through SMD.
For this new RPM-SMD driver APIs were introduced.
This patch enables bus driver to commit arbitration
data to RPM using the RPM-SMD APIs.
To maintain backward compatibility, the old RPM
communication file contains a stub for remote-init.
Change-Id: Ie32cec94b557c2d3b04be96a604e31c515817a54
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
Adding MHL api's for device discovery and registering
callback mechanism.USB driver use these API's for
synchronization with MHL driver.
Change-Id: I0846951302e3b5f5d20d566c92c2f224528ca455
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
Add APIs for checking whether the current CPU is Krait and
Krait Pass 2.
Change-Id: I5b28e8ae76b2df64675a6808092d792833931544
Signed-off-by: Jin Hong <jinh@codeaurora.org>
usb_wwan driver continues pushing rx data buffer to tty node
even if it is removed during device disconnect. This may cause
watchdog bark as driver unnecessarily loops through the list of
rx buffers and tries to push it to tty layer while holding
spin lock with interrupts disabled.
CRs-Fixed: 377066
Change-Id: I5569a4948aba89fd1d0d8ea5e8910ce2e0c8e917
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Add support in the rpm-regulator-smd driver for the "bypa"
bypass mode disallow parameter. This parameter can be used to
instruct the RPM that a given LDO should never be put into
bypass mode because its load is sensitive to voltage supply
noise.
Change-Id: I34fdcdb88107f94b78f2ace4a0512fe4ca94779c
Signed-off-by: David Collins <collinsd@codeaurora.org>
Increase the regulator-max-microvolt values for pm8841_s2_corner
and pm8841_s2_corner_ao to match the updated super turbo corner
value.
Corner values have been remapped inside of the RPM. This has
resulted in the super turbo corner value changing from 6 to 7.
Therefore, set the value of regulator-max-microvolt to the new
super turbo corner value.
Change-Id: I951384c2549acdd15b1d84febf663f3d24dc27e1
Signed-off-by: David Collins <collinsd@codeaurora.org>
Update the voltage corner mapping used by the rpm-regulator-smd
driver to match what is being used inside of the RPM.
In particular, an explicit "none" corner value has been inserted
with value 0 which pushes all of the other corners up by 1.
Change-Id: I34b4285f88e7e9d23d7accf4ccbf9cebff591754
Signed-off-by: David Collins <collinsd@codeaurora.org>
Several flattened device tree functions are currently accessed in a
file that is compiled regardless of whether device tree is enabled
or not. Add stubs for these functions if device tree is not selected.
Change-Id: I0bea3325692fac46d3e5ef457aa30e083f71cd6d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Document the appropriate bindings so the register trace buffer (RTB)
can be used on targets that support device tree.
Change-Id: Iafd2cbca20489fb27ada0b982e012ee74f7b07c1
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
To get large contiguous memory allocations, a dedicated carved out
memory pool is created. The size of this pool is determined by the
sizes declared by devices. Add size bindings so drivers can increase
the size needed for reservations. Also add bindings to allow drivers
to reserve memory with memblock_reserve to reserve specific memory
regions.
Change-Id: Icc51aef5069a7964c03c5c52f24e40b96f4b2781
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Adds support for the new firmware version by incorporating
the interface changes between driver and video firmware.
These changes make the driver compatible to new firmware
version.
FW_VERSION: 100100
Change-Id: I04e9457ac8a85a070f2e4c738ad3e4fc9cbfbaeb
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
The power-on (PON) peripheral is connected via the SPMI
at the address 0x800 of PM8941. It supports the power-key
detection and other power-on features.
Change-Id: I1b4491198a2b3fd64c8a74d6fecf796c1416f0c6
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
The power-on module of the PMIC provides support for
power-key, reset and power on/off reasons and other
power-on related functionality.
The driver currently supports only the power-key detection.
Change-Id: If7d42ce38fba6e9a590d0953daadcd43ab746112
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
Sometimes a stat interrupt arrives just before the next SOF,
such that the VFE bundles the two interrupts together into one.
In such a scenario, the frame id sent along with the stat interrupt
message will incorrectly carry the farme number for the next frame.
This change checks for such occurences and adjusts the frame
id accordingly.
Change-Id: I9914c428baf74cab81aade62843b9043f20108f9
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Add support for controlling pcm audio volume in DSP through
Multimedia5. Add TLV mixer control to set the pcm stream volume
Change-Id: Ie5f50c4f47ea57fe4be0aef1320c79a9d3fe7600
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
The LPASS CC has an additional PCM Out Enable clock
that needs to be controlled by the audio drivers. Add
support for this clock.
Change-Id: I23464a7c3c87546630abb0527b65d6f83db4efff
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Closing VCAP devices could be called without calling stream off:
This problem would make VCAP resources taken by devices no longer
running.
Using unsigned variable to store signed result: This problem would
allow stream on to continue even when function returned error.
Fix problem of reading VP irq status register too early: It was
possible for cadence detection bit to be propgated faster by only
a few clock cycles then the picture done bit. When the irq status
read was performed and by the time a write to the clear register
was performed the picture done bit would propgate. Since the irq
is rising edge triggered this would cause a problem and the irq
would not be triggered until VP was reset.
Remove unused code
Change-Id: Iba72354c06287efb27178edf64d8d3f459dbf954
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Currently, there is no support for histogram on MPQ 8064. Add
support for histogram ioctls to support histogram testing.
CRs-fixed: 375580
Change-Id: I24ccf73c6ea6d230da4624ea196cba2d8195f8b2
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
When subsystem restart of the modem is triggered, the SSR handling function
disables the disconnect ack feature. Later, when the modem reboots, it
expects the disconnect ack feature to be enabled by default as it was when
the modem first booted. This causes a problem when the modem times out
waiting for the disconnect ack and asserts.
Fix the issue by changing the SSR code in bam_dmux to reenable the
disconnect ack feature instead of disabling it.
CRs-Fixed: 377493
Change-Id: Ibd6ee7770c3ad57fabcf239b0175f2002ca45268
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
Audio is not routed to TV after deep sleep and resume.
Userspace is dependent on switch device to indentify audio
route. When HDMI is turned on, this switch needs to be turned
on as well.
CRs-Fixed: 377159
Change-Id: I7faaad5ff772ad2045876cc084aa71d120b77139
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
An ASYNC interrupt is an indication by hardware that some
activity has happended on USB lines in LPM (low power mode),
and USB software should now bring it out of LPM.
Ideally, hardware should give one more interrupt after coming
out of LPM so that USB driver can process that accordingly.
But, sometimes this interrupt is not generated from h/w for
remote wakeup event in host mode. Hence, resume root hub on
receiving the ASYNC interrupt from hardware in Host mode.
CRs-Fixed: 369298
CRs-Fixed: 368948
Change-Id: Ifb166c1f3c749ab8c615308ab52d85ccdc666733
Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org>
Core is returning improper header information for H264 128kbps,
level-1b and baseline profile settings. Forcing the setting to
constrained baseline profile for normal baseline profile as
per the updated interface specification resolves the issue.
Change-Id: Ib106b17be9453cfd80264cc2167dda919893b1e2
CRs-Fixed: 371606
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
Running one program that continuously hotplugs and replugs a cpu
concurrently with another program that continuously writes to the
scaling_set_speed node eventually deadlocks with:
=============================================
[ INFO: possible recursive locking detected ]
3.4.0 #37 Tainted: G W
---------------------------------------------
filemonkey/122 is trying to acquire lock:
(s_active#13){++++.+}, at: [<c01a3d28>] sysfs_remove_dir+0x9c/0xb4
but task is already holding lock:
(s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(s_active#13);
lock(s_active#13);
*** DEADLOCK ***
May be due to missing lock nesting notation
2 locks held by filemonkey/122:
#0: (&buffer->mutex){+.+.+.}, at: [<c01a2230>] sysfs_write_file+0x28/0x140
#1: (s_active#13){++++.+}, at: [<c01a22f0>] sysfs_write_file+0xe8/0x140
stack backtrace:
[<c0014fcc>] (unwind_backtrace+0x0/0x120) from [<c00ca600>] (validate_chain+0x6f8/0x1054)
[<c00ca600>] (validate_chain+0x6f8/0x1054) from [<c00cb778>] (__lock_acquire+0x81c/0x8d8)
[<c00cb778>] (__lock_acquire+0x81c/0x8d8) from [<c00cb9c0>] (lock_acquire+0x18c/0x1e8)
[<c00cb9c0>] (lock_acquire+0x18c/0x1e8) from [<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180)
[<c01a3ba8>] (sysfs_addrm_finish+0xd0/0x180) from [<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4)
[<c01a3d28>] (sysfs_remove_dir+0x9c/0xb4) from [<c02d0e5c>] (kobject_del+0x10/0x38)
[<c02d0e5c>] (kobject_del+0x10/0x38) from [<c02d0f74>] (kobject_release+0xf0/0x194)
[<c02d0f74>] (kobject_release+0xf0/0x194) from [<c0565a98>] (cpufreq_cpu_put+0xc/0x24)
[<c0565a98>] (cpufreq_cpu_put+0xc/0x24) from [<c05683f0>] (store+0x6c/0x74)
[<c05683f0>] (store+0x6c/0x74) from [<c01a2314>] (sysfs_write_file+0x10c/0x140)
[<c01a2314>] (sysfs_write_file+0x10c/0x140) from [<c014af44>] (vfs_write+0xb0/0x128)
[<c014af44>] (vfs_write+0xb0/0x128) from [<c014b06c>] (sys_write+0x3c/0x68)
[<c014b06c>] (sys_write+0x3c/0x68) from [<c000e0e0>] (ret_fast_syscall+0x0/0x3c)
This is because store() in cpufreq.c indirectly grabs a kobject
with kobject_get() and is the last one to call kobject_put()
indirectly via cpufreq_cpu_put().
Fix this deadlock by introducing two new functions,
cpufreq_cpu_get_sysfs() and cpufreq_cpu_put_sysfs() which do the
same thing as cpufreq_cpu_{get,put}() but don't grab the kobject.
CRs-fixed: 366560
Change-Id: I23ea50a01793b2b2af0972cde52dba7396925fe3
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Adds support to set individual properties to Venus by
calling controls separately.
Change-Id: I4af3176ee009f202e62d566de3ce859b6a8d36c2
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
These configs are needed to support multicast on networks
with colliding subnet.
Change-Id: I395cb7527da1867d439f8e9e0a5d944acc55699e
Signed-off-by: Smita Ghosh <smitag@codeaurora.org>
Remove unneeded idle commands from the command stream when updating
pagetables and doing TLB flushes. Ths cuts down on the number of
commands in the ringbuffer during switches.
Change-Id: Ic0dedbad7a0d64c39518b2dd2bb6322f4ab74ba0
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Incorrect HMAC values are generated in following scenarios.
- In case of a single transfer with a packet shorter than the
block size, the HMAC generated is incorrect. This is due to
the "FIRST" bit in AUTH_CFG register not being set. When calling
HMAC_final for a transfer with a single packet (with no prior HMAC
updates), the "FIRST" and "LAST" bit in AUTH_CFG register needs to
be set. Currently FIRST bit is being cleared incorrectly for all
scenarios.
- In a scenario of a mac key input larger than block size, the key
needs to be hashed. The key hashing operation is crashing. This is
due to a NULL, unintialized pointer to the device handle. This is
fixed by intializing the pointer correctly. Further more, key size
is uninitialized, resulting in corruption of buffer.
Change-Id: Iec736f2130e509fcaf631a2c71c5483514666617
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Enable support for tricolor leds on 8x25 platform
Change-Id: If0a91962d286b054f88a36ebb672f0a2cdf39e71
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add support for red and green leds through tricolor
led driver
Change-Id: I337d5f220be326f4417d714fcfd7eeabca683854
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Add support for tricolor leds on Qualcomm's MSM
boards.
Change-Id: Ib05d6129f98cf67e7d208465a13cc6b1300c6277
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Buffer holding video from demux goes to dvb/video which
accesses the data in SW without sending it to HW units,
the buffer can be allocated as cached to improve performance.
Change-Id: I7795f901057c219198d02f340f65e81a2839edfb
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
user-space programs using demux require to be notified
on several kinds of events such new PES event,
new section event, new recording-chunk event and
other error events. demux API was extended to meet
this requirement
Change-Id: I768b6acde346139e194a3e6637b6fc0fc9648446
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Data should be read from the buffer according to the size
requested from the user or the actual amount of data
available, whichever is smaller
Change-Id: I81e6a2c538644417caeba9c19060f58810c1fdc3
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
On 8x25 EVB, during stress testing of suspend/resume, sometimes the
backlight doesn't come up. Fine tune the delay values used to program
the backlight IC into 1-wire mode so that the IC enters 1-wire mode
properly everytime.
Change-Id: I073f0101ddc057a1f3f59028ae171976a6965d15
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
If the vote for pm runtime is done while codec shutdown, it is possible
that the runtime pm vote occurs even before the slimbus port for tx/rx
audio channel is disconnected. This can cause problem in audio playback/
record. Fix by moving the vote for runtime pm after slimbus port has
been disconnected
Change-Id: I959a83be7bc381e80dfc0176c50cb60e59ce227b
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
Signed-off-by: Patrick Lai <plai@codeaurora.org>