Commit graph

314365 commits

Author SHA1 Message Date
Cong Wang
d806df2b3a ipv4, fib: pass LOOPBACK_IFINDEX instead of 0 to flowi4_iif
As suggested by Julian:

	Simply, flowi4_iif must not contain 0, it does not
	look logical to ignore all ip rules with specified iif.

because in fib_rule_match() we do:

        if (rule->iifindex && (rule->iifindex != fl->flowi_iif))
                goto out;

flowi4_iif should be LOOPBACK_IFINDEX by default.

We need to move LOOPBACK_IFINDEX to include/net/flow.h:

1) It is mostly used by flowi_iif

2) Fix the following compile error if we use it in flow.h
by the patches latter:

In file included from include/linux/netfilter.h:277:0,
                 from include/net/netns/netfilter.h:5,
                 from include/net/net_namespace.h:21,
                 from include/linux/netdevice.h:43,
                 from include/linux/icmpv6.h:12,
                 from include/linux/ipv6.h:61,
                 from include/net/ipv6.h:16,
                 from include/linux/sunrpc/clnt.h:27,
                 from include/linux/nfs_fs.h:30,
                 from init/do_mounts.c:32:
include/net/flow.h: In function ‘flowi4_init_output’:
include/net/flow.h:84:32: error: ‘LOOPBACK_IFINDEX’ undeclared (first use in this function)

[Backport of net-next 6a662719c9]

