Commit Graph

4967 Commits

Author SHA1 Message Date
Lynus Vaz
3f05022a4b msm: kgsl: Power scale policy needs at least three power levels.
Since 7x25A supports two power levels, do not allow it to register
with the power scale policy.

Change-Id: I1a77f0aa8e7affa126d7c18cb2d73e8617602dcf
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
2012-01-10 11:49:31 +05:30
Linux Build Service Account
24666ed66a Merge "msm: kgsl: Don't wake core to check if it is idle." into msm-3.0 2012-01-09 10:12:40 -08:00
Lucille Sylvester
51b764d6fd msm: kgsl: Don't wake core to check if it is idle.
Scenarios which check for idle and inadvertently turn
on the core when it was off happen fairly frequently.
Fixing this at the root rather than continuing to work
around each one.

Change-Id: Ibddd40bf69352733c8d4779272aa08757981d494
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2012-01-03 15:48:02 -07:00
Jordan Crouse
f7597bf28d msm: kgsl: Move the GPU register lists to a common location
Move the GPU register lists to a common location so they can be used
by multiple sub-systems.  To avoid confusion, convert the lists from
byte offsets to dword offsets to match how we do register offsets
throughout the entire driver and in user space.

Change-Id: Ic0dedbad0f320242b77231a444939f9c6d852976
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2012-01-03 10:51:58 -07:00
Olav Haugan
ee0f780d78 board: 8660: Add callbacks to request_region
Callbacks to request_region, release_region,
setup_region is missing from ION platform data for
SMI heap.

Change-Id: Ida603d4ac7c3246c0deedb9b80dc0c1ea64638eb
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2011-12-21 16:32:08 -08:00
Linux Build Service Account
97de8ee2c9 Merge "msm: kgsl: add power tracepoints" into msm-3.0 2011-12-20 20:10:09 -08:00
Lucille Sylvester
5b3a942f2f msm: kgsl: Do not ramp to turbo if the screen is off.
Change-Id: I1f6e7a829352c0c5c8f31132bc22ad95ed737e28
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-12-20 18:11:28 -07:00
Jeremy Gebben
b50f33135c msm: kgsl: add power tracepoints
Add kgsl_clk, kgsl_bus, kgsl_irq, kgsl_rail, kgsl_pwrlevel,
kgsl_pwr_set_state and kgsl_pwr_request_state trace
events.

Change-Id: I3bf246f350b1208123ab9a33c08495cea9c533eb
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-20 09:06:56 -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
Linux Build Service Account
183a947581 Merge "msm: kgsl: Add supporting code for 2d dcvs" into msm-3.0 2011-12-19 18:28:24 -08:00
Lucille Sylvester
808eca2d91 msm: kgsl: Add supporting code for 2d dcvs
2d dcvs will also need changes in TrustZone.  However
by adding this code first the TrustZone update can be
made later without breaking any functionality.  This
feature is disabled by default and should not be
enabled without the necessary TrustZone changes in
place.

Change-Id: Ifdd511a3f18ba90faee189393ffc231fbbc6e2cd
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-12-16 18:34:50 -07:00
Linux Build Service Account
1122dbaea8 Merge changes I9b6533ac,Ia49a819d,I19f2fe7a into msm-3.0
* changes:
  msm: kgsl: in postmortem, log powerstate before changing it
  msm: kgsl: adreno_isidle shouldn't BUG()
  msm: kgsl: fix infinite loop in adreno_find_region()
2011-12-16 10:23:26 -08:00
Linux Build Service Account
8b8fbac794 Merge "msm: kgsl: Allow device attributes to be re-created" into msm-3.0 2011-12-16 10:23:26 -08:00
Lucille Sylvester
43deede066 msm: kgsl: Eventually transition to SLUMBER
Even if a core is ACTIVE during an early_suspend call make
sure it switches off eventually with lack of use.

