Hotplug (cpu_up) latency currently suffers because the system
must wait for kthreadd to spawn certain kthreads (such as the
migration and workqueue kthreads) and for them to run for
the first time. Setting SCHED_FIFO will cause kthreadd to run
immediately. The newly created kthreads will inherit the scheduler
policy and run immediately also.
The scheduling policy of newly created kthreads is already set
back to SCHED_NORMAL in kthread_create_on_node, so nothing needs
to be done to restore normal scheduling behavior for the kthreads
once spawned.
Change-Id: I236ceb29845cf58ea1ea886fc3210ccaab2dd792
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Sleeping for an entire tick adds unnecessary latency to
hotplugging a cpu (cpu_up).
Change-Id: Iab323a79f4048bc9101ecfd368e0f275827ed4ab
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Add CONFIG_DIAG_CHAR so that diag code will compile
and diag driver will be enabled.
Change-Id: Ib4c21aa5df2ce97ad30c25c0717c3b51e5c7c5b5
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
Add a interrupts-names property to allow the possibility to provide a name
to any interrupts entries. If the name is available, use it to name the
resource, otherwise keep the device full name.
Change-Id: If37ca9fd66061d2feceda37b0f2e66c9e0ae8683
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
[grant.likely: use "interrupt-names" and tidy documentation]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
[mbohan@codeaurora.org: resolve conflict in drivers/of/irq.c]
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Add a reg-names property to allow for reg regions to be reference by name
instead of by index. Some devices have multiple register regions which
are more naturally referenced by name.
If the name is available, use it to name the resource when creating a devices.
Otherwise keep the device name.
Change-Id: I1a33be9ae1a5ec757a352ba3bfa6d08f411d02d2
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
[Generalized documentation to be for any -names property]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Add of_property_read_string_index and of_property_count_strings
to retrieve one string inside a property that will contains
severals strings.
Change-Id: I15d374d13ee7711548e3626e49875b6ee8be0e1f
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kevin Hilman <khilman@ti.com>
[mbohan@codeaurora.org: resolve conflict in include/linux/of.h]
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
This has been configured in perf defconfig and is missing from non-perf.
It was inadvertently removed in b86c3477a8.
Change-Id: I43f657667e7a6a0bfd214bbb7912121a659a0729
Signed-off-by: Trevor Bourget <tbourget@codeaurora.org>
When returning to T-state from C-state, make sure that
qcache gets a "clean slate" with respect to allocation
from its corresponding fmem as well as for related counters.
CRs-Fixed: 344939
Change-Id: I5d340d564a1e37557858d3203eb192debfa3a309
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
This change stops the VFE first, before unmapping the buffers
registered in the kernel in the scenario of a mediaserver
crash.
Change-Id: I16c7c3b8dcd7a2f9c0ad98cf93cb1980c3a675fa
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Add a couple of fields to the msm_stats_buf structure
for cache coherence support on stats buffers from
user-space.
Change-Id: I3553fcf6359e4e748eb309d4a0a5979999d96f09
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Add a few logs that are useful for debugging. In addition, enabling
WFD_MSG_DBG unconditionally so that we can take advantage of dynamic
debug.
Change-Id: Id1b616aef1554f04b750207ee14b818e19319b6e
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
We should set the rate of a clock when handing it off. Otherwise
clk_get_rate() of a clock that was handed off will return 0 when
the clock is actually on and at some rate.
Change-Id: I2adbd895d2684d36ed414f452d5f8e4aa7492f57
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
When bam_dmux disconnects to the bam hardware in response to the A2
powering down, send an ack back to the A2 signaling that bam_dmux got
the powerdown signal and processed it.
This change optimizes the response time for back-to-back shutdown and
powerup sequences instead of requiring a hard coded delay in the A2 state
machine.
Change-Id: Ie1699abb060f0c0ecd144060ec62955da9439288
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
1. Free port if create thread fails
2. Check req->buf before accessing it
3. Change count variable type to match smd_write return type
CRs-Fixed: 342316
Change-Id: I55a268d105eb2066d67fc704d31905eaf29a26a4
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
The code for IOCTL_KGSL_DEVICE_REGREAD was removed long ago
but the header was never cleaned up.
Change-Id: Id3eaf0486fae133dfd72a56ea915f63fcb3f6bb1
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
If building on a tag we check to make sure the version in the
Makefile matches the tag we're building at. That would be a
string comparison and not an integer comparison. Change the test
accordingly. Right now we'll just see 3.0.8 or 3.0.8-dirty if the
kernel is built on a tag.
Similarly if we're synced to a tag we may have two references to
the same object, 1 in the local repo and one in the remote. Force
the show-ref to only look at tags so we only ever describe on
ref instead of two.
Change-Id: I694947b434db8f95d4c0b9f6e68702c65a1ee281
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
In many cases there isn't enough room in the snapshot region to
store all the IBs from the hanging context. Only store the
last IB1 to be executed (per the CP_IB1_BASE register) and any IB2s
within that IB1 - all other IBs in the hanging context are
marked as GPU objects. The downside to this approach is that after
a system crash, only the snapshot region can be assured to be recovered
from a RAM dump; the list of GPU objects might be skipped. This is
why the critical IBs go in the snapshot to ensure that no matter what
at least the last buffers to execute before the hang are recovered.
The upside is this reduces the pressure on the snapshot region size and
ensures that more of the state can be recovered under normal
circumstances.
Change-Id: Ic0dedbada7869c7f5cc03ed2ed58e996294c1e8c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
There are two ways to load shader instructions and constants -
direct (in the IB) and indirect (with a pointer to another
GPU buffer). Start dumping indirect shader buffers into the snapshot
so that complete shader information can be recreated at parse time.
Change-Id: Ic0dedbada6b0e6ba26d2bd57617976d16809129e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
In addition to the usual objects in a snapshot (registers, ringbuffer,
IBs, etc), there are a handful of indirect GPU buffer objects that are
created and used during draw operations. These include shaders, buffer
objects, and various state buffers. Taken together, these buffer
objects can be large, much larger then the snapshot region we have set
aside. Fortunately, these buffers are independent and don't need to be
freed or overwritten when the context is reset.
Long story short we can take these buffers, put them in a list at snapshot
time and mark them so they don't get freed. Then, when the snapshot is
grabbed dump them into the output stream inline and only then free them.
This allows us to snapshot a larger section of the GPU state without having
to worry about having enough memory set aside. The only downside is that
some GPU memory will stick around, but we hope that hangs are few and far
between and that some entity will grab the dump soon after the hang so the
memory can be released.
Change-Id: Ic0dedbad0629fa483b077e727d512877bbbf81d6
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Given a pagetable base and a GPU address, find the struct kgsl_mem_entry
that matches the object. Move this functionality out from inside another
function and promote it to top level so it can be used by upcoming
functionality.
Change-Id: Ic0dedbad965530a28c43bac36dda0535dcd1c95b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Previously, memory objects assumed that they remained attached to a
process until they are destroyed. In the past this was mostly true,
but worked by luck because a process could technically map the memory
and then close the file descriptor which would eventually explode. Now we
do the process related cleanup (MMU unmap, fixup statistics) when the
object is released from the process so the process can go away without
affecting the other holders of the mem object refcount.
Change-Id: Ic0dedbadde0db62b5f3eb02716d6bb8f65f2562d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Remove a block of code that dumped the ringbuffer contents after they
were extracted. The dump is no longer needed and the longer we
stick around dumping things to the console with the mutexes locked,
the better the chance that the watchdog will come bite us.
Change-Id: Ic0dedbadd22993f0f1646841f481cdc6713d38e8
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Don't BUG() if we can't find a valid context to recover to; just fail and
go into a zombie state. This usually happens after a first hang goes bad
and the system keeps hanging while trying to find its way. The problem with
a BUG() in this case is that the system goes down and we can't recover the
snapshot or other debug information.
Change-Id: Ic0dedbad424067ca67799487ee7a7de48a2f42b0
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Enable the ME split timeout status registers to provide useful
information for GPU hangs.
Change-Id: If110d49fc41f98ac4066f3f29c666c06b6908e99
Signed-off-by: Wei Zou <wzou@codeaurora.org>
Microsoft and Apple special HID drivers need to be enabled to
work with Apple & Microsoft Bluetooth HID devices.
Change-Id: Iea46aa0076569a8ba1a25af92e99520c891fa5c0
CRs-fixed: 338077
Signed-off-by: Prabhakaran Mc <prabhakaranmc@codeaurora.org>
Changes to support both ath6kl and WCN driver, as for ath6kl cfg80211
module is used from compat-wireless and loaded as a module.
Change-Id: I94f6f52df68a26e565e4742aedcfcf339ea06afb
Signed-off-by: Santosh Sajjan <ssajjan@codeaurora.org>
If both solid fill and flip mode are enabled, MDP underruns. So for
any pipe, if solid fill bit is set, flip operation modes including
left/right or/and up/done are disabled.
CRs-fixed: 334782
Change-Id: I879231d03c6aab6f82d80bde65c9f01c34f1fa6c
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
the gadget controller number is only used
during bind() to update descriptors and/or
check that a particular controller can support
a particular gadget driver.
Because of that, we can remove the ifdef
trickery as it's a rather small optimization
anyway.
While at that, also sort the entries
alphabetically and add a comment stating we
want to keep the list ordered alphabetically.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[esalman@codeaurora.org: fix conflicts]
Signed-off-by: Lena Salman <esalman@codeaurora.org>
Change-Id: Ia7d1922579912cf023dbd0cf20030ffadd74e350
There is a failure observed in yres_virtual offset check and every
third frame gets skipped without an error message. Due to this high
fps is noticed in the test applications. Correct the yres_virtual
offset check.
Change-Id: Iddce0b75e0a9c466adad6eb5726203ae0586c27b
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Driver to configure QDSP5 for Low Power Audio Playback.
Change-Id: I2a5a1b2bc9b975ece6e382409a33c77513bda0b8
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
Free hardware resources such as regulators
on shutdown so card will be in expected state
during soft reset such as adb reboot.
Change-Id: I2aab44de2c7cb20e09213decb29a3ac6b6441148
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
1) reset csiphy during init to make sure it is in known state
2) reset csid during init to make sure it is in known state
3) remove DBG_CSID flag to get the reset irq after csid_reset
Change-Id: I66b4da08b300a2e43655544cff4db64d9fbe5b19
Signed-off-by: Hody Hung <hhung@codeaurora.org>
1) Move csi lane params from kernel driver to board
file to support same kernel drivers for different
sensors with different csi parameters (in case of
3D, same kernel driver can support both sensors
with different csi configuration)
2) In msm sensor driver, extract lane assign and
lane mask from plaform info and store in sensor
control structure before passing to csi phy
3) Change csi phy config logic to configure mipi
lanes in any order using lane mask
Change-Id: Iba26640f28d957b17631c98286dba37b7774b42b
Signed-off-by: Hody Hung <hhung@codeaurora.org>
To maximize the amount of trace that can fit in the ETB, default
cycle accurate tracing to off for Krait pass2.
Leave cycle accurate tracing on for Krait pass1 since it doesn't
support non-cycle accurate tracing. Also default Krait pass1 to
trace everything i.e. exclude nothing since include filtering is
also not supported on Krait pass1.
Change-Id: I4c3c160ff35899896f410cdeb274870f6f3f135a
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Enable the include range filter by default to just trace kernel
code. This will ensure that non-kernel code doesn't fill up the ETB
buffer thereby increasing the amount of kernel code that ends up in
the ETB.
This also ensures TZ fiq handling for watchdog bark doesn't pollute
the ETB buffer and hence the trace can be used to debug watchdog
barks.
Also create a new reset node:
/sys/module/qdss/etm/reset
which can be used by the user to reset the programmable etm values
to their default state such that everything gets traced i.e.
nothing gets excluded.
To reset:
echo 1 > /sys/module/qdss/etm/reset
cat /sys/module/qdss/etm/reset will always show a value of 0x0 and
should not be interpreted to infer the reset state of the
programmable etm values. Instead perform a "cat" on the respective
etm nodes to see their values.
Change-Id: I64c83b05b384d939436303f1aec9e9335dd19ac5
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
To get the last waypoints out into the ETB buffer when disabling
trace, perform a manual flush when disabling ETB.
Change-Id: I3036913636fa657afb86938669e0959c186dbf68
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Make the qdss driver configurable via sysfs. Remove the previous
device node based interface that provided limited ETM configuration
options.
This makes ETM, Funnel and ETB highly configurable and extensible
for future configuration options.
Change-Id: Ib95b522dde443adde83483ee58a4dbb07ab0e311
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Initialize mutex earlier in etb_probe to allow for it to be
used by subsequent code if required. Make corresponding changes
to mutex destroy for the error path as well as etb_remove.
Change-Id: Iac3c4fe9ddb0f31d9a0faaca3f526e928e35f6cc
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
Reorganization of the code and general cleanup to make debugging
and code maintenance easier.
Change-Id: I9a9bd67d30fb9388982c7fb77c9b317fc2611e20
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
HW implementations for the ARM ETM specifications are referred to as ETM
(Embedded Trace Macrocell). Similarly HW implementations of the PFT
(Program Flow Trace) specifications are referred to as PTM (Program
Trace Macrocell).
Despite the above, ETM is a more popular name and commonly gets used to
refer to both ETM and PFT spec implementations. Moreover, PFT spec
register names use ETM as a qualifier.
Since it is possible, we will share the same driver for both PFT and ETM
spec implementations, just use the more familiar ETM as the name.
This change renames variables, strings, etc from PTM to ETM. This
completes the PTM to ETM renaming.
Change-Id: I95b6f041ef1988975ade534b5b503e23525db3a3
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>