msm: kgsl: use the right socinfo api for setting 8960v1 power levels

Change-Id: I3fa6bb8a714783cd5ac39c99d7bafdd0e303aee0
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: fix 2d kgsl_pwrctrl_irq() call

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>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: change 2d msm_bus vote to 1200MBPS

The 2d core msm_bus vote should be equal to that
lowest bus vote of the 3d core which is 1200MBPS

Change-Id: I5cfc2c707f73e4096876d607c161bb2dafc4d776
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Cleanup function returns

Change-Id: Ic683e34cbde40b77475bc5fe98d958f364f9ae7b
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: suspend device when the display does off

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>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Change b/w vote for new power level

Change the bus scale table of the new power level
to use low vector instead of init vector. This
change is only needed on mainline as the new power
level is defined only for mainline.

Change-Id: I2857d9deb6eac1168ad73f3922c790a9a46eeba1
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Calculate the CPU busy during each GPU idle period

Gather more stats data for the analyzing daemons.

Change-Id: I9ffcfc76c0bd5f27ebf50d3f97e169662697fd12
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Always go to max clock rate on a pwrscale policy change

Especially when setting the policy to "none" we want to end up at the
highest frequency, rather than a random frequency.

Change-Id: I845a205be04482099ae3dafd13fdc55c63b7d952
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Force rb, and ib dumps

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>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Revert "msm: kgsl: suspend device when the display does off"

This reverts commit 3b7ad9c5764eeef6439b9488c17f5e4d7500f101.

Change-Id: Ie54ad7e14fc297a1275e50957023bf6c614b1e5e
Signed-off-by: Dominic Binks <dbinks@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Remove unused ib1_wq from struct adreno_device

Change-Id: Ibb37c225cbcafdb33f9ef483df54ccc26f48f7e1
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Create scatter gather lists for memory objects

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>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Revert "msm: kgsl: Temporarily turn off NAP for 8960 stability"

The nap related stability problems have been resolved.

This reverts commit 0a98de9e61c5aeca1db821e579b351065d9bd860.

Change-Id: Idd8cceb7ed2bf13b1736e9371fa91884a6808e7c
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Use scatter gather list to map memory to IOMMU

Use the scatter gather list for mapping memory to the IOMMU
page table. This results in much better performance as compared
to mapping single pages to the IOMMU table

Change-Id: Id78da19c8fcb7726f24dfdfb15fb9f9a16b7a185
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Don't check for idle while suspended

Change-Id: I1914b68288af94fff3f7111937864b3f1510cada
CRs-fixed: 315037
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Fix z180 error code on issueibcmds

Change-Id: I7e7149fd165fd12856bf3b3529f8f78aedd9d810
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Update usage of cpu_is_msm8960 for 8930

Update drivers' usage of cpu_is_msm8960() to also include a
check for cpu_is_msm8930(), to support the pre-silicon
effort.

Change-Id: I7f2e4b4793e7ca1391696aa066bd7bf06b81b352
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
Revert "msm: kgsl: Make sure we are idle before calling pwrscale_idle"

This reverts commit 2cbd1ffea5b6c8e2b04a80f71eb6491993f51a28

Change-Id: I3c4452ad03aacb121cadc6b1b329220dfd24370c
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Fixup per-process memory statistics

Make the framework for reporting per-process memory statistics a little bit
more generic.  This should make it easier to keep track of more external
memory sources as they are added.

Change-Id: Ic0dedbad57ae595044dd4f4a80ba4cead2bf9441
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: kgsl: Add ION as an external memory source

Allow ION buffers to be attached via IOCTL_KGSL_MAP_USER_MEM

Change-Id: Ic0dedbada34d12fb70b528f3a93dd21805a4c8a4
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>