Change-Id: I476e8a14a0d7e90a8ed8b8c05d0cf5ed88632cad
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-12-15 16:37:25 -07:00
Jeremy Gebben
a4d97ee181 msm: kgsl: in postmortem, log powerstate before changing it
Change-Id: I9b6533acbe99c5094d51ac4fb12a23a280cc07c7
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-15 10:16:04 -07:00
Jeremy Gebben
aeb23871d8 msm: kgsl: adreno_isidle shouldn't BUG()
If the ringbuffer isn't idle, the GPU is probably in
SLUMBER or SUSPEND which are very idle states. This
function probably still shouldn't be called, so WARN
instead.

Change-Id: Ia49a819d935d6dce9cae2c193aff8e9de87d8af6
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-15 10:16:03 -07:00
Jeremy Gebben
775d48b639 msm: kgsl: fix infinite loop in adreno_find_region()
If postmortem dump tried to parse a context switch
buffer for any context except the current context
this function would never return.

Change-Id: I19f2fe7afda5796180cdf5f81c17fad960e84f05
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-15 10:16:03 -07:00
Lucille Sylvester
e683db4d38 msm: kgsl: Allow device attributes to be re-created
Leave the attributes initialized so that removing and
restoring policies doesn't result in a kernel panic.

Change-Id: I9724ebf94e3845b6cbaea18abf49d1813043eb52
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-12-14 13:52:48 -07:00
Linux Build Service Account
15aabfaa27 Merge "msm: kgsl: Allow userspace processes to turn off/on power features." into msm-3.0 2011-12-13 10:54:07 -08:00
Linux Build Service Account
0f3f02683c Merge "gpu: ion: Take handle reference in ion_vma_open" into msm-3.0 2011-12-11 19:19:37 -08:00
Laura Abbott
0f2175b51f gpu: ion: Take handle reference in ion_vma_open
When ion_vma_open is called, a reference to the handle in
the vma must be taken. Otherwise, if forking occurs,
ion_vma_close will be called twice which will leave one of
the calls with an invalid reference.

Change-Id: I9ab6e68ab6b1d2ac4bed4f45045b4b2ee39995e8
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-09 14:26:07 -08:00
Jordan Crouse
f587fe56c8 msm: kgsl: Move a #define to a centralized header
ADRENO_ISTORE_START is valuable information for
a number of functions, so move it from within
adreno_debugfs.c to adreno.h.

Change-Id: Ic0dedbad41445fad2130b7cb28d706283f59b4c2
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-12-09 08:35:55 -07:00
Jordan Crouse
a0758f20cd msm: kgsl: Establish a standard GPU ID scheme for the KGSL core
Establish a standard generic format for a GPU ID in the KGSL core:

[0:15] - GPU specific identifier
[16:31] - 0x0002 for 2D or 0x0003 for 3D

Add a KGSL core function to get the GPU ID from the devices and
GPU specific functions to return them.  For Z180, the ID will be
0x0002000B4 (0xB4 = 180).  For 3D, the ID will be 0x00030000 ORed
with the GPU identifier (anywhere from 205 to 225).

Change-Id: Ic0dedbadddb3f587121913b9c226e2bda466f84e
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-12-09 08:35:54 -07:00
Jordan Crouse
520640622d msm: kgsl: Make sure the local directory is put in the CFLAGS
Some compilers struggle to find local includes that are referenced from
external headers.  Add the driver path to ccflags-y.

Change-Id: Ic0dedbad2744e7350b19b97dc0b84cd49c070b95
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2011-12-09 08:35:53 -07:00
Linux Build Service Account
13605e484b Merge "gpu: ion: Check for release/request functions before calling" into msm-3.0 2011-12-08 14:54:13 -08:00
Linux Build Service Account
d34b4ccee0 Merge "gpu: ion: Fix debugfs handling of multiple kernel clients" into msm-3.0 2011-12-08 14:54:13 -08:00
Lucille Sylvester
67138c98a9 msm: kgsl: Allow userspace processes to turn off/on power features.
Primarily intended to allow Adreno Profiler to turn off the features
that confuse some of its metrics.

