Commit Graph
8320 Commits
Author SHA1 Message Date
Linux Build Service Account 82fb85efa5 Merge "msm: kgsl: When switching pagetable use current context ID" 2013-12-05 18:33:49 -08:00
Jordan Crouse 9496cb6f75 msm: kgsl: Re-enable performance counters
Commit b80b6c9daf accidently disabled all performance
counters which caused the fault tolerance to falsely trigger more
often.  Re-enable the performance counters and remove duplicate
code to enable the VBIF registers (they are enabled by the
a3xx_perfcounter_enable function).

CRs-fixed: 581430
Change-Id: Ic0dedbad277e796e6b2e7bd8e938cb8afe03207b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-12-04 09:38:49 -07:00
Jordan Crouse 3948e4acb5 msm: kgsl: Account for fixed perfcounter groups
Most performance counter groups have general purpose counters that
can be programmed to any number of countable types.  That said
some groups have counters with fixed countables.  When reserving those
groups the countable is equal to the register - so when you ask for
countable 0 in VBIF_PWR for example it is expected that will always
match to a certain register.  Add a flag member to the perfcounter
group and declare PWR and VBIF_PWR as fixed groups and handle them
accordingly in adreno_perfcounter_get() so that the correct register
is returned.

CRs-fixed: 582739
Change-Id: Ic0dedbad271c7472efce5f79e9055b7b3d224d17
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-12-04 09:38:39 -07:00
Shubhraprakash Das 02c25c1f8d msm: kgsl: When switching pagetable use current context ID
When we switch pagetables then the pagetable switch commands
should be executed on behalf of the currect active context and
not the context to which we are switching. This is because
until the pagetable switch occurs the GPU will be using the
pagetable of the active context.

CRs-fixed: 574989
Change-Id: I9ca65ea399e39a158dc72adc2c7b661f62f18c93
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-11-27 11:42:11 -08:00
Linux Build Service Account 285301b2da Merge "msm: kgsl: Release hang detect performance counters when not in use" 2013-11-24 20:17:04 -08:00
Linux Build Service Account 56b416c743 Merge "msm: kgsl: Add an input handler to power up the GPU on a touch event" 2013-11-24 20:17:03 -08:00
Linux Build Service Account bda4e8f973 Merge "msm: kgsl: Allow GPU start to run in a high priority queue" 2013-11-24 20:17:03 -08:00
Linux Build Service Account f3b78321f9 Merge "msm: kgsl: Get reference to process private when attaching mem entry" 2013-11-24 20:17:02 -08:00
Linux Build Service Account 598b6faaef Merge "msm: kgsl: Add TSE performance counter to software hang detection" 2013-11-24 20:17:01 -08:00
Linux Build Service Account fd45a6aeb4 Merge "msm: kgsl: Get CP_RPTR from register instead of shadow memory" 2013-11-24 20:17:01 -08:00
Linux Build Service Account 90c5862290 Merge "msm: kgsl: Protect against a potential overflow in kgsl_sg_alloc" 2013-11-24 20:17:00 -08:00
Linux Build Service Account 2e6e4928ab Merge "msm: kgsl: Advance the profiling shared buffer on error" 2013-11-24 16:17:15 -08:00
Linux Build Service Account c0674f0139 Merge "msm: kgsl: Save/restore performance counters across GPU power collapse" 2013-11-24 16:17:14 -08:00
Linux Build Service Account 13b0c7ec18 Merge "msm: kgsl: Allow run time control of bus modification" 2013-11-24 16:17:13 -08:00
Linux Build Service Account 4cf14b38a6 Merge "msm: kgsl: bus modifier computation" 2013-11-24 16:17:12 -08:00
Linux Build Service Account 89905e10b4 Merge "msm: kgsl: convert pwrscale to use bus_mod" 2013-11-23 16:37:52 -08:00
Linux Build Service Account fea730d77d Merge "msm: kgsl: make msm-adreno-tz the default governor for adreno" 2013-11-23 16:37:51 -08:00
Linux Build Service Account d4705e549f Merge "msm: kgsl: convert pwrscale framework to use devfreq" 2013-11-23 16:37:50 -08:00
Jordan Crouse cd5fcd8d14 msm: kgsl: Release hang detect performance counters when not in use
If hang detection is disabled via sysfs or ioctl() release the
performance counters that the hang detection uses so the counters
can be available to other consumers.

