msm: kgsl: Changing to kref_get_unless_zero for process refcount

Do not allow anything to get a refcount to the process_private
structure if its refcount has gone down to 0.

Change-Id: I7cd6f731286aebfc84c288284599b47f666dcd47
Signed-off-by: Shrenuj Bansal <shrenujb@codeaurora.org>
msm: kgsl: Wake gpu up on the max freq when using the performance governor

Use the flag provided by the performance governor on the device
suspend/slumber to wake it up later on the max gpu frequency.

Change-Id: Ia8284458ffe9cd17eb8e87b2eb84c485ae6e8afa
Signed-off-by: Vladimir Razgulin <vrazguli@codeaurora.org>
msm: kgsl: Use GPU to switch pagetables when current one is default

Use the GPU to switch pagetables even if the current pagetable is
the default pagetable. This requires that commands are submitted to
GPU that do not belong to any context since the current context is
a NULL one. This is better for performance because if GPU is not
used to switch pagetable then synchronization is required between the
GPU and CPU.

Change-Id: I6c1a161fed0747714a86419cdd873ac080466bbf
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
gpu: ion: system_heap: add support for 2MB allocations

Enable 2MB (order 9) allocations from the system heap. This improves the
performance of some heavyweight use cases. The benefit is especially
large for use cases where the buffer is mapped into an IOMMU since we
can leverage the 2MB IOMMU page table mappings.

Change-Id: I869733089b9ccba8090bbca80aac7b5f248b335e
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
ion: use iounmap instead of __arm_iounmap

The API iounmap() is more generic and portable
than __arm_iounmap().

Change-Id: If9601e9266bec56442686d3f2bdb1d475cd7bead
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
ion: use PAGE_KERNEL instead of pgprot_kernel

The ion code uses PAGE_KERNEL (which is more generic than
pgprot_kernel) everywhere except in one place (so fix it).

Change-Id: I38fa1c682a3e04e9c8cb3cd25678094862fe8c9c
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>