Change-Id: I22e0bd68147ef1631e3bd3f579e777866fb894c4
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-12-08 12:04:05 -07:00
Laura Abbott
eed86035d5 gpu: ion: Fix debugfs handling of multiple kernel clients
Currently, Ion registers all debugfs entries for clients
via pid. If there are multiple kernel clients, this means
the debugfs entry only gets created for the first one. Fix
this by creating debugfs entries by name always. When
creating user clients, specify the name via the pid.

Change-Id: I00cbb284d1c53b3362bb7be9c0275620a9fac167
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-08 08:39:38 -07:00
Jeremy Gebben
faabed7322 msm: kgsl: let postmortem dump find context switch IBs
Because the IBs used for context switching are not allocated
by userspace, a separate search is needed to find them
in adreno_find_region.

Change-Id: I4c2a180333ae54ecbf257fd8c90ec2e3f748ad95
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-08 08:37:37 -07:00
Jeremy Gebben
16e80faf3f msm: kgsl: improve postmortem and cff bounds checking
Some hangs are fooling the postmortem dump code into
running off the end of a buffer. Fix this by making
its bounds check logic work better by reusing the
logic from kgsl_find_region().

CRs-Fixed: 319312
Change-Id: If6cc01369f4b0634d7e19494b8d021643abb8a39
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-08 08:37:37 -07:00
Linux Build Service Account
f44dd6fb34 Merge changes I8e571677,I6d17c0f5 into msm-3.0
* changes:
  gpu: ion: Add call back for unmapping user mappings
  gpu: ion: Incrememnt user refcount during vma_open/vma_close
2011-12-08 05:58:55 -08:00
Linux Build Service Account
25d136a92f Merge changes Ie8cfb6bc,If4070e60 into msm-3.0
* changes:
  msm: kgsl: remove ib_dump debugfs file
  msm: kgsl: make cffdump work with the MMU enabled
2011-12-08 00:42:29 -08:00
Laura Abbott
a683509211 gpu: ion: Add call back for unmapping user mappings
When mmap is called to remove a mapping, the mmap code
takes care of removing all the entries so it isn't
necessary to call unmap versions. However, there may be
cases where heaps need to do other buffer clean up when
a userspace buffer is unmapped. Add an unmap_user function
to the ion heap ops. This callback needs to happen in
vma_close, so move the decrementing of the overall user map
call back as well.

Change-Id: I8e5716774dd973828f76e03ec43e8e8ecf8c7936
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-07 15:07:01 -08:00
Laura Abbott
7716850941 gpu: ion: Incrememnt user refcount during vma_open/vma_close
Ion allows multiple mmaps of the same buffers. This means that
incrementing the usermap count in mmap and decrementing it in
release is not sufficient as release will only ever be called
once. Fix this by only doing the reference count change in the
vma_open and close which are called whenever mmap is called.

Change-Id: I6d17c0f563d0b90481d8e092c1e206f2b33c8e00
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-07 15:07:00 -08:00
Laura Abbott
b866d75946 gpu: ion: Check for release/request functions before calling
Not all heaps will implement the release/request callbacks. Check those
function pointers are valid before calling.

Change-Id: I848e31495e45c7eaa4497b82be590d291d77980a
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-07 10:48:17 -08:00
Shubhraprakash Das
e530ef377c msm: kgsl: No need to set the graphics mmu type twice
Remove a second redundant call to kgsl_mmu_set_mmutype

Change-Id: I9d98a242952ac5738c260df84896c2b0f76b12d3
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2011-12-06 10:46:05 -07:00
Jeremy Gebben
8db5da8a23 msm: kgsl: remove ib_dump debugfs file
This has not been found to be useful for hang debugging.

