Commit Graph
8153 Commits
Author SHA1 Message Date
Linux Build Service Account a36a23e080 Merge "msm: kgsl: Make sure that a valid context exists before profiling" 2013-08-30 13:19:07 -07:00
Linux Build Service Account 4d380906b7 Merge "msm: kgsl: Do not wait for FT gate in fault tolerance state" 2013-08-29 15:36:49 -07:00
Linux Build Service Account bcc09e8ed3 Merge "msm: kgsl: Init FT log level in device init" 2013-08-29 04:49:44 -07:00
Linux Build Service Account 63128962cf Merge "msm: kgsl: Detect long IB per submission" 2013-08-29 04:48:40 -07:00
Linux Build Service Account e15228433b Merge "msm: kgsl: Implement the A3XX power-on shader workaround" 2013-08-29 04:43:24 -07:00
Jordan Crouse 2a99259c05 msm: kgsl: Make sure that a valid context exists before profiling
Don't enable the profiling IBs if a valid context isn't passed
to adreno_ringbuffer_addcmds.

CRs-fixed: 522827
Change-Id: Ic0dedbad504e3dee05de0a0a2f19d47c1b7f8b2a
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-08-28 16:17:53 -07:00
Tarun Karra 49ad8d62fb msm: kgsl: Do not wait for FT gate in fault tolerance state
When device start fails, device is in INIT state and FT is triggered.
In FT we trigger snapshot which waits on ft_gate when active count is
0 and device is not in active state. This causes a deadlock. This
change does not wait for FT gate in FT state and thereby prevents
the deadlock.

CRs-Fixed: 526206
Change-Id: Id9e0a7c3f3f9367d0b3cc17e45fbba4b42bebf64
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-28 14:45:38 -07:00
Tarun Karra 3abcbd61c9 msm: kgsl: Detect long IB per submission
Currently long IB is detected per GPU command, this mainly
detects infinate shaders, this policy is changed to trigger
long IB per submission. If any submission to GPU takes more
than 2 seconds of GPU time, trigger a long IB and mark the
context bad.

Change-Id: Ic6e9a677bd1e42444d38d2a859a58721345958f5
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-28 14:45:10 -07:00
Tarun Karra f44ef35948 msm: kgsl: Init FT log level in device init
Currenlty FT log level is init in debugfs init, debugfs
could be removed from commercial software and we might
miss FT logs, initializing FT log level in device init
prevents this.

Change-Id: If6ea02735dd250ecb7579cc0b485145dddb1b6d6
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-28 14:44:27 -07:00
Linux Build Service Account b555d94d7c Merge "msm: kgsl: Init log levels in device init" 2013-08-27 18:12:44 -07:00
Tarun Karra 9937d9def5 msm: kgsl: Init log levels in device init
Device log levels should be initialized during device initialization,
removing this from debugfs init because customer could disable
debugfs.

Change-Id: Ie1222be1d421405e0d7481c799045cb9876c2a91
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-21 14:12:21 -07:00
Jordan Crouse 5756b4e973 msm: kgsl: Implement the A3XX power-on shader workaround
On some targets (A330v2) the hardware is in a wonky state following
a power collapse. Send a special command buffer before the first
submission to put everything back in place.

Change-Id: Ic0dedbadb8e676677b9db95defd53f7bd3fba338
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-08-21 10:12:01 -06:00
Laura Abbott c2368fb3e6 gpu: ion: Ensure zeroed memory gets written to RAM
When zeroing buffers, we need to make sure the zeroed data actually
gets written back to RAM. Otherwise, it may be possible for a buffer
to be reallocated with data still needing to be written back to RAM.
This may lead to corruption from userspace allocators expecting zero'd
buffers and a potential leak of kernel data to user space. Considering
the mapping is short lived and we need to write back the data, use a
writecombine mapping to write the data directly to ram and avoid the
cost of flushing the cache. If the mapping is cached, invalidate the
kernel side mappings as well.

Change-Id: I26a49908bde411469f3b8f143a1581fb4e2c3b56
CRs-Fixed: 520044
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-08-20 17:43:10 -07:00
Linux Build Service Account 642c158357 Merge "msm: kgsl: Wake up gpu on kgsl_ioctl_timestamp_event only if necessary" 2013-08-20 07:15:22 -07:00
Tarun Karra aaf3155671 Revert "msm: kgsl: Add a command dispatcher to manage the ringbuffer"
This reverts commit a2e8ddc223.

Change-Id: I28f4be2d28528efa9d007abc5a36be1e92e2bad4
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 14:01:35 -07:00
Tarun Karra 6a90450ab6 Revert "msm: kgsl: Add the event callback symbol to GPU event tracepoints"
This reverts commit a63df3ef0b.

Change-Id: Ib677d43f7d6be159d4f43a7483f95143a627faa8
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 14:01:26 -07:00
Tarun Karra 0a722f3fa7 Revert "msm: kgsl: Add a ftrace event for adreno context switches"
This reverts commit 3373398612.

