iommu: msm: Refactor code to separate compilation

Modify the code and update makefile and defconfig to allow us to
only compile one of the two IOMMU drivers that we have. Only one of
the drivers are needed at the same time. This will ensure we are not
compiling and linking code that is not needed.

Change-Id: I7db69f873245e57bddab6625e0b04e2ed48f44b6
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
iommu: msm: Add decoding to PAR when fault occurs

Add decoding of the PAR register when a VA2PA translation fault
occurs to help in debugging.

Change-Id: Ie3c442d29c3c10f7437acbb63262eb51bc9cc9ab
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
iommu: msm: Cache whether the soc supports v0 IOMMUs

Currently, each call to determine if the SOC supports the v0
IOMMU makes at least one call to of_find_compatible_node. This
function is not excessively slow usually but
msm_soc_version_supports_iommu_v0 is called on the fast path which
introduces latency. Since v0 support is not something that can be
changed at runtime, cache the status of v0 support in a static variable
to avoid calling the devicetree functions frequently.

Change-Id: I835774a2cecb074f2bf25b1d3acb6fb87a5c0417
CRs-Fixed: 507473
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
dts: msm8974-lge-panel: Add panel dimensions
msm: remove fmem support

This functionality is no longer supported.

Change-Id: I52df01acc7deebcfd84e78c333d860e3f3c2eb32
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
msm: ocmem: Handle shrinking of memory after passive evictions

During a passive eviction, the information of the client
which triggered the eviction is not stored in the request
structure of the evicted client. This is needed during the
shrink operation of the evicted client.

Store the eviction data of the request being evicted in the
request structure to handle the shrink operation.

Change-Id: Ie03573d0c488801a6e436babccf6b84bd777fb3e
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
arm/dt: msm8974: Double the "ab" values for VIDC DDR bandwidth request

As per the recommendation by performance team, update the
"ab" values for DDR BW requests. This change fixes the
display under-runs seen during video playback.

Change-Id: I521cfa50d3ecf2dc3b57ca0207ba3ccd2b7b28f2
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Kconfig: Enable config to allow vmalloc savings

Select the config to reclaim the vmalloc space in lowmem
and disable the map around the hole config, where selected,
as both the configs cannot be enabled together

CRs-Fixed: 568470
Change-Id: I9dd3e0123e4fe3e33554cdbdf5a82e344c230f47
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: Adjust the low memory boundary

The unused virtual address space in low memory is given to
vmalloc for use. This reduces the low memory space and
increases vmalloc space. Adjust the vmalloc_min in order
to increase the low memory.

Change-Id: I0dbef5b6e5ec3d19f5f93f06ed03a4cf1215dc4d
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
msm: Update the kernel log messages

After reclaiming vmalloc and adjusting lowmem, the two regions
are no longer contiguous. Update the messages printed during
bootup to list all regions corresponding to low memory and vmalloc
respectively

Change-Id: I2aeb25026c068e27860c3df1496fc6f5c420b818
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Merge arch/arm/mach-msm/ Comments from CM11.0 Kernel.
config to ZIP and cleanups.
remove compilation error by changing int to uint32_t Signed-off-by: Supreet Mysore Suresh <supreet@codeaurora.org>

Change-Id: Ia7de2f4a9eae4cc16f957163683ddf83c135d379
Signed-off-by: Supreet Mysore Suresh <supreet@codeaurora.org>
iommu: msm: zero out the bus_client in __put_bus_vote_client

The bus_client variable might become stale and re-used later. This is
causing a kernel panic when enabling bus votes on iommu v1. Fix this
by zero'ing out the variable as it's done in msm_iommu_dev-v0.c

CRs-fixed: 483497
Change-Id: Ib34a2f25d9eff0deee2e3809c6736ce2832e445f
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
ARM: dts: Add bus bw voting to IOMMUv0 nodes

Add bus voting data to IOMMUv1 nodes allowing IOMMU driver to vote for
bus bandwidth when the IOMMU is being used. This is required for
certain clocks to turn on.

CRs-fixed: 483497
Change-Id: If1d59c5c1c39514f2f2b67f5c1a005fbfab30615
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
iommu: Do not clear FSR if fault handler returns EBUSY

If the IOMMU unit's driver returns EBUSY from fault handler then
do not clear the FSR. This will prevent the IOMMU unit from
unstalling itself. Some driver like graphics need for the IOMMU
to be stalled until that driver is ready to clear it.

Change-Id: Ic2b846dbba93d1b706309705e04d93f6c803bd2b
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
msm: iommu: remove tlb_invalidate from the map calls

TLB_invalidate calls are not required as we are not changing the
mapping, but creating a new one. So, remove unnecessary invalidation
from the map calls.

Change-Id: I72f9f1cce341c3dc92e2819dd7a4d2e032909e7b
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
Config update.