Commit Graph

27 Commits

Author SHA1 Message Date
Rajesh Kemisetti
c569930315 msm: kgsl: Prevent second time cache flush for the context
Second time cache flush of a context results in GPU hang
for 8x25 target. this change fixes the issue.

CRs-Fixed: 352828
Change-Id: Iaf2bd8e0a3e39f1a39ef52337cf64229e2f44cb5
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2012-05-01 20:11:10 +05:30
Shubhraprakash Das
1c528265e1 msm: kgsl: Change the prototype of MMU function pointers
Change the prototype of the MMU function pointers to take the mmu
pointer as an argument instead of the device pointer.

Change-Id: I4ecafefcc8f755c23dac6e3a15a1a74a74e3db00
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2012-04-30 14:43:07 -06:00
Kevin Matlage
e8d3586fe8 msm: kgsl: Resize CP ROQ for A320/A305
The ROQ for the CP block has the instruction
prefetch space partitioned evenly between
RB, ST, IB1, and IB2. As we don't currently
use ST, and RB is used minimally, we can
reappropriate some of that space to be used
for prefetching more IB2 instructions.

This change has shown slight gains for some
benchmarks, particularly with MSAA.

Change-Id: I92e2b334fe061a236602b036140f708a83d1148e
Signed-off-by: Kevin Matlage <kmatlage@codeaurora.org>
2012-04-26 15:44:47 -06:00
Harsh Vardhan Dwivedi
d9fa3d511c msm: kgsl: Use default hardcoded value for CP's ROQ queue size
The command processor FIFO depth is different for A330 and A2xx GPUs.
It is best to let each GPU use the default value which is hardcoded in
the respective GPU.

Change-Id: I5db6a1c0671d0ad4253dcad7f386429d78a4bd62
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
2012-04-19 13:24:26 -06:00
Carter Cooper
7e7f02ed0a msm: kgsl: Add per context timestamp
Add new ioctls for per context timestamps.
Timestamp functions (read/write/wait) will now be context
specific rather than only using the global timestamp.
Per context timestamps is a requirement for priority
based queueing.

Change-Id: I5fdfb816480241b9552ecf90ed1bb22db3a652b5
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2012-04-13 08:26:07 -06:00
Lynus Vaz
68dba7b544 msm: kgsl: Write the retired timestamp on resume
Write the retired timestamp into the expected location. This fixes
userspace crashes after resume when the retired timestamp is read
as 0 instead of the expected last timestamp.

CRs-Fixed: 350556
Change-Id: Iaa487ba8be427c29b9f7e9b30b251cf26fcff95a
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
2012-04-12 11:16:49 +05:30
Jeremy Gebben
d0ab6adeea msm: kgsl: rework ib checking
Separate ib parse checking from cffdump as it is useful
in other situations. This is controlled by a new debugfs
file, ib_check. All ib checking is off (0) by default,
because parsing and mem_entry lookup can have a performance
impact on some benchmarks. Level 1 checking verifies the
IB1's. Level 2 checking also verifies the IB2.

Change-Id: Ibf3c6d1e0d7522e75b41e1a6dbb92020ae9ace8d
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2012-04-09 15:50:08 -06:00
Shubhraprakash Das
d23ff4bb47 msm: kgsl: Add markers to identify IB sequence start and end
Add nop packets in ringbuffer at the start and end of IB buffers
subnmitted by user space driver. These nop packets serve as markers
that can be used during replay, recovery, and snapshot to get valid
data for a GPU hang dump

Change-Id: Id080672b7c04a1b6cfbccbcf5d4591cb5f0b3058
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2012-04-06 11:31:21 -06:00
Wei Zou
c8c0163607 Revert "msm: kgsl: Add per context timestamp"
This reverts commit 2a811252c7.

Change-Id: Ic3018f19eb1a089ae67e0f3c253cc00e7d0285e3
Signed-off-by: Wei Zou <wzou@codeaurora.org>
2012-03-24 17:29:50 -07:00
Carter Cooper
2a811252c7 msm: kgsl: Add per context timestamp
Add new ioctls for per context timestamps.
Timestamp functions (read/write/wait) will now be context
specific rather than only using the global timestamp.
Per context timestamps is a requirement for priority
based queueing.