Change-Id: Ia70625a811bfc2a2919d77a5ee6619f19c2674fe
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 14:01:15 -07:00
Tarun Karra d0679d56c8 Revert "msm: kgsl: Implement KGSL fault tolerance policy in the dispatcher"
This reverts commit 246e37be56.

Change-Id: Ife8ac91e76165a55bc7e0296e33573133a2fe1d5
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 14:00:52 -07:00
Tarun Karra cc701bda54 Revert "msm: kgsl: Don't process events if the timestamp hasn't changed"
This reverts commit 3366075c1d.

Change-Id: I77c3d7a7be0c952b6a81efb385f15208b278087a
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 14:00:37 -07:00
Tarun Karra adb3563aba Revert "msm: kgsl: Add a new command submission API"
This reverts commit c177eb9e5d.

Change-Id: If33bd6c52ebf16d0402886f0a41c2a015ef69f8a
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 14:00:18 -07:00
Tarun Karra 946e9d1c9c Revert "msm: kgsl: add kgsl_sync_fence_waiter for server side sync"
This reverts commit 878a3c0d92.

Change-Id: Ib2271b8402336a7d6050649f5bfe9cb47008be5f
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 14:00:03 -07:00
Tarun Karra 2548080612 Revert "msm: kgsl: Add support for KGSL_CMD_SYNCPOINT_TYPE_FENCE"
This reverts commit e4a13f8ecc.

Change-Id: I1202782313439afac9ee625f695d2b7ba957d8d7
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 13:59:40 -07:00
Tarun Karra 759ad850cb Revert "msm: kgsl: Improve the dispatcher issuecmds loop"
This reverts commit 6c468fc6b4.

Change-Id: I0c213e96a5ac3a53ae93c3e2d930be657a701eb6
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 13:59:25 -07:00
Tarun Karra 4750f3a527 Revert "msm: kgsl: Check for idle in the fault detection timer"
This reverts commit d487861627.

Change-Id: I5f7ac5f83880dc5dbcfe4673343f45fdeed910a0
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 13:58:54 -07:00
Tarun Karra 5e8103f4da Revert "msm: kgsl: Try to run soft reset on all targets that support it"
This reverts commit 7fd4a7812b.

Change-Id: I5e132c42d29e79c3596058546845cb3ce528879c
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-08-16 13:58:31 -07:00
Vladimir Razgulin ddf14288be msm: kgsl: Wake up gpu on kgsl_ioctl_timestamp_event only if necessary
Any call of kgsl_ioctl_timestamp_event wakes up gpu. In some cases
(like retired timestamp) it's not necessary. Wake up gpu only if it's
necessary.

Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
Change-Id: I845faf6e9c6e4c9882a68489b64223919be3d21c
2013-08-06 09:17:46 -07:00
Linux Build Service Account e3e4754e25 Merge "msm: kgsl: Check for idle in the fault detection timer" 2013-08-01 16:11:18 -07:00
Linux Build Service Account 0ca921b158 Merge "msm: kgsl: Try to run soft reset on all targets that support it" 2013-08-01 16:10:48 -07:00
Jordan Crouse 7fd4a7812b msm: kgsl: Try to run soft reset on all targets that support it
Run soft reset on all targets that define a soft_reset function hook.
If the target defines jump table offsets then we can run through a
faster reset sequence, otherwise default to the slower full reset
path.  In any event, both these options are much faster than the
hard reset path that toggles the regulators.

Change-Id: Ic0dedbad4cbfdc083f16b026e133159814481886
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-08-01 10:43:34 -07:00
Jordan Crouse d487861627 msm: kgsl: Check for idle in the fault detection timer
Check for idle in the fault detection timer.  Don't report a fault
if the GPU is idle.

Change-Id: Ic0dedbad0a912b2d4b3cda9f545a9301290904d6
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-08-01 10:35:40 -07:00
Jordan Crouse 6c468fc6b4 msm: kgsl: Improve the dispatcher issuecmds loop
Instead of playing silly tricks to try to avoid going into an
infinite loop while processing pending contexts do the smart
thing and copy off the entire pending queue into a temporary
list.  That leaves the master list free to accept new and
requeued contexts and we can do evil things to our temporary
list.

Change-Id: Ic0dedbad365206031854fc95b5353184cabd40a1
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-08-01 10:32:43 -07:00
Linux Build Service Account 0265e2aa1a Merge "msm: kgsl: Add a ftrace event for adreno context switches" 2013-07-25 17:13:16 -07:00
Linux Build Service Account f87caf6a4f Merge "msm: kgsl: Add the event callback symbol to GPU event tracepoints" 2013-07-25 17:13:15 -07:00
Linux Build Service Account 27dd9157fb Merge "msm: kgsl: Add support for KGSL_CMD_SYNCPOINT_TYPE_FENCE" 2013-07-25 17:13:13 -07:00
Linux Build Service Account 7c4dc8ad19 Merge "msm: kgsl: add kgsl_sync_fence_waiter for server side sync" 2013-07-25 17:13:12 -07:00
Linux Build Service Account 976033dfe2 Merge "msm: kgsl: Add a new command submission API" 2013-07-25 17:13:11 -07:00
Linux Build Service Account 0a641f0a13 Merge "msm: kgsl: Don't process events if the timestamp hasn't changed" 2013-07-25 17:13:09 -07:00
Linux Build Service Account ebdea28635 Merge "msm: kgsl: Implement KGSL fault tolerance policy in the dispatcher" 2013-07-25 17:13:08 -07:00
Linux Build Service Account 957c7dfe1b Merge "msm: kgsl: Add a command dispatcher to manage the ringbuffer" 2013-07-24 00:03:27 -07:00
Linux Build Service Account 7ec75ed591 Merge "msm: kgsl: Print a message when tz_init fails" 2013-07-23 21:51:30 -07:00
Jordan Crouse 3373398612 msm: kgsl: Add a ftrace event for adreno context switches
It is useful to track context switches since they are expensive
and we would like to have as few as possible.

