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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>