Change-Id: I5fdfb816480241b9552ecf90ed1bb22db3a652b5
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2012-03-23 15:44:23 -06:00
Jordan Crouse
b409257520 msm: kgsl: Remove some uneeded debug output
Remove a block of code that dumped the ringbuffer contents after they
were extracted.  The dump is no longer needed and the longer we
stick around dumping things to the console with the mutexes locked,
the better the chance that the watchdog will come bite us.

Change-Id: Ic0dedbadd22993f0f1646841f481cdc6713d38e8
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-03-19 10:41:30 -06:00
Jordan Crouse
a400d8da2d msm: kgsl: Do not BUG in GPU recovery if a valid context can't be found
Don't BUG() if we can't find a valid context to recover to; just fail and
go into a zombie state. This usually happens after a first hang goes bad
and the system keeps hanging while trying to find its way. The problem with
a BUG() in this case is that the system goes down and we can't recover the
snapshot or other debug information.

Change-Id: Ic0dedbad424067ca67799487ee7a7de48a2f42b0
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-03-19 10:41:28 -06:00
Jordan Crouse
b4d31bd8b0 msm: kgsl: Add support for the A3XX family of GPUs
Add support for the A320, the first of the new generation
of Adreno GPUs.

Change-Id: Ic0dedbadd29fbdff8733cd38824594e757eef42d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-02-04 14:54:26 -07:00
Vijay Krishnamoorthy
bef66933ee msm: kgsl: Add support for the preamble context flag
Userspace will set a flag in the context if preambles are in use. If
they are, we can safely skip save and restore commands for the
context. GMEM save/restore is still required.  To improve performance,
preamble commands are skipped when the context hasn't changed since
the last issueibcmds.

Change-Id: I21bb8996d62651122dbebcf7a79543679109e1f9
Signed-off-by: Vijay Krishnamoorthy <adivarah@codeaurora.org>
2012-02-04 14:54:26 -07:00
Jeremy Gebben
388c297b8b msm: kgsl: power state cleanup
Clean up kgsl_pwrctrl_sleep() and kgsl_pwrctrl_wake() to make
state transistions clearer.  Add kgsl_pwrctrl_request_state()
and kgsl_pwrctrl_set_state() to make it easier to debug the
state machine.

CRs-Fixed: 315833
Change-Id: I656ce8bd19feabd4186ef91dc031f8a6c6a7d09a
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-20 09:06:55 -07:00
Jeremy Gebben
ddf6b579bf msm: kgsl: handle larger instruction store for adreno225
This GPU has a larger instruction store, so more memory
needs to be reserved for saving shader state when context
switching.

The initial vertex and pixel partitioning of the
instruction store also needs to be different.

Change-Id: If60c06467dd30d5bae07302a74eaf2687900b2b8
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-11-04 13:25:53 -06:00
Carter Cooper
6dd94c888d msm: kgsl: Cleanup function returns
Change-Id: Ic683e34cbde40b77475bc5fe98d958f364f9ae7b
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2011-10-17 10:57:12 -06:00
Shubhraprakash Das
767fdda6e1 msm: kgsl: Introduce Iommu Code
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>
2011-10-04 17:14:34 -07:00
Lucille Sylvester
958dc94f21 msm: kgsl: Call pwrscale busy only when the GPU is definitely busy.
Original call placement could happen without actually starting
the GPU's workload.

Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-10-03 16:20:12 -07:00
Jeremy Gebben
eebc461898 msm: kgsl: clean up adreno220 registers
There's not enough of these to justify a separate header.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:19:39 -07:00
Jeremy Gebben
79acee6f01 msm: kgsl: fix possible memory leak in firmware loading
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:14:14 -07:00
Jeremy Gebben
3c127f589a msm: kgsl: fix parameter checking in adreno_ringbuffer_issueibcmds
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-10-03 16:14:14 -07:00
Jordan Crouse
505df9cb23 msm: kgsl: Consolidate all GPU information in one spot
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>
2011-10-03 10:28:36 -07:00
Jordan Crouse
084427d2c2 msm: kgsl: Rename PM4 to CP to better align with A3XX code
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>
2011-10-03 10:28:35 -07:00
Jordan Crouse
0e0486f251 msm: kgsl: Rearrange some drawctxt functions
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>
2011-10-03 10:28:29 -07:00
Jordan Crouse
a78c9179a1 msm: kgsl: Introduce GPU specific functions
Add the infrastructure for specific functions based
on the type of 3D GPU core attached to the system.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-10-03 09:59:01 -07:00
Bryan Huntsman
3f2bc4d6eb Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-10-03 09:57:10 -07:00