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>
kgsl_open does a fine job of setting the private members of
struct file so use that in the other fops functions rather then
looking up the device via the inode minor every time.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
If a major GPU fault occurs, interrupts should be turned off to
avoid a storm. Calling disable_irq from within the IRQ handler,
however has deadlock problems. Call disable_irq_nosync in an
interrupt context instead.
CRs-fixed: 299686
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
We are starting to accumulate a lot GPU specific information,
and it is handy to keep it all in one place where new core IDs,
firmware and device functions can be easily added.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
The A3XX code likes to use CP_ as a prefix for ringbuffer
commands rather then the legacy PM4 prefix. Since it is more
correct, switch the A2XX code over now to make it easier to
integrate A3XX into the mix.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
We cannot assume that a VMA region created as a result of an mmap
belongs exclusively to us. Allow the user to pass the size of
the vmalloc region through the 'gpuaddr' member of the ioctl
struct and do strict checking on the returned vma to make sure
it is valid.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Move some of the drawctxt functions that are common
to A2XX and A3XX back to the generic drawctxt code
and headers.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>