Create and use scatter-gather lists for memory objects, which
avoids dynamically figuring the physical addresses of pages for
MMU mapping and cache operations.
Change-Id: Ic0dedbad9b973ecce4ae773b6bd682ba01010e5b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Force the dump of IB1, and IB2 in postmortem even if their sizes
in the registers are 0. Also, make sure that the ringbuffer size
is correct and print 100 dwords of ringbuffer history instead
of 64
Change-Id: Icbbef62cafc59338c979a34d1590362f7c1d5de0
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Gather more stats data for the analyzing daemons.
Change-Id: I9ffcfc76c0bd5f27ebf50d3f97e169662697fd12
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
This change saves leakage current when the display is
off. In scenerios where a user is listening to an mp3
this feature stops the GPU as soon as the display goes
off. The GPU is started again when the display comes
back. The feature also avoids the GPU resuming when a
email sync happens while the device is suspended.
Change-Id: I6f42aefec72848fc49cf4c71433d95a01fa3094d
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Currently, the ion allocation API takes an alignment
argument. This alignment argument is currently ignored
everywhere. The system heaps cannot support the alignment
argument, but carveout heaps can. Add support for carveout
heaps to give back aligned memory.
Change-Id: Ic4cff37a7de51e1c85e273c2589958f7f13c33c9
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
The call to turn on the 2d irq from z180_start() would have
no effect because it was using the wrong flag. The offending flags,
which should only be used from within kgsl_pwrctrl.c for setting bits
in struct kgsl_pwrctrl.power_flags are also moved to the .c file
to avoid problems like this in the future.
Change-Id: Ied48c5f3b4860d55b2c0b7019ba50ed22d7f6bc1
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Add a work item to be triggered following a RB complete interrupt
signifying that a timestamp has been processed and retired on
the GPU. To kick things off, this work item is the the new home
for flushing expired memory objects allowing us to get rid of
kgsl_memqueue_drain and its various offspring.
Change-Id: Ic0dedbad853291ae5d05247241f449a7b523e318
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
There are times when the adreno device is heavily loaded. Here, a
predetermined wait timeout value will not be useful. The configurability
introduced with this change will help in understanding the behaviour and
to tune the value. Will also be helpful in quickly identifying problems
that arise when the irqs don't fire.
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
This reverts commit 8ad6fed70fbd18f4a061be2b3d749d3692dd7f86.
This is no longer needed now that workaround firmware for
8960v2 is available.
Change-Id: I212b7a7e4ef086b25d01d546df63a64505d8d374
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
The WPTR drop prevention workaround added earlier is seen to cause
vague GPU hangs while running 3DMM06 app. So removing it.
CRs-Fixed: 309787
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
kgsl now supports the use of 2 types of MMU. One is
the GPU's internal MMU and the other is IOMMU. Both
MMU cannot be active at the same time. The MMU type
can be selected at compile time via config option.
A boot command line parameter can be used to override
the type of MMU selected at compile time.
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Ion needs to be initialized before most other subsystems.
Move the call to be earlier to ensure drivers that need to
allocate memory at bootup can.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Ion uses the O_DSYNC flag of a file to indicate an uncached mapping.
When generating a file for mmaping, the new file needs to have the
same O_DSYNC flag as the parent (the file of the ioctl open call)
to indicate if the mapping should be cached or uncached.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
When the cached flag is set, ioremap_cached should be called.
When the cache flag is not set, ioremap should be called.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
In use cases with very high graphics for some time followed by
low constant usage, the power level is never dropped. Periodically
allow the TZ algorithm to run to see if any change in the external
conditions has occured.
CRs-fixed: 309131
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
In some situations, the same block of memory is
mapped multiple times. Properly refcount that mapping
otherwise we could get into a situation where the mem
entry is completely dereferenced before its time.
CRs-fixed: 306942
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
If the GPU is running as slowly as possible, it is adding
lots of io busy to the CPU. This causes the CPU ondemand
algorithm to unneccessarily increase CPU frequency.
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Actually vote for AXI rate. If gpuclk sysfs file is changed
during device sleep, the previous AXI rate was retained instead
of the new AXI rate.
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Distinguish between similar clocks on different cores using the
device struct passed to clk_get(). This allows for a common
clock naming convention that spans across targets.
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
kgsl_get_phys_file is used for both PMEM and the framebuffer,
so adjust the #ifdef CONFIG_ANDROID_PMEM to only omit the
PMEM specific parts.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
There was a possiblity that a variable would be dereferenced
in a loop, so use a temporary holder to avoid any corner
case problems.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Fix a bug in the interaction between NAP and GPU DCVS. Without
this change the clock freq recommended by DCVS might or might
not have been used. Power levels should be stabilized for test
cases now.
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
The workaround added to prevent the writes to ringbuffer WPTR from being
dropped does not work on a22x GPU. So, restrict this workaround only for
a20x GPU.
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
Sometimes, the writes to ringbuffer WPTR register are dropped. This will
make the GPU to go to idle before completing all the commands that it is
submitted with. This workaround prevents the writes from being dropped.
CRs-Fixed: 302173
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
Add explicit support for cached and uncached mappings. Functions
now describe whether mappings will be cached or uncached.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Add a pwrscale policy to transmit idle statistics
to userspace via the MSM idle_stats_device core.
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Add infrastructure for supporting ion carveout heaps.
The memory type should be specified in the board file using
mach/ion.h. The ion platform driver will be responsible for
allocating the correct memory.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>