CRs-fixed: 533729
Change-Id: Ic0dedbad6998bbdab0f088a45c2bbf6e426e232d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-11-22 22:57:20 -07:00
Jordan Crouse 7663e51c43 msm: kgsl: Add an input handler to power up the GPU on a touch event
On a device where the primary input is a touchscreen nobody is
surprised that touch events are often the catalyst for drawing
frames. If the GPU is in slumber we can get a jump on the action
by watching for touch events and turning the GPU on in anticipation
of a draw call. Register for events from all input drivers
returning EV_ABS events and queue a work task to power up the GPU
if it is currently in slumber.

Change-Id: Ic0dedbadbdc96ef9ddd78252ea65f8e1cdd00110
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-11-22 22:57:20 -07:00
Jordan Crouse 1c400d4afe msm: kgsl: Allow GPU start to run in a high priority queue
The GPU start sequence needs to run with low latency when coming
out of slumber for the first draw command. For those cases allow the
start function to be queued into a high priority workqueue to reduce
the chance of it getting scheduled out.

Change-Id: Ic0dedbada7ef4d63b54e826862fbefdfb71a092a
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-11-22 22:57:19 -07:00
Shubhraprakash Das 0bdff15e0d msm: kgsl: Get reference to process private when attaching mem entry
When a memory entry is attached with to a process private list then
increment the refcount of the process private structure so that the
structure is valid as long as the entry is around. The context
structure is also handled in similar manner. Also, the refcount to
the entry needs to be decremented when the handle that created the
entry goes away and not when the process private structure is
destroyed.

Conflicts:
        drivers/gpu/msm/kgsl.c

Change-Id: I225698ad4081947a93eb553104e5259bbf31f293
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
2013-11-22 22:57:19 -07:00
Tarun Karra 6bc697f00c msm: kgsl: Add TSE performance counter to software hang detection
Our current hang detection logic covers rendering pass by checking for
shader performance counters but it does not cover the case where there
is long binning or resolve pass. For long binning pass shader is inactive
making our current hang detection logic faulty. Checking for TSE number of
input primitives covers binning and resolve passes and makes our hang
detection logic robust.

CRs-fixed: 521284
Change-Id: Ifdec4b53685903456feb367f64380119b1485408
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-11-22 22:57:19 -07:00
Tarun Karra 7aa287bedd msm: kgsl: Get CP_RPTR from register instead of shadow memory
Sometimes the RPTR shadow memory is unreliable causing timeouts
in adreno_idle().  Read it directly from the register instead.

Change-Id: Icae7521edd9723610c41f320c6a5c99f57bec7f5
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
2013-11-22 22:57:18 -07:00
Jordan Crouse 91af675fbf msm: kgsl: Protect against a potential overflow in kgsl_sg_alloc
Avoid allocating a scatterlist so large that it overflows the size
passed to the memory allocators.

CRs-fixed: 564448
Change-Id: Ic0dedbad2ab421ddec8f3be38d61c9bdf9ae5bd4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-11-22 22:57:18 -07:00
Jordan Crouse a40b37b77a msm: kgsl: Advance the profiling shared buffer on error
If there is an error in the per-command profiling shared buffer
(e.g. an offset is incorrect) advance the shared buffer tail
anyway.  Otherwise the parser will just get stuck parsing the
bad result forever.

CRs-fixed: 536983
Change-Id: Ic0dedbade2d0a92ffb03e87fa73bb566bf5f1640
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2013-11-22 22:57:17 -07:00
Harshdeep Dhatt 5e5dca6cdb msm: kgsl: Save/restore performance counters across GPU power collapse
Physical performance counters are reset on GPU power collapse.
Save the values of the performance counters when the GPU goes to
power collapse and restore them on restart.

Change-Id: I63bec7b20e7fe516bbac4901cac0af3a1c1f4959
Signed-off-by: Harshdeep Dhatt <hdhatt@codeaurora.org>
2013-11-22 22:57:17 -07:00
Lucille Sylvester 9a2a78496d msm: kgsl: Allow run time control of bus modification
Add a "bus_split" variable to sysfs.  When it is set to 1 the
bus calculation will run normally.  When set to 0 the default
but vote will be used for each GPU frequency.

Change-Id: I4e4e656664be06669d53fb5765a89943679004f2
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2013-11-22 21:42:05 -08:00
Lucille Sylvester b80b6c9daf msm: kgsl: bus modifier computation
Use the vbif performance counter which counts bus busy cycles
to determine the requested bus bandwidth vote at a given
GPU frequency.

Change-Id: I18915ef8a2be75a7ef5795a6030a1f2ddd09a967
CRs-fixed: 551893
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2013-11-22 22:38:45 -07:00
Lucille Sylvester f036ae17dc msm: kgsl: convert pwrscale to use bus_mod
Use a bus specific speed flag rather than overloading
the least upper bound flag.

