msm: kgsl: Set 8960PRO GPU chip id

There are two versions of 8960.  Set the 8960PRO chip id correctly.
Ensure 8960 clock values do not get changed when the device is 8960PRO.

Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Change-Id: I1d2226c389881f3cadb9067dc1393db168cef309

Conflicts:

        arch/arm/mach-msm/board-8960.c

Signed-off-by: Neha Pandey <nehap@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-8960.c
msm: kgsl: Need to explicitly halt the ME on stop

it seems even if gpu requests for power rail off, modem might not
process this request as it leads to turn off power rail for mdp in
the case of 7x27a/8x25. This issue specific to 7x27a, since we do
soft reset the GPU on sleep/wake. In the case of suspend/resume,
the powerail is effectively off across the device.

Change-Id: Iad898da67b34e265b2447013c4250ba04a59c0cd
Signed-off-by: Rammohan Basavaraju <rammoh@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
msm: kgsl: Update pagetable on context destruction for A20x

Ensure that pagetable is updated during context destruction. This
resolves stability issues during Camera launch/exit scenarios. Applies
only to A20x GPUs. This change is already done for Z180 device.

Change-Id: I978cbce49ed2b45be0209c2939b1b8423c68d5ec
CRs-fixed: 381875
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
msm: kgsl: Change VBIF settings for adreno A330

Limit the number of pending requests from clients to just 1 for
better stability. More agressive values can be set later if things
are found to be stable.

Switch off gating next write request for certain clients, this
setting seems to be stable and should be better for performance

Set the register values for interleaving requests for A330 VBIF.

Do not set VBIF_OUT_AXI_AMEMTYPE_CONF0 since it was
only being set to POR value.

Change-Id: I2152a30b49545fdbf0c147106a088b71ed562e3f
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
msm: kgsl: Enable GPU DCVS by default where possible

If a platform has Trustzone support, enable GPU DCVS
automatically without checking the individual soc info
value.

Change-Id: Ie8d965f8d73283a7f3bf55dedc44d550db2408b8
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
msm: kgsl: Limit GPU memory buffer allocation sizes

Limit the size of individual GPU memory allocations to the amount of
free memory on the system minus 32MB.  This early check gives us the
chance to verify that the user didn't ask for an obscene amount of
memory, and also to limit the chance that an allocation attempt will
invoke the OOM killer.

The 32MB buffer in particular should keep us out of the clutches of
the OOM killer. That number is the same amount of buffer used in
the page allocation alogrithms and it should keep the GPU from further
throwing fuel on the fire of a low memory situation.

Change-Id: Ic0dedbadcc5ee9cc0d77056b1a22eed5c385d636
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
msm: kgsl: Set the gpu address range for MMU to correct value

Set the upper limit for the gpu address that the MMU can access to
be the base address where the first IOMMU units register space
is mapped. Earlier we set it to the last address mapped minus
a PAGE_SIZE, but we can actually set it to the base address of the
first mapped unit since the GPU should never access that space
unless we are updating IOMMU registers.

Change-Id: I6507ee373a9218210c148685e443e948a311bd29
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
msm: kgsl: Turn on additional clock for IOMMU

Turn on an additional clock for IOMMU if it is valid. This additional
clock is present on devices which have the IOMMU unit access tied to
the core clock of another component. This has been introduced from
IOMMU-v2 onwards.

Change-Id: I8b0a0f23cb789d820a8d515cae54b44f556e634d
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>
msm: kgsl: Don't report io_busy for msm policy

Turn io_fraction to 100 so that the kernel
wait_io_interruptible call is not required for io_busy
reporting while using msm policy. Msm policy uses its
own schema to capture busy events.

Change-Id: Iddb63552305974ce4a12446117f27d07b7201387
Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: Rajeev Kulkarni <krajeev@codeaurora.org>