Change-Id: Ic0dedbad6befc84193b17851a9db4ff87e656cc7
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-07-23 17:54:40 -06:00
Jordan Crouse a63df3ef0b msm: kgsl: Add the event callback symbol to GPU event tracepoints
Print the callback function symbol name in GPU event register
and fire trace events.  This makes it easier to debug which event
is being registered/fired.

Change-Id: Ic0dedbad4be4e4179c820af6119786c57d12e13f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-07-23 17:54:39 -06:00
Jordan Crouse e4a13f8ecc msm: kgsl: Add support for KGSL_CMD_SYNCPOINT_TYPE_FENCE
Allow command batches to wait for external fence sync events.

Change-Id: Ic0dedbad3a211019e1cd3a3d62ab6a3e4d4eeb05
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-07-23 17:54:39 -06:00
Jordan Crouse 878a3c0d92 msm: kgsl: add kgsl_sync_fence_waiter for server side sync
For server side sync the KGSL kernel module needs to perform
an asynchronous wait for a fence object prior to issuing
subsequent commands.

Change-Id: I1ee614aa3af84afc4813f1e47007f741beb3bc92
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-07-23 17:54:38 -06:00
Jordan Crouse c177eb9e5d msm: kgsl: Add a new command submission API
Add an new ioctl entry point for submitting commands to the GPU
called IOCTL_KGSL_SUBMIT_COMMANDS.

As with IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS the user passes a list of
indirect buffers, flags and optionally a user specified timestamp. The
old way of passing a list of indirect buffers is no longer supported.

IOCTL_KGSL_SUBMIT_COMMANDS also allows the user to define a
list of sync points for the command. Sync points are dependencies
on events that need to be satisfied before the command will be issued
to the hardware.  Events are designed to be flexible.  To start with
the only events that are supported are GPU events for a given context/
timestamp pair.

Pending events are stored in a list in the command batch. As each event is
expired it is deleted from the list. The adreno dispatcher won't send the
command until the list is empty.  Sync points are not supported for Z180.

CRs-Fixed: 468770
Change-Id: Ic0dedbad5a5935f486acaeb033ae9a6010f82346
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-07-23 17:54:38 -06:00
Jordan Crouse 3366075c1d msm: kgsl: Don't process events if the timestamp hasn't changed
Keep track of the global timestamp every time the event code runs.
If the timestamp hasn't changed then we are caught up and we can
politely bow out.  This avoids the situation where multiple
interrupts queue the work queue multiple times:

   IRQ
     -> process events
   IRQ
   IRQ
     -> process events

The actual retired timestamp in the first work item might be well
ahead of the delivered interrupts. The event loop will end up
processing every event that has been retired by the hardware
at that point. If the work item gets re-queued by a subesquent
interrupt then we might have already addressed all the pending
timestamps.

Change-Id: Ic0dedbad79722654cb17e82b7149e93d3c3f86a0
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-07-23 17:54:37 -06:00
Jordan Crouse 246e37be56 msm: kgsl: Implement KGSL fault tolerance policy in the dispatcher
Implement the KGSL fault tolerance policy for faults in the dispatcher.
Replay (or skip) the inflight command batches as dictated by the policy,
iterating progressively through the various behaviors.

Change-Id: Ic0dedbade98cc3aa35b26813caf4265c74ccab56
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-07-23 17:54:37 -06:00
Jordan Crouse a2e8ddc223 msm: kgsl: Add a command dispatcher to manage the ringbuffer
Implements a centralized dispatcher for sending user commands
to the ringbuffer. Incoming commands are queued by context and
sent to the hardware on a round robin basis ensuring each context
a small burst of commands at a time.  Each command is tracked
throughout the pipeline giving the dispatcher better knowledge
of how the hardware is being used.  This will be the basis for
future per-context and cross context enhancements as priority
queuing and server-side syncronization.

Change-Id: Ic0dedbad49a43e8e6096d1362829c800266c2de3
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-07-23 08:43:18 -06:00
Linux Build Service Account 416f2a8f9b Merge "msm: kgsl: send ringbuffer NOP padding with the next command" 2013-07-23 02:09:06 -07:00
Linux Build Service Account 03dc7e1e5d Merge "ion: iommu: Add support for 2MB chunk allocation in IOMMU" 2013-07-23 00:27:51 -07:00