Change-Id: Ib7a0a08d78c03800488afa1b2c170cb70e34cfd9
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
2018-08-27 14:52:49 +00:00
Florian Westphal
e4a17b5b70 netfilter: xt_rpfilter: skip locally generated broadcast/multicast, too
Alex Efros reported rpfilter module doesn't match following packets:
IN=br.qemu SRC=192.168.2.1 DST=192.168.2.255 [ .. ]
(netfilter bugzilla #814).

Problem is that network stack arranges for the locally generated broadcasts
to appear on the interface they were sent out, so the IFF_LOOPBACK check
doesn't trigger.

As -m rpfilter is restricted to PREROUTING, we can check for existing
rtable instead, it catches locally-generated broad/multicast case, too.

Change-Id: I2d921ac4d53e5b1ca9a5249e489c33e4fa4a4b3a
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2018-08-27 14:52:48 +00:00
Pavel Emelyanov
36640b6239 net: Loopback ifindex is constant now
As pointed out, there are places, that access net->loopback_dev->ifindex
and after ifindex generation is made per-net this value becomes constant
equals 1. So go ahead and introduce the LOOPBACK_IFINDEX constant and use
it where appropriate.

Change-Id: I29fd08fa01a9522240ab654d436b02a577bb610c
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-27 14:52:48 +00:00
Erik Kline
ec3c4f0012 Revert "netfilter: have ip*t REJECT set the sock err when an icmp is to be sent"
This reverts commit 6f489c42a9.

Bug: 28719525
Change-Id: I77707cc93b3c5f0339e6bce36734027586c639d3
2018-08-27 14:52:47 +00:00
Honghao Liu
ed3e1345c9 ASoC: msm: Add support for flexible period size and count
Add support for flexible period size and count for audio playback path.

Change-Id: Ide5b504054e9eee5c1ffee60b889446919aeb7f4
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
2018-08-27 14:52:47 +00:00
Kuirong Wang
eb02886309 ASoC: msm: Validate pcm buffer size
Check if pcm samples to be copied is greater than
the kernel buffer size.

Change-Id: Ieddd3a3299640ebea0225985d13952045d5dc5c9
CRs-fixed: 813448
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
2018-08-27 14:52:46 +00:00
Asish Bhattacharya
ba9db7d517 ASoC: msm: Fix wrong wait_event_timeout timeout checks
wait_event_timeout returns zero when there is a timeout.
Change fixes the condition check to handle timeouts.

Change-Id: I01184cce0c98a82bb205023b07dd4dd2d91b42ad
CRs-Fixed: 487821
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
2018-08-27 14:52:46 +00:00
Sidipotu Ashok
4b7d2993d8 ASoc: msm: Fix for pcm_read getting struck in alsa core.
Advance hardware pointer by period size even if the packet
coming from qdsp6 is of less size. QDSP6 sometimes
(for rapid device switches) gives packets worth less
than period size and this results in hw_ptr appl_ptr mismatch.

CRs-Fixed: 486276
CRs-Fixed: 488449
Change-Id: I893f9a52e4cd507fd72e4a7aba3c5fa76527d1bf
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
2018-08-27 14:52:46 +00:00
Patrick Lai
7d142e34bd ASoC: msm: flush if prior and current backends rate not matching
It is found that during device switch from one backend
with one sample rate to another backend with another sample rate,
the command to QDSP6 ADM which maps audio stream session to a
particular backend would not get carried out until pending
data of audio stream session from previous backend is either
read out or flushed. This scenario occurs when application
stops providing more buffers to retrieve captured data.
Remedy is to flush upon detection of rate mismatching

Change-Id: I2c01c036d9bb71f938a6795337f08948bd986553
CRs-fixed: 422205
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
2018-08-27 14:52:45 +00:00
Krishnankutty Kolathappilly
799b9c14c2 asoc: msm: Add flexible period count to pcm record driver
In pcm recording, if buffers are not requested from dsp at real
 time then dsp drops the buffers and sends partial buffers. This
 is causing record failures. Pcm record platform driver has two
 periods. If system is loaded, read request will not be at real
 time. Add flexible period count to pcm record platform driver
 so client can configure the period count.

CRs-Fixed: 467746
Change-Id: Iadd47979f7b29a01fb8e6479383094a2ed1d93c5
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
2018-08-27 14:52:45 +00:00
Iliyan Malchev
796ae158b5 Revert "ASoC: msm: Flexible period size for pcm playback"
This reverts commit 2c0066767d.
2018-08-27 14:52:45 +00:00
Supreet Mysore Suresh
c071c08a01 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>
2018-08-27 14:52:44 +00:00
Aravind Venkateswaran
2c20ba5aa9 msm_fb: hdmi: Resolution modes on HDMI
Add a new header file that lists all supported
HDMI resolution modes and the associated timing
information.

CRs-Fixed: 470335
Change-Id: I971422ddb97e3b219cc682032eb67212b434daab
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
2018-08-27 14:52:44 +00:00
Artem Borisov
b4569e784e ion: cma: Update print_debug function
Change-Id: Ia659c05926c39e23307339e0976d9e72f808473a
2018-08-27 14:52:43 +00:00
Justin Philip
f35a335e0b Rotator getting stuck leading to fence timeout
Even though cancel_delayed_work should cancel the worker thread
in some race condition it can fail and get scheduled.
To avoid this situation use cancel_delayed_work_sync.
Also rotator_lock mutex need not be unlocked while waiting for isr
as isr does not aquire this mutex for doing its operations.
It is after this unlock of mutex sometimes in race condition rotator
clock is getting disabled via the msm_rotator_rot_clk_work_f

Change-Id: I574aec489fe51ec0e5f7c215c9aba9bb0ec66ffa
Signed-off-by: Justin Philip <jphili@codeaurora.org>
2018-08-27 14:52:43 +00:00
Nick Desaulniers
6b02eeacda ion: blacklist %p kptr_restrict
Bug: 31494725
Change-Id: I10a0c2aae883dfaa6c235c38689a704064557008
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: b57e736e99
[d-cagle@codeaurora.org: Automatic resolve of merge conflicts]
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
2018-08-27 14:52:43 +00:00
Srinivasarao P
959b680fbf ion: use %pk instead of %p which respects kptr_restrict sysctl
Hide kernel pointers from unprivileged users by using %pk format-specifier
instead of %p. This respects the kptr_restrict sysctl setting which is by
default on. So by default %pk will print zeroes as address. echo 1 to
kptr_restrict to print proper kernel address.

Change-Id: Ia300e3e38b8662afac15edda28959564b05c9367
Signed-off-by: Satyajit Desai <sadesai@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-08-27 14:52:42 +00:00
Vinu Deokaran
dd4dd3494a gpu: ion: return error code when iommu map fails
Return correct error code to caller when __ion_iommu_map fails.

Change-Id: If18480769fc7d3567017bad586d38e1eb9e0e05f
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
2018-08-27 14:52:42 +00:00
Edward Lee
d636d5515e gpu: ion: Updating copyright years
Updating copyright years

Change-Id: I8d4c9571ce57a2a8693613a77fe8c1bff8994df1
Signed-off-by: Edward Lee <eleekimk@codeaurora.org>
2018-08-27 14:52:41 +00:00
eleekimk
2bb083f12a gpu: ion: Adding NULL pointer and NULL function checks
Check for failed allocations and return error code if allocation
failed. Also checking for NULL function pointer before calling
the function pointer.

Change-Id: I264f81ca43c731dd4abdb0036b3c6bf0b4b11167
Signed-off-by: Edward Lee <eleekimk@codeaurora.org>
2018-08-27 14:52:41 +00:00
Pradosh Das
d28765435c gpu: ion: Delete invalid extra file
Deletion of extra file added previously with
commit: d987cbedc3e69076c25e59ad08658d1d014f84dc

Change-Id: Ie4c125cf6b1c36bf9825456da93ea3747fc586ad
Signed-off-by: Pradosh Das <prados@codeaurora.org>
2018-08-27 14:52:41 +00:00
Srinivasarao P
2dac90ed60 gpu: ion: add locking to traversal of volatile rb tree
In ion_debug_heap_show we're iterating over an rb tree (dev->clients)
that could change while we're iterating. Fix this by taking the lock
that is used to control access to this tree.

Change-Id: I6832e1e98e2d2a69fc653451d3752d43ec3ef269
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-08-27 14:52:40 +00:00
Mitchel Humpherys
1ddb3c6aea gpu: ion: fix locking issues in debug code
There are a few places in Ion where we are iterating over volatile rb
trees without proper locking. In some places the proper locking cannot
be added since it would require us to take locks in a different order
than they are taken in other places in Ion. Fix this by re-working some
of the debug code so that we can take locks in an allowed order.

One side-effect of the re-work is that the memory maps will now show
every client that has a handle to a particular region of memory, rather
than just showing the first one that we encounter. This will allow for
more accurate accounting and will give better insight as to who is
actually using the memory.

Change-Id: Ia43e4dbc412cd480c828173f8c20b5095d87d858
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-08-27 14:52:40 +00:00
Srinivasarao P
61cb8c4162 gpu: ion: use a list instead of a tree for heap debug memory map
Currently we use an rb tree to store information about the memory map
which gets passed to the heap print_debug functions. The reason for
using a tree instead of a simple list is to maintain sortedness as we
build the memory map. However, it can be necessary to store multiple
entries for the same address in the memory map since there can be
multiple clients with handles to the same buffer. This information is
interesting and useful but we currently can't store and display it since
the rb tree requires that the key used for sorting (the physical address
in this case) be unique. Fix this by replacing the rb tree with a linked
list. In order to maintain sorted output of the print_debug functions,
sort the list by physical address after fully building the list.

This also has the positive side-effect of simplifying the code and
making future print_debug methods less error-prone.

Change-Id: I5b129fd809fb53c66042eab10d096238a34c2b20
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-08-27 14:52:40 +00:00
Srinivasarao P
b8a50cb5f7 gpu: ion: Refactor locking
Removes contention for lock between allocate and free by reducing
the length of time the lock is held for. Split out a seperate
lock to protect the list of heaps and replace it with a rwsem since
the list will most likely only be updated during initialization.

Change-Id: Id10464dfe0d60cdcd64f29edfc94317d8e5ee251
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Git-commit: 675a52aa0d89e8b6c0c05849627381d8a64b2b2b
Git-repo: https://android.googlesource.com/kernel/common
[lauraa@codeaurora.org: Context differences due to debugfs
differences. Need to adjust locking on MSM specific extensions]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-08-27 14:52:39 +00:00
Laura Abbott
de362b0708 ion: Add API to go from dma_buf to handle
Clients may take dma_bufs directly. Add an API to go from
dma_bufs to Ion handles where appropriate.

Change-Id: Ieb2786629dfbbe30aa2778d6ee16113035bce115
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2018-08-27 14:52:39 +00:00
Johan Mossberg
def8244404 gpu: ion: Add support for sharing buffers with dma buf kernel handles
Currently ion can only share buffers with dma buf fd's. Fd's can not be
used inside the kernel as they are process specific so support for
sharing buffers with dma buf kernel handles is needed to support kernel
only use cases. An example use case could be a GPU driver using ion
that wants to share its output buffers with a 3d party display
controller driver supporting dma buf.

Change-Id: I74388160ad65ee5380b87dbb20521a97ddf6727a
Signed-off-by: Johan Mossberg <johan.mossberg@stericsson.com>
Git-commit: 1a6c74e0d58f6ca028f36c3d794fecff8543bbfb
Git-repo: https://android.googlesource.com/kernel/common
[lauraa@codeaurora.org: update callers of function]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2018-08-27 14:52:38 +00:00
Laura Abbott
d5f76e2f05 gpu: ion: Free the sgtable for CMA based heaps
When an sgtable is allocated with sg_alloc_table, the table needs
to be destroyed in addition to being freed. Destroy the sgtable
when freeing the associated memory.

Change-Id: Iedba81146ba453070790f071848f86826f7eec9c
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-08-27 14:52:38 +00:00
Rahul Sharma
5e597b465b msm: vidc: prevent vcd_stop to wait for long
Video decoder release calls vid_dec_close_client which calls vcd_stop.
If vcd_stop notification fails, then there is a long wait. This patch
is limiting the same

Change-Id: Ibdf33e3882826429bf8c49a5888b8c9908e2e62d
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2018-08-27 14:52:38 +00:00
wyun
53010ac515 msm: vidc: Enable dynamic debug level & out for video kernel driver
"level" has an option of FATAL, ERROR, HIGH, MED, LOW.
  >>usage for all levels: adb shell "echo 0xF > /d/vidc/vidc_debug_level"
"out" has an option of printk or trace_printk.
  >>usage for terminal window: adb shell "echo 1 > /d/vidc/vidc_debug_out"

Change-Id: I0ea3ed2999cc80e691ea86667401eff6c1bf88a8
Signed-off-by: wyun@codeaurora.org
2018-08-27 14:52:37 +00:00
Shiju Mathew
1ecc53d36d msm: vidc: Add support for Picture Order Count Type
This patch adds POC type support for video core that
enables low-latency encoding.

Change-Id: I1fe8ea38c7ed8d203a3ef99febb4001165a856fe
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
2018-08-27 14:52:37 +00:00
c_sridur
e3f2503670 msm_vidc: Frame height is not updating for low resolution clip
Fix: Update frame height preoperly for height lesser than 64

Change-Id: I17cf166a40f77fcea74e7d0c19af801e6e6244d5
Signed-off-by: c_sridur <sridur@codeaurora.org>
2018-08-27 14:52:37 +00:00
Prados Das
a534d63a4c Revert "msm: vidc: No need to allocate metadata by default"
This reverts commit 0efc959be55801808454292cc61d11ff8ab1bfa1

Change-Id: I08163ac9e4d4481cb9df324fd8ccc14bef536d96
Signed-off-by: Prados Das <prados@codeaurora.org>
2018-08-27 14:52:36 +00:00
Deepak Verma
c5aa9f6b0e msm: vidc: No need to allocate metadata by default
If metadata is not enabled by client, there is no need
to enable it by default.

Change-Id: I6d5bd1c04dcdf78549afac57bcaceb82602da270
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2018-08-27 14:52:36 +00:00
srikarri
b4cae04f14 msm: vidc: enable pic_order_cnt_type for H264 encoding
-current implementation will result in poc_type as 0 in SPS
params (even though the poc increment value is 2 in the
encoded stream).
-So changes done to return poc_type as 2 in SPS params

Change-Id: I5a22af422b0e1591a69a0b5b868342667ee60bbf
Signed-off-by: srikarri <sridur@codeaurora.org>
2018-08-27 14:52:36 +00:00
Deepak Verma
199e7908cf msm: vidc: Set input buffer size dynamically
This change supports overriding of default input
buffer size using a set parameter call from the
client.

Change-Id: I5225ec53ba16b68aeedd4c30897bd291e81b4b09
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2018-08-27 14:52:35 +00:00
Deepak Verma
446bc8aa6e msm: vidc: Initialize kernel space stack variables
This change initializes kernel space stack variables
that are passed between kernel space and user space
using ioctls.
Non initialization of these variables may lead to
leakage of memory values from the kernel stack to
user space.

Change-Id: Icb195470545ee48b55671ac09798610178e833e1
CRs-fixed: 556771,563420
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2018-08-27 14:52:35 +00:00
Deepak Verma
889ead1155 msm: vidc: Validate input data before processing
User controlled data needs to be validated before
processing, otherwise it may corrupt existing data
and other programming variables which may further
lead to crash in kernel space.
This change validates user specified buffer's data,
such as offset and data length, before performing
any operations in kernel.

Change-Id: Idb2a5c4c270cdbb55adfc0c22b9296b7dd359de9
CRs-fixed: 547695
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2018-08-27 14:52:35 +00:00
srikarri
e08007f901 msm: vidc: free the recon buffers in cleanup function
- The recon buffers were not released when video recording
  was killed abruptly leading to memory leak.

- Fix provided to release the recon buffers when media
  server killed abruptly.

Change-Id: I48ac1a592719446b7e4bf87bbd707d09351d1e61
Signed-off-by: srikarri <sridur@codeaurora.org>
2018-08-27 14:52:34 +00:00
Mayank Chopra
082823053c msm: rotator: Add support to YCBYCR rotator format
Add support for MDP_YCBYCR_H2V1 interleaved YUV format in rotator
block.

Change-Id: I4bb192aaab1e72f6e5687ae222a5f9ea2c254bd4
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2018-08-27 14:52:34 +00:00
Mayank Chopra
e92f596664 msm_fb: display: Add support to YCBYCR MDP format
Add support of MDP_YCBYCR_H2V1 interleaved YUV format to MDP
for a-family targets.

Change-Id: I5afb84a95693d1ced114152364782a10c4d56bc2
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2018-08-27 14:52:33 +00:00
Vishnuvardhan Prodduturi
46076762d6 msm: msm_fb: Replace wait for DMA_P with VSYNC in Pan_display Path.
This is a follow up change on gerrit 442946. Wait for DMA_P has to be
replaced with VSYNC even in Pan Display Path.

Change-Id: I8d600022cfa63f54d5b72ea5f64fc55315079b3a
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2018-08-27 14:52:33 +00:00
Vishnuvardhan Prodduturi
77e93ca69c msm: msm_fb: wait for VSYNC instead of DMA_P for commit completion.
In the current implementation, we are waiting for DMA_P interrupt
in commit call to signal completion. This can cause 2 commits happening
in the same vsync period due to which IOMMU page faults can happen when
vsync comes while second commit is programming resgisters. To avoid this,
wait for DMA_P is replaced by wait for VSYNC.

Change-Id: I68d4d4b4e7a574f86faecd5b4812e1f5852f4209
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2018-08-27 14:52:33 +00:00
Maheshwar Ajja
3c4ccf282e msm: vidc: Add LTR feature for H264 encoder
This change adds Long Term Reference picture
selection feature for H264 video encoder.

Change-Id: Ida957df244d8715c955afe8d809708123a94e999
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2018-08-27 14:52:32 +00:00
Olav Haugan
43040691a3 iommu: msm: Handle unmapping of PTE properly
The unmap api is currently not handling unmapping of page table
entries (PTE) properly. The generic function that calls the msm
unmap API expects the unmap call to unmap as much as possible
and then return the amount that was unmapped.
In addition the unmap function does not support an arbitrary input
length. However, the function that calls the msm unmap function
assumes that this is supported.

Both these issues can cause mappings to not be unmapped which will
cause subsequent mappings to fail because the mapping already exists.

Change-Id: I638d5c38673abe297a701de9b7209c962564e1f1
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2018-08-27 14:52:32 +00:00
Jeremy Gebben
9dac5e5da3 iommu: msm: prevent partial mappings on error
If msm_iommu_map_range() fails mid way through the va
range with an error, clean up the PTEs that have already
been created so they are not leaked.

Change-Id: Ie929343cd6e36cade7b2cc9b4b4408c3453e6b5f
CRs-Fixed: 478304
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2018-08-27 14:52:31 +00:00
Laura Abbott
69cd952800 iommu: msm: Don't treat address 0 as an error case
Currently, the iommu page table code treats a scattergather
list with physical address 0 as an error. This may not be
correct in all cases. Physical address 0 is a valid part
of the system and may be used for valid page allocations.
Nothing else in the system checks for physical address 0
for error so don't treat it as an error.

Change-Id: Ie9f0dae9dace4fff3b1c3449bc89c3afdd2e63a0
CRs-Fixed: 478304
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2018-08-27 14:52:31 +00:00
Jeremy Gebben
6b44ed1956 iommu: msm: check range before mapping for IOMMU-v1
Make sure iommu_map_range() does not leave a partial
mapping on error if part of the range is already mapped.

Change-Id: I108b45ce8935b73ecb65f375930fe5e00b8d91eb
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2018-08-27 14:52:31 +00:00
Olav Haugan
962d00eb87 iommu: msm: Use phys_addr_t for physical addresses
IOMMU map and unmap function should be using phys_addr_t
instead of unsigned int which will not work properly with
LPAE.

Change-Id: I22b31b4f13a27c0280b0d88643a8a30d019e6e90
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2018-08-27 14:52:30 +00:00
Kevin Matlage
77a8b4b9d1 iommu: msm: Let IOMMUv1 use all possible page sizes
Allow the IOMMUv1 to use 16M, 1M, 64K or 4K iommu
pages when physical and virtual addresses are
appropriately aligned. This can reduce TLB misses
when large buffers are mapped.

Change-Id: Iffcaa04097fc3877962f3954d73a6ba448dca20b
Signed-off-by: Kevin Matlage <kmatlage@codeaurora.org>
2018-08-27 14:52:30 +00:00