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>
The buffers memstore and dummyspace were being memset
before memory for them was allocated and mapped.
kgsl_cff_parse_ibs should record the write instead
of returning upon encoutering a hostaddr with no
physical addr.
Writes to GMEM were not being recorded. Adding
the mem syncs for that
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
Add the ioctl IOCTL_KGSL_CFF_USER_EVENT to write data to cff dump.
Define a new CFF packet cff_op_user_event for this generic user
event.
Write the surface parameter data packet and verify mem file
packet to cff dumps
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
This field of the chip_id was forced to 0 because userspace
got confused when it was a different value. Userspace has
been corrected to deal with the correct patch ids.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
These are changes to the cffdump output format.
MEMORY_BASE reports the address range we're using at the start
of the dump, which helps the postprocessors validate memory
writes.
HANG is emitted at the start of kgsl_postmortem_dump(), and can
be used by the postprocessors to stop when the hang occurs.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
This ioctl is needed to track memory writes done from userspace
so that this data is correctly captured in the dump.
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Changed variable "result" type from unsigned int to long
to accurately reflect the result of macro wait_event_interruptible_timeout
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
There may be multiple command submissions per-frame. Start your
busy count only on the first one.
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>