Change-Id: I343726e6e0d9885f39c343ed56c1667ab2008aee
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2013-11-22 22:06:13 -07:00
Jeremy Gebben a13a5caeaf msm: kgsl: make msm-adreno-tz the default governor for adreno
On targets where trustzone is available, use the trustzone
based governor instead of simple_ondemand.

Change-Id: Ie11c57684fc63a26e82a5c4816a35a327a1bf945
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
2013-11-22 22:02:09 -07:00
Jeremy Gebben f84c799de3 msm: kgsl: convert pwrscale framework to use devfreq
Convert the clock frequency scaling infrastructure to
be based on devfreq.

Change-Id: I1a60ba339db5715a8836b835bd1b29b46e151af6
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
2013-11-22 22:00:32 -07:00
Linux Build Service Account f5af2ae0fa Merge "gpu: ion: add locking to traversal of volatile rb tree" 2013-11-21 23:17:33 -08:00
Linux Build Service Account d65fa01f2d Merge "gpu: ion: fix locking issues in debug code" 2013-11-21 23:17:32 -08:00
Linux Build Service Account 6fb772c6d6 Merge "gpu: ion: use a list instead of a tree for heap debug memory map" 2013-11-21 23:17:31 -08:00
Linux Build Service Account b6c4460938 Merge "gpu: ion: system_heap: invalidate cache on cached pool allocations" 2013-11-21 23:17:30 -08:00
Linux Build Service Account bc7d6a286d Merge "gpu: ion: kmalloc_heap: flush cpu caches at allocation time" 2013-11-21 23:17:29 -08:00
Linux Build Service Account 236ae350a0 Merge "gpu: ion: fix zero'ing of cached buffers in system heap" 2013-11-21 23:17:28 -08:00
Linux Build Service Account c9bdc68318 Merge "gpu: ion: Support probe deferal for client creation" 2013-11-21 23:17:27 -08:00
Linux Build Service Account c8d1d3c3c3 Merge "gpu: ion: remove IOMMU Heap" 2013-11-21 23:17:26 -08:00
Linux Build Service Account 78f411ac0c Merge "gpu: ion: make sure all clients are exposed in debugfs" 2013-11-21 23:17:25 -08:00
Linux Build Service Account e2e637a247 Merge "gpu: ion: Add support for specifying heap type in the device tree" 2013-11-21 23:17:24 -08:00
Linux Build Service Account 4d65614321 Merge "gpu: ion: add page pooling to cached allocations from the system heap" 2013-11-21 23:17:23 -08:00
Linux Build Service Account 334b73ad19 Merge "gpu: ion: optimize zero'ing of pages" 2013-11-21 23:17:22 -08:00
Linux Build Service Account ae735c6c15 Merge "gpu: ion: don't use "vmalloc" for system heap readable name" 2013-11-21 23:17:21 -08:00
Linux Build Service Account 53bebc72a8 Merge "gpu: ion: create separate heap and client debugfs directories" 2013-11-21 23:17:20 -08:00
Linux Build Service Account 53701b0302 Merge "gpu: ion: Add buffer flag to skip page pooling on free" 2013-11-21 23:17:19 -08:00
Linux Build Service Account f8b1b99036 Merge "gpu: ion: Also shrink memory cached in the deferred free list" 2013-11-21 23:17:18 -08:00
Mitchel Humpherys c1e36d064e gpu: ion: add locking to traversal of volatile rb tree
In ion_debug_heap_show we're iterating over an rb tree (dev->clients)
that could change while we're iterating. Fix this by taking the lock
that is used to control access to this tree.

CRs-Fixed: 571918
Change-Id: I6832e1e98e2d2a69fc653451d3752d43ec3ef269
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-11-19 14:01:22 -08:00
Mitchel Humpherys 864a3bc112 gpu: ion: fix locking issues in debug code
There are a few places in Ion where we are iterating over volatile rb
trees without proper locking. In some places the proper locking cannot
be added since it would require us to take locks in a different order
than they are taken in other places in Ion. Fix this by re-working some
of the debug code so that we can take locks in an allowed order.

One side-effect of the re-work is that the memory maps will now show
every client that has a handle to a particular region of memory, rather
than just showing the first one that we encounter. This will allow for
more accurate accounting and will give better insight as to who is
actually using the memory.

CRs-Fixed: 571918
Change-Id: Ia43e4dbc412cd480c828173f8c20b5095d87d858
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2013-11-19 14:01:22 -08:00