Change-Id: Ie8cfb6bcbb8f81d8da903d5062bc75fcc4c3bee4
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-06 09:26:52 -07:00
Jeremy Gebben
a3d07a4bee msm: kgsl: make cffdump work with the MMU enabled
The tools that process cff dumps expect a linear
memory region, but the start address of that region can
be configured. As long as there is only a single
pagetable (so that there aren't duplicate virtual
addresses in the dump), dumps captured with the
mmu on are easier to deal with than reconfiguring
to turn the mmu off.

Change-Id: If4070e60de50387dd12454b98e982b6713eeac42
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-06 09:26:52 -07:00
Linux Build Service Account
1ad4d9022a Merge "msm: kgsl: _timestamp ioctl should be locked." into msm-3.0 2011-12-06 06:33:33 -08:00
Lucille Sylvester
9329cf053e msm: kgsl: _timestamp ioctl should be locked.
The call touches too many general resourses to remain unlocked.

Change-Id: Ie5b36757d611750dda82f67b5579c85b1226b767
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
2011-12-05 21:59:43 -07:00
Laura Abbott
8c0173668e gpu: ion: Add support for iommus
Add infrastructure to support mapping allocations
into iommus.

Change-Id: Ia5eafebee408e297013bf55284abf67d9eb8d78b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-05 10:36:11 -08:00
Jeremy Gebben
72aadf4eaa msm: kgsl: don not hardcode SQ_INST_STORE_MANAGMENT
This value is different on adreno225, so rather than
hardcoding it use pix_shader_start instead.

Change-Id: I805647f440a7385cf10ba8bec2cb7ce0b517ad1f
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-12-04 20:44:58 -07:00
Norman Gee
d7402ff985 msm: kgsl: add tracepoints
Add tracepoint instrumentation to a2xx irqs, z180 irqs, command
buffer issues, timestamp checks, and timestamp waits.

Change-Id: Ib8763a4ff408c448b5b984d80f66b0c77268d9cf
Signed-off-by: Norman Gee <jgee@codeaurora.org>
2011-12-03 20:51:37 -07:00
Linux Build Service Account
c2cda4abbb Merge "gpu: ion: Map only the vma size given" into msm-3.0 2011-12-03 18:19:43 -08:00
Laura Abbott
ceee3d25d5 gpu: ion: Map only the vma size given
When mapping carveout buffers into userspace, only map
the size of the vma given, not the full size of the buffer
since clients may map less than the buffer size.

Change-Id: Idf1d1ee5850c0f7045c0f78bfd5841a76db90a34
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2011-12-03 05:44:33 -07:00
Linux Build Service Account
4b4af6f121 Merge "msm: kgsl: create singlethread wq instead of per-cpu wq" into msm-3.0 2011-12-03 04:41:18 -08:00
Linux Build Service Account
455673b820 Merge "msm: kgsl: Enable adreno225 firmware for 8960v3" into msm-3.0 2011-12-03 04:41:18 -08:00
Alex Bird
8a3ede3801 gpu: ion: Add callbacks to enable SMI voting in ION.
This change is part of the move from PMEM to ION. ION needs an SMI
voting interface smiliar to PMEM's.

Change-Id: I18888f46198848694fb7e1e0d2671074bf51d7c9
Signed-off-by: Alex Bird <alexbird@codeaurora.org>
2011-12-01 17:45:22 -08:00
Carter Cooper
f27ec727d2 msm: kgsl: Enable adreno225 firmware for 8960v3
There is a hardware fix between 8960v2 and 8960v3 that affects which
version of adreno225 firmware is used.  There is no difference in
the chipid in adreno225 so do a runtime check to determine the
firmware to load.

Change-Id: Id4b8025c04c154550c4dc52df0011aa4e8ffa799
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
2011-12-01 11:09:59 -07:00
Jeremy Gebben
e139a04f64 msm: kgsl: fix adreno225 register ranges
There is a gap between GRAS_UCP5W and GRAS_UCP_ENABLED.
Trying to save and restore these registers with shadow writes off
results in rbbm read errors.

Change-Id: I4c99d9e23cae81315418f33aa656117303f990f2
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2011-11-30 13:23:05 -07:00