2 years ago[media] uvcvideo: improve urb buffer allocation
Henry Lin [Wed, 21 Sep 2016 16:02:03 +0000]
[media] uvcvideo: improve urb buffer allocation

Some UVC device (e.g. StereoLabs ZED camera) may have strict timing
requirement for transferring video payload. This change improves URB
buffer allocation for UVC device with bulk VideoStreaming interface. The
criteria for buffer allocation are:
- Let an URB able to receive a complete UVC payload
- Prepare and submit URBs for a complete video frame

If system memory is large enough, URB buffers will consume memory size
up to a complete video frame.

Bug 1674178

Change-Id: If5f366582ee1c1cb559e890176d74484634dccef
Signed-off-by: Henry Lin <henryl@nvidia.com>
Signed-off0by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1225266
(cherry picked from commit 4797f84301fe6ff42313c688e72e4f7c0d52b2e6)
Reviewed-on: http://git-master/r/1239557
(cherry picked from commit 3d96f9a8e9f50e08a8306b94378c08dcdfa83abc)
Reviewed-on: http://git-master/r/1281090
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm: dts: Remove support for IMX208 sensor
Vincent Chung [Thu, 24 Nov 2016 01:24:43 +0000]
arm: dts: Remove support for IMX208 sensor

Remove support for the IMX208 sensor in all T124 target branches due
to a security vulnerability reported for the Pixel C.

This Gerrit removes the DeviceTree and configuration references.

boot.img size not changed.

Bug 1825317

Change-Id: I04c7a8cad07f31ea5aa4a33389838f2ce2a8f31f
Signed-off-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-on: http://git-master/r/1259194
(cherry picked from commit ca610513f9ff266ca475fdd7689100661a25054f)
Reviewed-on: http://git-master/r/1260885
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>

2 years agodrivers: media: Remove support for IMX208 sensor
Vincent Chung [Tue, 22 Nov 2016 02:33:03 +0000]
drivers: media: Remove support for IMX208 sensor

Remove support for the IMX208 sensor in all T124 target branches due
to a security vulnerability reported for the Pixel C.

This Gerrit removes the IMX208 driver.

Bug 1825317

Change-Id: I5a5b140526c9aabe3f57d60cd750176579f18391
Signed-off-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-on: http://git-master/r/1259195
(cherry picked from commit 7dca6a9ec76c83aabf21a7d1c9ac6f48fc7fa3f4)
Reviewed-on: http://git-master/r/1260883
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>

2 years agoiommu/tegra: pci: fix PCIe switch configurations
Vidya Sagar [Sun, 20 Nov 2016 11:48:21 +0000]
iommu/tegra: pci: fix PCIe switch configurations

fixes of_node lookup even if the PCIe device(s) are not
connected directly to root port, rather connected via a
PCIe switch configuratin.

Bug 200253693

Change-Id: I952c1dcc83a3cc6ecccae195c246b2bb1eec7354
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1256856
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>

2 years agoASoC: tegra-alt: fix noisy audio issue
Sameer Pujar [Thu, 5 Jan 2017 05:58:28 +0000]
ASoC: tegra-alt: fix noisy audio issue

Playback of few sample rates is affected due to incorrect pll_a
and pll_a_out0 values. Issues seen with 8kHz, 176.4kHz and some
of the odd frequency (multiples of 11.025kHz) streams.

Current patch provides required rates for pll_a and pll_a_out0.
pll_a rate is fixed at 338.688MHz, which can serve odd sample
rates. To support lower frequency sample rates (8/11.025 kHz),
pll_a_out0 is reduced to half of its value corresponding to
even/odd stream rates.

Bug 1849362

Change-Id: Icc1e7b08b573dc6ca1f4cc84ff931bf9fefe1a98
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1280564
(cherry picked from commit 8cf22e26dcfe7fa390188ca42b52df5c07adc56c)
Reviewed-on: http://git-master/r/1281482
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm64: dts: update pll source for sdmmc3
Jerry Chang [Fri, 13 Jan 2017 06:15:03 +0000]
arm64: dts: update pll source for sdmmc3

add pll_c4_out2 clock source for HS200 mode

Bug 1847474

Change-Id: I310846d5679d8bbce2fffe5af9eb0199e91c0f21
Signed-off-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-on: http://git-master/r/1284689
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jackie Chen <jackchen@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Vick Yu <vyu@nvidia.com>

2 years agopcie: host: tegra: use GFP_DMA32 for MSI mem alloc
Martin Chi [Fri, 24 Feb 2017 02:10:01 +0000]
pcie: host: tegra: use GFP_DMA32 for MSI mem alloc

uses GFP_DMA32 instead of GFP_KERNEL while allocating
memory to be given to PCIe end points to issue write
transactions to generate MSI interrupts.
This fixes issues with PCIe end points that are capable
of generating writes to only 32-bit addresses for generating
MSI interrupts

Bug 200234273

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1227735
(cherry picked from commit 11b39e38141e2b862ed79b9b414e0412e0e0e2f4)
Change-Id: I269cb5c55bcac20fd14deb2311067e8a1f58c49b
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/1306920
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agovideo: tegra: nvmap: fix possible use after free
Gagan Grover [Tue, 22 Nov 2016 09:31:11 +0000]
video: tegra: nvmap: fix possible use after free

Fix possible use after free issue.

Bug 1814555
Bug 1884319

Change-Id: I826aa34f61d43fda5419a528697ce84ba2ce1eae
Reviewed-on: http://git-master/r/1221643
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1257999
(cherry picked from commit b1647da33cff0c498ca8439a722ea1962ecf6901 in rel-24)
Reviewed-on: http://git-master/r/1460521
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>

2 years agodrivers: crypto: Avoid use of tainted scalar value
Konduri Praveen [Wed, 3 May 2017 03:42:41 +0000]
drivers: crypto: Avoid use of tainted scalar value

Copy from user may taint the scalar value members
in the respective struct variables.
Add check for verifying the validity of the
scalar value members to avoid undefined behaviour.

Bug 1903278

Change-Id: I727f28783eee880d03c90c027d3538b7e4b57b6d
Signed-off-by: Konduri Praveen <kondurip@nvidia.com>
Reviewed-on: http://git-master/r/1474467
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agovideo: tegra: host: add lower bound to num_syncpt_incrs
Gagan Grover [Fri, 21 Oct 2016 06:15:00 +0000]
video: tegra: host: add lower bound to num_syncpt_incrs

Check if there is at least one syncpt_incrs in each job.

Bug 1812182

Change-Id: I0bd0b2e7c4d01641c83ba729ec34390ddea81496
Reviewed-on: http://git-master/r/1221226
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1240374
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
(cherry picked from commit 847bb69132adcdb8fc2ce2d7dabeb80d9cc2aa32)
Reviewed-on: http://git-master/r/1460494
GVS: Gerrit_Virtual_Submit
Tested-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agodccp: fix freeing skb too early for IPV6_RECVPKTINFO
Sandipan Patra [Tue, 21 Mar 2017 10:14:31 +0000]
dccp: fix freeing skb too early for IPV6_RECVPKTINFO

In the current DCCP implementation an skb for a DCCP_PKT_REQUEST packet
is forcibly freed via __kfree_skb in dccp_rcv_state_process if
dccp_v6_conn_request successfully returns.

However, if IPV6_RECVPKTINFO is set on a socket, the address of the skb
is saved to ireq->pktopts and the ref count for skb is incremented in
dccp_v6_conn_request, so skb is still in use. Nevertheless, it gets
freed
in dccp_rcv_state_process.

Fix by calling consume_skb instead of doing goto discard and therefore
calling __kfree_skb.

Similar fixes for TCP:

fb7e2399ec17f1004c0e0ccfd17439f8759ede01 [TCP]: skb is unexpectedly
freed.
0aea76d35c9651d55bbaf746e7914e5f9ae5a25d tcp: SYN packets are now
simply consumed

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Bug 200285540

Change-Id: I3bec712b03278102c88933d4684324c3f414b606
Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-on: http://git-master/r/1325178
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agogpu: nvgpu: acquire mutex for notifier read
Deepak Nibade [Mon, 27 Feb 2017 10:53:21 +0000]
gpu: nvgpu: acquire mutex for notifier read

We use &ch->error_notifier_mutex to protect writes and free of error
notifier. But we currently do not protect reading of notifier in
gk20a_fifo_set_ctx_mmu_error() and vgpu_fifo_set_ctx_mmu_error().
Add new API gk20a_set_error_notifier_locked() which is same as
gk20a_set_error_notifier() but without the locks.
In *_fifo_set_ctx_mmu_error() APIs, acquire the mutex explicitly,
and then use this new API gk20a_set_error_notifier() will now just
call gk20a_set_error_notifier_locked() within a mutex

Bug 1824788
Bug 1844312
Bug 200270206

Change-Id: I1f3831dc63fe1daa761b2e17e4de3c155f505d6f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1273471
(cherry picked from commit 505b442551a2e27aa3bc9e608c5a2bc9fccecbc4)
Reviewed-on: http://git-master/r/1311857
Reviewed-on: http://git-master/r/1324991
GVS: Gerrit_Virtual_Submit
Tested-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agovideo: tegra: nvmap: Fix print format specifier
Gagan Grover [Tue, 29 Nov 2016 13:02:40 +0000]
video: tegra: nvmap: Fix print format specifier

The format specifier %p can leak kernel addresses.
The fix is designed to use %pK instead of %p, which also evaluates
whether kptr_restrict is set.

CVE-2016-8409 A-31495687

Bug 1844902
Bug 200286375

Change-Id: I57a1fca9c58c0ac433415e39c82ab72d7429e48e
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1261530
(cherry picked from commit aa8d5a3cda7ecce610c39baee371a3ca8a6533a5)
Reviewed-on: http://git-master/r/1315831
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shivdas Patil <shivdasp@nvidia.com>
Tested-by: Christian Gonzalez <christiang@nvidia.com>
Reviewed-by: Kaustubh Purandare <kpurandare@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agovideo: tegra: nvmap: fix time-of-check,time-of-use vulnerability
Sri Krishna chowdary [Sat, 25 Feb 2017 19:02:47 +0000]
video: tegra: nvmap: fix time-of-check,time-of-use vulnerability

Validate the region specified by offset and size before performing
the operations like nvmap_prot_handle, nvmap_cache_maint and nvmap_handle_mk*.
This validation of offset and size once the values are in local variables
guarantees that even though user space changes the values in user buffers,
nvmap continues to perform operations with the contents that are validated.
Fixes Google Bug 34113000.

Bug 1862379
Bug 1880033

Change-Id: I32786d26c269a95122fbaf0b91d6d090cba7388e
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1298712
(cherry picked from commit f45441da608d8015ece73d253d4bdb48863f99e2)
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1311449
(cherry picked from commit 18b957d355340c436c7e58a95b2907402684b242)
Reviewed-on: http://git-master/r/1319904
GVS: Gerrit_Virtual_Submit

2 years agoFix L4T Bluetooth l2cap PTS test failures
Mahesh Patil [Fri, 24 Feb 2017 20:49:31 +0000]
Fix L4T Bluetooth l2cap PTS test failures

Include proper FCS length in Bluetooth l2cap ertm packet
retransmission and added l2cap extended feature UCD
(unicast connectionless data reception) support flag.

Bug 1882139

Change-Id: I02facaff214f3d9bf963f0843aa1de1c5dedcfd6
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: http://git-master/r/1311185
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rohit Vaswani <rvaswani@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agomedia: tegra: camera: Fix stack overread
Amey Asgaonkar [Mon, 16 May 2016 23:33:15 +0000]
media: tegra: camera: Fix stack overread

We are not checking a variable which is user
controlled. This can lead to reading of the
stack data. Adding a check to ensure it is
less than the max possible value of the variable.

Bug 1763649

Change-Id: I395e882d030199bdd7684837906a9b5d60741650
Signed-off-by: Amey Asgaonkar <aasgaonkar@nvidia.com>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1150943
(cherry picked from commit 14359cb871606ffefa4ca2070b7e9ccb08dcd378)
Reviewed-on: http://git-master/r/1260833
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Christian Gonzalez <christiang@nvidia.com>
Tested-by: Christian Gonzalez <christiang@nvidia.com>

2 years agoarm64: config: enable Trusty for L4T
Stephen Warren [Wed, 9 Nov 2016 16:22:34 +0000]
arm64: config: enable Trusty for L4T

L4T systems will include the Trusty secure OS in the near future. Enable
the drivers required to communicate with Trusty in L4T's defconfig.

Bug 1818826

Change-Id: I7f0d139ea5a72e267f249510cd090e2aa94ae785
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255194
(cherry picked from commit 226a18e5a581107c1c0e25642eedf924d53f5ce7 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257374
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agoARM64: t210: dts: use virtual timer for secure timer
Sharif Inamdar [Fri, 23 Oct 2015 11:44:03 +0000]
ARM64: t210: dts: use virtual timer for secure timer

Initially with Trusty, we were facing a crash since kernel
registers for both secure and non-secure timer and trusty registers
for secure timer. Since both registers for the same interrupt we
see a crash.

The suggested fix was to make the arch timer driver register for
non-secure and virtual timer by changing the secure interrupt value
to virtual interrupt such that the kernel registers for non-secure
and virtual timer where as trusty then registers for secure timer.

With this we get rid of the crash since both trusty and arch timer
driver registers for different interrupt value.
arch timer driver will now register for non-secure and virtual timer.
Trusty will use the secure timer for its operation.

Bug 200148571
Bug 1818826

Change-Id: I5405c105e3694128afe93fb73371d4fae43300f1
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/822025
(cherry picked from commit 402e96ae9dbda633ccf9f44e2e1884454f8b2443 in dev-kernel-3.18)
(swarren manually applied the k3.18 patch to k3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255192
(cherry picked from commit 1d26af2ce2315553274bfd819fead1e17ef9eb51 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257373
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Don't register IPI
Wayne Lin [Wed, 23 Mar 2016 17:46:06 +0000]
trusty: Don't register IPI

System will randomly crash in trusty after enabling IPI.
If the previous CPU is A57, and IPI send to Denver.
There will be some memory coherence issue in trusty.

Bug 200184071
Bug 1818826

Change-Id: I9422cc75ce70acfdd44f5662c492ed0d64d3f212
Signed-off-by: Wayne Lin <wlin@nvidia.com>
Reviewed-on: http://git-master/r/1114575
(cherry picked from commit cc6387320acb8b2cd7c6345e62de32ac9a27b53e)
Reviewed-on: http://git-master/r/1115131
(cherry picked from commit 13b2e5944b9d5cb80782342fead3a022d3e63618 in dev-kernel-3.18)
(swarren manually applied the k3.18 patch to k3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255191
(cherry picked from commit 5cef87e303dcc5f2af2821d874357fb62c3ab725 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257372
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty-ipc: Add support for default Trusty IPC device
Michael Ryleev [Thu, 30 Jul 2015 19:50:08 +0000]
trusty-ipc: Add support for default Trusty IPC device

If particular Trusty IPC device to operate on is not
important caller can pass NULL for dev parameter to
tipc_create_channel routine to access default Trusty IPC
device.

Bug 1818826

Change-Id: Ib35f44f87ee9d71f827263c6a667a5852d4286e6
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit 78dd8a2878e3e7cf8d5fa998eea47a54bcb848b3 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255190
(cherry picked from commit 4a2adf1b31dbb404b9276ed3772fa749fc7ead3b in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257371
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty-virtio: add support for 64-bit phys addresses for vrings
Michael Ryleev [Thu, 22 Oct 2015 01:15:30 +0000]
trusty-virtio: add support for 64-bit phys addresses for vrings

Work around limitation of vring descriptor structure that only
supports 32 bits addresses. On archs with 64 bit physical addresses
store top 32 bits of such address in currently unused reserved field.

Bug 1818826

Change-Id: I30333f6b8966db89bd4b8a699a72b80c6257a31f
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit 5905c66d15412a6e0d82e3675fb5f01431040785 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255189
(cherry picked from commit df360bc31f3b875af6a3f72bc7175228a9f06a0b in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257370
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty-ipc: Fix a corner case in dn_handle_message
Michael Ryleev [Tue, 13 Oct 2015 02:51:04 +0000]
trusty-ipc: Fix a corner case in dn_handle_message

Return an original RX buffer to actually implement intended behavior
in corner case when tipc_chan_get_rx_buffer fails. This is only
currently possible when 0 order memory allocation fails.

Bug 1818826

Change-Id: I8599f7cfcecd2dda0e1d01c5477c9ac519bf6dcf
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit a32bbb810f65b8d036148a34ce1b05fd9188d2b4 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255188
(cherry picked from commit 5c6842c0723256446aabee37e8f48cd25e028c4f in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257369
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty-ipc: Fix a corner case in _handle_disc_request
Michael Ryleev [Tue, 13 Oct 2015 01:55:29 +0000]
trusty-ipc: Fix a corner case in _handle_disc_request

It is possible to receive a valid disconnect request when channel
still is in connecting state.

Bug 1818826

Change-Id: Iad1ef831a0ca5fc793f6d1df0be5b48933b633db
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit fe31b177f1f36f74febbb666af1319af8d1ee497 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255187
(cherry picked from commit c6ddbc8bf143376e0fe2de679cfec656b8727adb in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257368
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty-ipc: Add aio based readv and writev support
Michael Ryleev [Fri, 18 Dec 2015 22:46:40 +0000]
trusty-ipc: Add aio based readv and writev support

This implementation is aio based and suitable for older
kernels.

Bug 1818826

Change-Id: I0f21f727898d3bed9e7bb71df26371edb06061c0
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit 834aa62117ed2eae7b60874f2ed7cd7670f5bf1f from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255186
(cherry picked from commit 254130096e987d01134c025c34572d95a3ccab95 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257367
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Add smp support
Arve Hjønnevåg [Sat, 24 Jan 2015 01:55:48 +0000]
trusty: Add smp support

Add an unlocked nop call to allow multiple cpus to enter trusty.
Other standard calls are still serialized to avoid return codes
getting mixed up.
A new return code is used to indicate that the standard call is
running on another cpu.

Bug 1818826

Change-Id: Iccc0785138fbc3eb9daebf22fd79d6c1f9b23f6a
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 51132bfbacfcc63b4414fcb3b0bc62e737da93e3 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255185
(cherry picked from commit 4d23c49eef7df76107393312feb6569656de50c8 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257366
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agoarm: smp: Add support for custom ipi interrupt handlers
Arve Hjønnevåg [Tue, 3 Mar 2015 23:24:40 +0000]
arm: smp: Add support for custom ipi interrupt handlers

This allows forwarding IPIs to the trustzone OS.

Bug 1818826

Change-Id: I368ae24e8679afa089bfe14d44bf7a59b72b5c95
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(swarren, Arve's s-o-b received by email)
(cherry picked from commit 63df83ff361160be6cba09ef84696342a03e65d9 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255184
(cherry picked from commit d442eac05903422d631b11720b4fccc7bd208a12 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257365
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agoarm64: smp: Add support for custom ipi interrupt handlers
Arve Hjønnevåg [Sat, 24 Jan 2015 01:53:12 +0000]
arm64: smp: Add support for custom ipi interrupt handlers

This allows forwarding IPIs to the trustzone OS.

Bug 1818826

Change-Id: I157ce3a554a8a422755ac479815366fc893f6fea
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit a000af3a0fc5ad20769b1060eab1633de907ce8e from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255183
(cherry picked from commit 6e66ce11edd14102bc3b57d30a2b3f0abf479915 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257364
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Handle fiqs without calling notifier and enabling interrupts
Arve Hjønnevåg [Fri, 12 Jun 2015 02:51:54 +0000]
trusty: Handle fiqs without calling notifier and enabling interrupts

Bug 1818826

Change-Id: I3e396497283237b83a43127098dde0bf6e781c1f
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(swarren, Arve's s-o-b received by email)
(cherry picked from commit 63f6b6cdcad0c6f23de0b694310cb1659b577e8e)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255182
(cherry picked from commit b8edc8e1a219e5eedb9457d1de452f7f37a62fcf in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257363
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Select api version
Arve Hjønnevåg [Fri, 12 Jun 2015 02:34:28 +0000]
trusty: Select api version

Select api version in probe, and store it in trusty_state.
This enables new return codes from trusty, and will later be used
to enable a nop stdcall that does not take smc_lock.

Bug 1818826

Change-Id: Ia72d4264537ce7ddba12b867c3221dd92db22056
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(swarren, Arve's s-o-b received by email)
(cherry picked from commit 7f12378c142220404248c32eac0a8ca68de9c37a from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255181
(cherry picked from commit 4e9d3d16313c081a349cf1c8ed98b2472ebad7be in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257362
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Warn if trusty crashed
Arve Hjønnevåg [Fri, 12 Jun 2015 02:50:59 +0000]
trusty: Warn if trusty crashed

Bug 1818826

Change-Id: Id595f7658866472560c5f80a70a5235571e74f28
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(swarren, Arve's s-o-b received by email)
(cherry picked from commit 5817f951f010969288e5ebfe6693d8b0ba4d2aa9 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255180
(cherry picked from commit 43831a4d098f665c5fb9a915c1ad7ce925f73dc0 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257361
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Update smcall.h
Arve Hjønnevåg [Fri, 12 Jun 2015 03:01:36 +0000]
trusty: Update smcall.h

Bug 1818826

Change-Id: Ie9fd30e6a94b7f0ebe4ebd9db5856a960690d2fb
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(swarren, Arve's s-o-b received by email)
(cherry picked from commit af08ddcd66f821b3b40587817aa9a45551bfc202)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255179
(cherry picked from commit 2678b816351a491f52e0ae4ab87f550e3f8bb76d in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257360
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty-virtio: fix return values of trusty_load_device_descr
Michael Ryleev [Sat, 25 Apr 2015 01:38:53 +0000]
trusty-virtio: fix return values of trusty_load_device_descr

Return -ENODEV if load device descriptor operation failed
and log original error code.

Bug 1818826

Change-Id: Id170233a51994a514ec15598d4fcade6ec0a2f7a
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit a57353dd48e63450bdf74053a57e12588881262e from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255178
(cherry picked from commit db935c834884eddac31714841e5aa70c7b914e2e in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257359
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty-virtio: fix notifier registration order
Michael Ryleev [Sat, 25 Apr 2015 00:17:06 +0000]
trusty-virtio: fix notifier registration order

Trusty smc call_notifier has to be registered before
calling trusty_virtio_start.

Bug 1818826

Change-Id: I2d28a5f11d9dd11c2696b3d49f6944377e1da32f
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit cdb70d17a0e13208d8f665d28f7095158a88768a from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255177
(cherry picked from commit bd877adbad2a38e346be3aecb4e8bf43783e3a86 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257358
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: add trusty-ipc driver
Michael Ryleev [Wed, 7 Jan 2015 23:47:37 +0000]
trusty: add trusty-ipc driver

Trusty IPC driver provides message passing interface
between non-secure side (Linux) and secure side running
Trusty. It is handling a set of trusty IPC virtio devices
instantiated and configured by trusty-virtio driver based
on device description retrieved from secure side.

Bug 1818826

Change-Id: I81288aa458675996cbc93e73baf3c41d735d5429
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit 03545bd62370cb28db26613260ef36ac072e5fde from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255176
(cherry picked from commit b478e2867042c7e091a24a81a8b8c4b258e4f182 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257357
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: add trusty virtio driver
Michael Ryleev [Mon, 30 Mar 2015 19:43:59 +0000]
trusty: add trusty virtio driver

Trusty virtio driver is responsible for management an
interaction with virtio devices exposed by Trusty.
During initialization, this driver makes an smc
call to retrieve Trusty virtio device descriptor from
secure side, parses it then instantiates and configures
the specified set of virtio devices.

Bug 1818826

Change-Id: I20a23518d5c19bedd9282f7f1d4b16957ba75408
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit 49cd705cb598e32909ac7704bba79fabfd64feee from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255175
(cherry picked from commit cb980262ebfeeac3321b30c90e72fe45e48f1a69 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257356
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: add couple non-secure memory related helper routines
Michael Ryleev [Fri, 27 Mar 2015 02:31:25 +0000]
trusty: add couple non-secure memory related helper routines

trusty_encode_page_info - encodes page physical address, memory
type and other attributes into architecture specific structure
that can be parsed by secure side.

trusty_call32_mem_buf - can be used by drivers to make
specified smc call with physicaly contigues memory buffer as
an argument. Memory buffer info in retrieved by trusty_encode_page_info
and along with buffer size is encoded into series of 32-bit
smc call parameters.

Bug 1818826

Change-Id: Iae155c0eff0bb6269be1abbe53ee42f27a1c23f5
Signed-off-by: Michael Ryleev <gmar@google.com>
(cherry picked from commit 489d59d67530633b5d7712d9b3bccad2a1f180f1 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255174
(cherry picked from commit f1f39acb18e4174afc4773e97eb3158c47f3131d in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257355
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Get version string from trusty
Arve Hjønnevåg [Fri, 10 Oct 2014 04:24:17 +0000]
trusty: Get version string from trusty

Print trusty version to kernel log on startup, and export it in sysfs.

Bug 1818826

Change-Id: Ibb503a9385a223b590b882578fdd6332fc750a8d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit af1ac76fcfaa06395a13afd27edfc4f29dd52e7d from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255172
(cherry picked from commit c6243e7378298cf471a0e3345427e67426b02803 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257354
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Retry std_calls on SM_ERR_BUSY
Arve Hjønnevåg [Sun, 5 Oct 2014 00:36:20 +0000]
trusty: Retry std_calls on SM_ERR_BUSY

If the trusty spinlock is held, or if the strex fails for another
reason, trusty returns SM_ERR_BUSY. Add retry code to handle this.

Without this retry code, std_calls can fail. If the previous smc
call had returned SM_ERR_INTERRUPTED, this failure would cause
the driver to get out of sync with trusty. All later calls would
then fail with SM_ERR_INTERLEAVED_SMC.

Bug 1818826

Change-Id: I9f72bb7ce9af9e1ef0a38aeff62fb83ea51377cf
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit e909ef01e6ea5084d05c2ce89a83f63247970e40 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255171
(cherry picked from commit f68a02600e571c57f9dbb4b3e51a544c79a83c9f in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257353
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: move probe to subsys_initcall
Colin Cross [Tue, 13 May 2014 21:49:28 +0000]
trusty: move probe to subsys_initcall

Child devices of trusty like FIQ-based debuggers and watchdogs may
want to probe early, move trusty from module init to subsys init
to allow it and its children to probe earlier.

Bug 1818826

Change-Id: I10d7028d5c7dbeb4dc5e951029c059783b1953d3
Signed-off-by: Colin Cross <ccross@android.com>
(cherry picked from commit bd9b849d25e63069104360573f5cc5a7614de839 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255170
(cherry picked from commit 079a2d9b62fb0149c766e1cbd42a65a72ac76ebe in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257352
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: fiq-arm64: Allow multiple fiq handlers.
Arve Hjønnevåg [Sat, 3 May 2014 02:15:44 +0000]
trusty: fiq-arm64: Allow multiple fiq handlers.

If multiple fiq handlers are reqistered call them all. There is
currently no api to remove handlers.

Bug 1818826

Change-Id: I7e16a73f40251ccf6ad8d33fd32350f774651135
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 5a333166fdf1ffd094e0116c9b3ba059653fd346 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255169
(cherry picked from commit fbd89b9edfad885089ec8e0bc97b5f0c8144883d in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257351
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: arm64 fiq support
Arve Hjønnevåg [Tue, 15 Apr 2014 00:18:40 +0000]
trusty: arm64 fiq support

Bug 1818826

Change-Id: Icd7c410ea805d4f7b5318b922f269cff8a56d53e
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(swarren, Arve's s-o-b received by email)
(cherry picked from commit 86eb811e8180ed90dd1ef0c2bae4baf9794c46b4 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255168
(cherry picked from commit 58c35558ae4b8f85d1afc68385b24f56d15a0764 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257350
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Add trusty_fast_call64 api on 64 bit systems.
Arve Hjønnevåg [Tue, 15 Apr 2014 00:16:06 +0000]
trusty: Add trusty_fast_call64 api on 64 bit systems.

Bug 1818826

Change-Id: Ibb74be14fd3ddcb792862f7e1bd9c588007924d5
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 6b1a2d31a5682fd626b1c41895ddf7ab6bb8c643 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255789
(cherry picked from commit d66af47b07b50d442ab85ae700a2de5a3fc151a1 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257349
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agoarm64: Add fiq_glue stub
Arve Hjønnevåg [Thu, 24 Apr 2014 00:18:28 +0000]
arm64: Add fiq_glue stub

Adds header file and config option that can be selected when an
implementation of the api is available.

Bug 1818826

Change-Id: I9c70840eb9c7c8ac67095d146079fc8e6145fb3b
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 21cd2a8faa6f050346605316dbcc9068d506371b from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255788
(cherry picked from commit e58c873a3fe686a8c240cd85c72b141d854360d5 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257348
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Move 32 bit arm fiq code to trusty-fiq-arm.
Arve Hjønnevåg [Tue, 15 Apr 2014 00:12:26 +0000]
trusty: Move 32 bit arm fiq code to trusty-fiq-arm.

Bug 1818826

Change-Id: I58933fc70d165316bd5b91d2b7a6dabe404d736c
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 3d57f5df52ea7a76216a68bc5aa3bc8550709d78 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255787
(cherry picked from commit 0adad7d680aa223931ef91388f0fd87ed759f0c4 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257347
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Fix compile warning on arm
Arve Hjønnevåg [Thu, 24 Apr 2014 00:35:30 +0000]
trusty: Fix compile warning on arm

Bug 1818826

Change-Id: Idd832e59331e28f0bf07913df39af22706a9ffa1
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 39d85f0cd797179eb6095d3b9f20e30a1a812d13 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/773193
(cherry picked from commit ec5f16da709778a0003106eeff7adb297dafcb77 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1257346
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

2 years agotrusty: Add arm64 support
Arve Hjønnevåg [Tue, 11 Mar 2014 03:29:06 +0000]
trusty: Add arm64 support

Bug 1818826

Change-Id: I5ddca64d2ecd7f2dc572f434ccf641f436c63aad
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 0da972cc7510010d76347ebfbaa1cc164e481b9e from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255786
(cherry picked from commit 0a163633fc61a1cedc7cabfb4a6fd6f1b1c63844 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1256411
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

2 years agotrusty: Provide trusty_std_call32 and trusty_fast_call32 stubs if CONFIG_TRUSTY is...
Arve Hjønnevåg [Tue, 17 Dec 2013 03:26:36 +0000]
trusty: Provide trusty_std_call32 and trusty_fast_call32 stubs if CONFIG_TRUSTY is not set.

Bug 1818826

Change-Id: I52119a6d09a7b380863f4ae5e4c5a95fa58be3bb
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 2e55f95a657ba34c081afec5d00840fea56b5515 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255785
(cherry picked from commit 3ccce903d15d5ba0fbfe7bab6c0604309071c3b8 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1256410
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

2 years agotrusty: Add fiq support
Arve Hjønnevåg [Wed, 27 Nov 2013 04:18:35 +0000]
trusty: Add fiq support

Register a custom fiq-return handler with the fiq-glue so the
monitor mode can atomically re-enable the fiq and return to the
last mode.

Bug 1818826

Change-Id: I7f2720f6c66f171995ab1927602e781f7dbea52d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit dc7e98fc2692f34a680091a6f1d4b8a43d071717 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255784
(cherry picked from commit a733a721465a371dde4ae8bb7b33be1186b20a2f in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1256409
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

2 years agotrusty: Add interrupt support
Arve Hjønnevåg [Tue, 19 Nov 2013 04:52:55 +0000]
trusty: Add interrupt support

Get list of interrupts from secure mode and register handlers for them.
When an interrupt triggers, disable the interrupt and schedule a work
function. The work functions then masks interrupts at the cpu, reenables
the interrupt and calls into secure mode.

Edge triggered interrupts are not supported.

Bug 1818826

Change-Id: I731d425e8c946552add6e01cd64dab76337af470
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 8abdce02cff69bac1df994a775d787a8732ddf6b from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255783
(cherry picked from commit d8c99bf3c0ae78968a9fdf4e580d8ee8b08ecde9 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1256408
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

2 years agotrusty: Add notifier before and after every smc call.
Arve Hjønnevåg [Thu, 21 Nov 2013 05:31:34 +0000]
trusty: Add notifier before and after every smc call.

Called with local interrupts disabled.

Bug 1818826

Change-Id: I6feb9cee349f78f8d228294f238b0b420a6d4beb
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit e30482e7bc33cd2074e0f3163212e4df7dcdffb7 from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255782
(cherry picked from commit 2e9a9c7d9060c9cf16b32457300e6571c9b12bcf in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1256407
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

2 years agotrusty: Add trusty driver
Arve Hjønnevåg [Tue, 19 Nov 2013 04:46:48 +0000]
trusty: Add trusty driver

Bug 1818826

Change-Id: I35318be3d41f84b922397e9afdca6bf47d9645db
Signed-off-by: Arve Hjønnevåg <arve@android.com>
(cherry picked from commit 33dbf3395558ad97cf65770235d8dfe90b33345f from https://android.googlesource.com/kernel/common/+/android-trusty-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255781
(cherry picked from commit 45bf2e74d512c0c6260094274be99f5635c3b57e in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1256406
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

2 years agoARM: tegra210: add Trusty DT
Stephen Warren [Wed, 9 Nov 2016 20:55:30 +0000]
ARM: tegra210: add Trusty DT

Some T210 systems will use Trusty. Add a DT fragment that describes the
existence of Trusty, and include it in the common T210 DT file. The node
will be enabled at run-time by the bootloader whenever Trusty is present
in the secure OS image.

The DT content was copied from device/hardware/nvidia/soc/t210.git as of
commit f2d24ed9df5b "arm64: tegra210: ERS: add apbmisc node to the dts".

Bug 1818826

Change-Id: Ibcfc45802f418c0f73e09406f031085254306eb6
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1255193
(cherry picked from commit 18719bb05148683b5760bc624f209a59e6be81b4 in dev-kernel-3.10)
Reviewed-on: http://git-master/r/1255861
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

2 years agoplatform: tegra: cluster-control: extended state ID format for power states
Varun Wadekar [Thu, 8 Sep 2016 19:00:30 +0000]
platform: tegra: cluster-control: extended state ID format for power states

This patch uses the extended state ID format for communicating power
states to the monitor software. This allows us to move to ARM Trusted
Firmware as the monitor stack.

Bug 1809446
Bug 1818826

Change-Id: Id30c3884c34e42473b309977598b3ff3a8c80bdb
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/1217307
(cherry picked from commit 7eafb7db75853960ed8b6bfb6aebd9da500d2c96 in dev-kernel-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1247563
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agocpuidle: tegra210: extended state ID format for power states
Varun Wadekar [Thu, 8 Sep 2016 18:59:37 +0000]
cpuidle: tegra210: extended state ID format for power states

This patch uses the extended state ID format for communicating power
states to the monitor software. This allows us to move to ARM Trusted
Firmware as the monitor stack.

Bug 1809446
Bug 1818826

Change-Id: I0c85452fcf2d6aba6fc640b29671b646ba35a186
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/1217306
(cherry picked from commit d5245356e1e27d197c4b9e6ed8fdf18ee1556910 in dev-kernel-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1247562
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm64: tegra: pm: extended state ID format for power states
Varun Wadekar [Thu, 8 Sep 2016 18:12:18 +0000]
arm64: tegra: pm: extended state ID format for power states

This patch uses the extended state ID format for communicating power
states to the monitor software. This allows us to move to ARM Trusted
Firmware as the monitor stack.

Bug 1809446
Bug 1818826

Change-Id: Ie6d39db149187c77a60f6f2677b6b4b1f69681af
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/1217305
(cherry picked from commit 30643151a5fbf9f05cdd27ba9ad211e2d93196b1 in dev-kernel-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1247561
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm64: psci: enable support for extended PSCI state ID
Varun Wadekar [Thu, 8 Sep 2016 17:41:44 +0000]
arm64: psci: enable support for extended PSCI state ID

This patch removes support for 'struct psci_power_state' and directly
accepts the PSCI power state as a 32-bit value. This allows us to start
using extended state IDs, which in turn allows us to interact with ARM
Trusted Firmware as the monitor stack

Bug 1809446
Bug 1818826

Change-Id: I88ce349dacc014e2b7ea39ba0139fdc8f001b8f2
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/1217304
(cherry picked from commit aef84526f17478d99715573e3684e478edb79dfc in dev-kernel-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1247560
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoRevert "arm64: export functions for cpuidle drivers"
Varun Wadekar [Thu, 25 Aug 2016 20:29:47 +0000]
Revert "arm64: export functions for cpuidle drivers"

This reverts commit bba3d59da77d35ee3f964bf31ebf8cb3c843aec2.

Bug 1809446
Bug 1818826

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I1156cc8a94d4199e8c65b5b540827ce8c41788d4
Reviewed-on: http://git-master/r/1217303
(cherry picked from commit c5c1b4f0efa27580f030529c4c9e82f129b715ec in dev-kernel-3.10)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1247559
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm64: tegra210: PSCI v1.0 compatible function IDs
Varun Wadekar [Wed, 2 Nov 2016 22:26:08 +0000]
arm64: tegra210: PSCI v1.0 compatible function IDs

Convert all the power state function IDs to follow PSCI v1.0 format. Bit
30 states if the state is a power down state. Previous higher bits from
PSCI v0.2 have been removed in the new spec.

Bug 1809446
Bug 1818826

Change-Id: Iee11f397b5b22f33835348b15c88e09dc8d51823
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/1227100
(cherry-picked from commit 46e03f3129ced25ecd7d79f52778cc8e2c1b82e2 in
repo device/hardware/nvidia/soc/t210 branch dev-kernel)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1247558
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agocpuidle: tegra210: idle state parameters from the device tree
Varun Wadekar [Wed, 2 Nov 2016 22:07:33 +0000]
cpuidle: tegra210: idle state parameters from the device tree

NOTE: In l4t/l4t-r24.2, this patch contains just the DT portions of the
original kernel 3.18 patch from dev-kernel, which is described below. The
original patch both added DT content and adapted the code to immediately
use it. In r24.2, the code changes don't directly apply, and instead
future patches will adapt the code. However, we still need all the
definitions in DT, hence portions of this patch are cherry-picked.

==========

The CPU idle framework and the suspend/resume framework depend on the
CPU idle states and their parameters being defined from device trees.
A new node, 'idle-states', defines all the states supported by the CPUs.

Example
-------

cpu@<0,1,2,3> {
cpu-idle-states = <&C3>;
};

idle-states {
C3: c3 {
compatible = "nvidia,idle-state";
arm,psci-suspend-param = <0x3>;
wakeup-latency-us = <10>;
min-residency-us = <1>;
idle-state-name = "c3-HW-controlled-Vmin";
status = "okay";
};
};

In order to parse these new entries we enable CONFIG_DT_IDLE_STATES,
which in turn enables the dt_idle_state.c file. All the CPU idle states
are then stored in a per-cpu array and the indexes from the array are
then used as input parameter to the CPU idle entry function. The driver
is then supposed to handle the entry into the corresponding idle state.

Bug 200094906
Bug 1818826

Change-Id: If547488c5194a071312d6a85e85fb4d31bbfde7f
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/761599
(cherry-picked from commit ead3e59edc10e19a08900e92949ac1436fdc94e3 in
repo kernel-3.18 branch dev-kernel-3.18)
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1247557
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agomm: remove gup_flags FOLL_WRITE games from __get_user_pages() tegra-l4t-r24.2.1
Linus Torvalds [Thu, 13 Oct 2016 20:07:36 +0000]
mm: remove gup_flags FOLL_WRITE games from __get_user_pages()

commit 19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619 upstream.

This is an ancient bug that was actually attempted to be fixed once
(badly) by me eleven years ago in commit 4ceb5db9757a ("Fix
get_user_pages() race for write access") but that was then undone due to
problems on s390 by commit f33ea7f404e5 ("fix get_user_pages bug").

In the meantime, the s390 situation has long been fixed, and we can now
fix it by checking the pte_dirty() bit properly (and do it better).  The
s390 dirty bit was implemented in abf09bed3cce ("s390/mm: implement
software dirty bits") which made it into v3.9.  Earlier kernels will
have to look at the page state itself.

Also, the VM has become more scalable, and what used a purely
theoretical race back then has become easier to trigger.

To fix it, we introduce a new internal FOLL_COW flag to mark the "yes,
we already did a COW" rather than play racy games with FOLL_WRITE that
is very fundamental, and then use the pte dirty flag to validate that
the FOLL_COW flag is still valid.

Reported-and-tested-by: Phil "not Paul" Oester <kernel@linuxace.com>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Michal Hocko <mhocko@suse.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Nick Piggin <npiggin@gmail.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[wt: s/gup.c/memory.c; s/follow_page_pte/follow_page_mask;
     s/faultin_page/__get_user_page]
Signed-off-by: Willy Tarreau <w@1wt.eu>

Bug 1829674

Change-Id: I6fbb1abf656ff7e05ec4c65f07dbbdd694546fb4
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1241323
GVS: Gerrit_Virtual_Submit

2 years agot210: tegra-fuse: add support to read UID
Shardar Shariff Md [Thu, 1 Sep 2016 09:12:20 +0000]
t210: tegra-fuse: add support to read UID

- Add support to read unique ID (UID), there is no one register
field to read UID, instead UID is constructed from various bits
of information burned into the fuses during the manufactoring
process.

UID is constructed to 64 bit as below from below UID register
<CID:4><VENDOR:4><FAB:6><LOT:26><WAFER:6><X:9><Y:9>

- rename tegra21x offset filename to tegra210

Bug 1803702

Change-Id: Ie14ab25e147d6668ab2a092305a0c62b7257279a
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1241691
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>

2 years agospi: tegra: fixed polling mode tranfer timeout
snchen [Fri, 14 Oct 2016 09:44:57 +0000]
spi: tegra: fixed polling mode tranfer timeout

The change "set INTR_MASK only once" cause polling mode failed.

Interrupt mask has to be cleared in case of polling mode during setup.
Check against transfer direction is invalid during setup and will fail.
Removed direction check.

bug 1818284

Signed-off-by: snchen <snchen@nvidia.com>
Change-Id: I8f5c0f5685e6f0e311deadc4a32c0aade40dd572
Reviewed-on: http://git-master/r/1241690
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agogpio: pca953x: fix gpio input on gpio offsets >= 8
Martin Chi [Mon, 24 Oct 2016 08:57:37 +0000]
gpio: pca953x: fix gpio input on gpio offsets >= 8

This change fixes a regression introduced by commit
f5f0b7aa8 (gpio: pca953x: make the register access by GPIO bank)

When the pca953x driver was converted to using 8-bit reads/writes
the bitmask in pca953x_gpio_get_value wasn't adjusted with a
modulus BANK_SZ and consequently looks at the wrong bits in the
input register.

Bug 1826501

Change-Id: Id9c9d1cab9fb97e2fdf9408b03873722f787fbec
Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 40a625daa88653d7942dc85483f6f289cd687cb7)
Signed-off-by: Martin Chi <mchi@nvidia.com>
Reviewed-on: http://git-master/r/1241694
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agoARM64: DT: imx185: Add gain delay support
Frank Chen [Fri, 21 Oct 2016 00:56:12 +0000]
ARM64: DT: imx185: Add gain delay support

Add one frame delay for gain setting to be
in sync of exposure settings.

Bug 200244330

Change-Id: I2213c4630970b38f07fd8dedc3445699af81086c
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1240263
GVS: Gerrit_Virtual_Submit
Reviewed-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agogpu: nvgpu: fix use-after-free in case of error notifier
Gagan Grover [Wed, 12 Oct 2016 11:35:06 +0000]
gpu: nvgpu: fix use-after-free in case of error notifier

A use-after-free scenario is possible where one thread in
gk20a_free_error_notifiers() is trying to free the error
notifier and another thread in gk20a_set_error_notifier()
is still using the error notifier

Fix this by introducing mutex error_notifier_mutex for
error notifier accesses

Take mutex in gk20a_free_error_notifiers() and in
gk20a_set_error_notifier() before accessing notifier

In gk20a_init_error_notifier(), set the pointer
ch->error_notifier_ref inside the mutex and only
after notifier is completely initialized

Bug 1824788

Change-Id: I47e1ab57d54f391799f5a0999840b663fd34585f
Reviewed-on: http://git-master/r/1233988
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1236662
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Singh (SW-TEGRA) <gaursingh@nvidia.com>
Tested-by: Gaurav Singh (SW-TEGRA) <gaursingh@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm64: tegra: jetson-cv: add hynix emc dvfs
Bibek Basu [Tue, 27 Sep 2016 10:34:57 +0000]
arm64: tegra: jetson-cv: add hynix emc dvfs

Add Hynix emc dvfs table for ramcode 1.
Runtime selection will happen based on ramcode

Bug 1819114

Change-Id: I3503e8f9f87fea64b5a947ba9ffb84eda70df5bb
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1227650
GVS: Gerrit_Virtual_Submit

2 years agoRevert "arm64: tegra21: enable Android Composite Gadget"
Prabhu Kuttiyam [Wed, 12 Oct 2016 16:53:11 +0000]
Revert "arm64: tegra21: enable Android Composite Gadget"

This reverts commit 4791baae56adddc8a97fa25dc27e46aa83ebf90d.
The original commit caused the device mode to stop working.
Hence reverting the commit
boot.img size decreased by 91552 bytes.

Bug 200236945

Change-Id: Id51f4e1d815c709529307fbdf9510fbe81f189f9
Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/1235396
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>

2 years agoWAR:arm64: dts: update imx185 dt
Saurabh Maniktala [Thu, 6 Oct 2016 23:59:38 +0000]
WAR:arm64: dts: update imx185 dt

This change disables these
modes:
 10 bit 30fps
 12 bit 60fps
 10 bit 60fps

Bug 1823414

Change-Id: I6ffbcf3454e7c65a2b51816cdabca8be57041c40
Signed-off-by: Saurabh Maniktala <smaniktala@nvidia.com>
Reviewed-on: http://git-master/r/1232811
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

2 years agokernel: arm64: Added "model name" in /proc/cpuinfo
Ninad Malwade [Mon, 3 Oct 2016 08:46:01 +0000]
kernel: arm64: Added "model name" in /proc/cpuinfo

- Show "model name" in /proc/cpuinfo
- This will enable displaying processor info in
"System setting -> Details" in Ubuntu

model name display is generic.
model name      : ARMv8 Processor rev X (v8l)

bug 200225877

Change-Id: I6bd4334693b1e87c8f678f164be814d3047969ee
Signed-off-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-on: http://git-master/r/1230761
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm64: config: enable IGB driver
Vidya Sagar [Mon, 3 Oct 2016 07:02:01 +0000]
arm64: config: enable IGB driver

enables Intel IGB driver to support Intel-82576
Gigabit Ethernet Controller based NICs

boot.img size not changed.

Change-Id: I24f08dd0e16f77a050f2384439a2b9240f45396c
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1230003
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agoARM64: DT: ov23850: Update mode settings
Frank Chen [Tue, 15 Mar 2016 01:24:35 +0000]
ARM64: DT: ov23850: Update mode settings

Update ov23850 mode settings.

Bug 200172566

Change-Id: Ibf0eba56b2daa0c05adb082dd106390752f9a618
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1224071
Tested-by: Peter Mikolajczyk <pmikolajczyk@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Charlie Davies <cdavies@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agoARM64: dt: power setting for camera plugin-manager
Frank Chen [Mon, 12 Sep 2016 20:27:59 +0000]
ARM64: dt: power setting for camera plugin-manager

Add power servivce related DT entries for camera
plugin-manager

Bug 1812759
Bug 1789527

Change-Id: I5a64ab00fd5484682e1c43408780fa6ef0dfc59e
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1219116
Cherry picked from: 877b0e25b2ea35399e7a52b710a1a20f1679b2ad
Reviewed-on: http://git-master/r/1221849
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>

2 years agoRevert "arm64:mm: rm swtch to ASID0 in ctxt swtch"
Rohit Khanna [Wed, 7 Sep 2016 20:00:23 +0000]
Revert "arm64:mm: rm swtch to ASID0 in ctxt swtch"

This reverts commit 584b60200b8bdcc895c8edacb94f48db5929f70a.

Change-Id: Ibe5b217521b77fa5799400b9460182e3329e1779
Signed-off-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-on: http://git-master/r/1216501
(cherry picked from commit 04c8d66d61e15198b95d54672b2f2fe047d180b3)
Reviewed-on: http://git-master/r/1223589
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agommc: card: test: Fix out of boundary array access
Xia Yang [Mon, 15 Aug 2016 21:56:51 +0000]
mmc: card: test: Fix out of boundary array access

Allocate buffer with 1 extra byte for NULL terminator.

Bug 1791602

Change-Id: I3c3658315c2cd2a1dc7be7d72953998a5275e71e
Signed-off-by: Xia Yang <xiay@nvidia.com>
Reviewed-on: http://git-master/r/1216961
(cherry picked from commit 18c5b5ac8e51d8aaff61c63823f0ec99d4a065d5)
Reviewed-on: http://git-master/r/1216963
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>

3 years agoARM64: jetson-e: disable tskin estimator
Rajkumar Kasirajan [Thu, 11 Aug 2016 03:52:06 +0000]
ARM64: jetson-e: disable tskin estimator

The jetson-e E2581 Power Measurement board is an open system
with fan. Remove Tskin estimator as it is required only for
closed system without fan.

Bug 200227303

Change-Id: I112713a3fef8cf54c573c43e3e1b8f8da94a57f1
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-on: http://git-master/r/1200927
(cherry picked from commit 6ce6778f189aba77cc02d1394603727864365522)
Reviewed-on: http://git-master/r/1219259
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoarm64: tegra21: enable Android Composite Gadget
Mark Kuo [Thu, 21 Jul 2016 10:21:05 +0000]
arm64: tegra21: enable Android Composite Gadget

This commit enables the composite gadget
in defconfig.

boot.img size increased by 91552 bytes.

Bug 200231426
Change-Id: I9b77287b9b1ab9c91d4780b95eddf2c28f873b95
Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/1209229
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoxhci-tegra: t210: wait for U3 entry in bus suspend
Henry Lin [Sun, 14 Aug 2016 17:17:11 +0000]
xhci-tegra: t210: wait for U3 entry in bus suspend

In T210, U3 entry delay is expected as LFPS dectector WAR needs to
use two mailbox commands to implement. The two mailbox commands can be
finished among 2 ms most of time. But, in worst case, they may
take up to hundreds of ms. Waiting for U3 entry in bus suspend
for some time can avoid xhci-tegra driver to stop system suspend
for long U3 entry delay frequently.

Bug 200227198

Change-Id: I989e60e829d8bd9b085495d96f70580c6d7981ab
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: http://git-master/r/1202561
(cherry picked from commit 0c9facf9ed457262e4e09994a920d5fbf547359d)
Reviewed-on: http://git-master/r/1206882
Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

3 years agodrivers: media: update imx185 driver
esen chen [Fri, 2 Sep 2016 03:02:46 +0000]
drivers: media: update imx185 driver

This change:
 Adjust proper mclk_multiplier for setting modes
 Correct line length for 10bit mode to 2200 from 2640
 Change fps/et limitation to a reasonable range
 Fix Corruption/hung issue for Bug 200226718 by using
 regmap_write instead of regmap_util_write_table_8
 for et/gain/framelength update.

Bug 200168141
Bug 200226718

Change-Id: I2ba3c4a3cdb4205b849e883e873b6bff9c414dd6
Signed-off-by: Esen Chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1215355
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

3 years agotegra-profiler: fix security vulnerability issue
Igor Nabirushkin [Thu, 18 Aug 2016 08:35:20 +0000]
tegra-profiler: fix security vulnerability issue

Tegra Profiler: some fields of structs are not initialized.
So, when they are copied to user space, stack information leaks.

Bug 1797747

Change-Id: I2b00f30fa2e3360c412573d40faf96f45c113346
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/1204252
(cherry picked from commit 9a1fa9884ad5cbb8199d0dc5a56fd5845a544d44)
Reviewed-on: http://git-master/r/1208917
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

3 years agoARM64: dts: change FPS source for LDO0 and LDO1
Venkat Reddy Talla [Fri, 19 Aug 2016 05:52:11 +0000]
ARM64: dts: change FPS source for LDO0 and LDO1

Change LDO0 and LDO1 suspend FPS source to FPS1 to turn off
both LDO0, LDO1 regulators during SC7 state to reduce power
consumption.

Bug 200212058

Change-Id: Ib1435cab6930d848bf68ef33bd91420adcc8b4e4
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1204843
(cherry picked from commit 8dcf70f69df1978c37fdfcf9ab0b457341652530)
Reviewed-on: http://git-master/r/1210618
Tested-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoPCI/ASPM: fix un-initialized variable access
Vidya Sagar [Tue, 30 Aug 2016 12:29:36 +0000]
PCI/ASPM: fix un-initialized variable access

fixes un-initialized structure variable access by
memsetting it to zero

Bug 200219196

Change-Id: I6b927e374038e3b3d349cf8330dc1215ceb7b9f0
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1210009
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agommc: host: Use SDR104 UHS mode for SDR50 mode
Bibek Basu [Tue, 6 Sep 2016 11:06:40 +0000]
mmc: host: Use SDR104 UHS mode for SDR50 mode

Select SDR104 mode for SDR50 mode by removing the NvQuirk.

Bug 1806889

Change-Id: Icc1b4035b0db33daa72023ebc2cd27cb0f25e7d6
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1215518
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: R Raj Kumar <rrajk@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agodvfs: tegra: Validate CLDVFS register address tegra-l4t-r24.2
Alex Frid [Thu, 30 Jun 2016 01:21:46 +0000]
dvfs: tegra: Validate CLDVFS register address

Bug 1783583

Change-Id: I8b0e865db02c00f741dafb473d4bd39c5075f23f
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/1201538
(cherry picked from commit 453a77c5cd9a1316307458203365f9eb5bda62de)
Reviewed-on: http://git-master/r/1201706
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>

3 years agogpu: nvgpu: gk20a: Use spin_lock for jobs_lock
Bharat Nihalani [Tue, 9 Aug 2016 13:00:12 +0000]
gpu: nvgpu: gk20a: Use spin_lock for jobs_lock

This is done to boost performance of the GPU submit time, which
is critical for compute use-cases.

Bug 200215465

Change-Id: Ic4884ee4eac910b92b84a47fdc1b2e9f26b2f1f0
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1199860
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1201496
GVS: Gerrit_Virtual_Submit

3 years agogpu: nvgpu: initialize local variable
Deepak Nibade [Thu, 4 Aug 2016 14:12:38 +0000]
gpu: nvgpu: initialize local variable

Initialize character array buf in gk20a_channel_ioctl() to zero
Keeping it uninitialized can result in leaking kernel stack
info to user space since we pass this buffer to UMD

Bug 1793398

Change-Id: Iffd654dbaca3b4e3c8fd2ac270d0febd01c165b8
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1195862
(cherry picked from commit 118809f4bd07af20df2b6c012828834695a5fccf)
Reviewed-on: http://git-master/r/1201487
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agommc: sdhci: Support polling mode.
Anubhav Jain [Wed, 3 Aug 2016 09:37:43 +0000]
mmc: sdhci: Support polling mode.

-Added support to parse the broken-cd property
using sdhci_tegra_dt_parse_pdata function.

-Removed the mmc_of_parse function call from probe,
which was added as a part of Bug 1765751

Bug 200224838

Change-Id: I30a875ecb0b0802e40215893d12bbebdb6797733
Signed-off-by: Anubhav Jain <anubhavj@nvidia.com>
Reviewed-on: http://git-master/r/1196753
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

3 years agodts: add new l4t dtb for liimx185 base jetson-tx1
esen chen [Fri, 5 Aug 2016 04:53:26 +0000]
dts: add new l4t dtb for liimx185 base jetson-tx1

New dtb for jetson-tx1-liimx185 l4t
 tegra210-jetson-cv-camera-li-mipi-adpt-a01-devkit.dtb

Bug 1793358

Change-Id: Id91e728f4718b34d44577258678af5b15eae3628
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1197957
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

3 years agoserial: tegra: correct error handling sequence to avoid system hang
Shardar Shariff Md [Tue, 2 Aug 2016 13:35:26 +0000]
serial: tegra: correct error handling sequence to avoid system hang

- Correct the error handling sequence to avoid FIFO errors
i.e handle break error first followed by other errors as
handling break error will clear other errors
- Handle break error by fifo flush as per IAS
- serial: tegra: keep rx irq disabled if there are spurious
errors and then tty buffer is exhausted and re-enable the
interrupts after 500msec.

Bug 1785924

Change-Id: I68c8322e0ff6808ebd0d38141853f88900b912b2
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1195970
(cherry picked from commit 16317988c222e831346902e28bfce5375bea3df2)
Reviewed-on: http://git-master/r/1198554
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

3 years agodrivers: camera: Fix power on function calls
Frank Chen [Tue, 2 Aug 2016 22:09:01 +0000]
drivers: camera: Fix power on function calls

Since sensor and forcuser has the same V4L2 group id,
when device s_power callback is called, the power_on
function of sensor and foucser will both be called,
even though only one of them needs to be powered on.

Switched to subdev s_power call to power on either
sensor or focuser, instead of both of them.

Bug 1792264

Change-Id: Iacae6ab92ec931cced28073589e82109b037a840
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1196342
(cherry picked from commit d67aaad60ae73c78950a403c86851ac7f81aef61)
Reviewed-on: http://git-master/r/1197577
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Tested-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>

3 years agoRevert "Revert "Revert "ARM64: tegra210: move Host1x to separate asid"""
Rajkumar Kasirajan [Wed, 3 Aug 2016 08:09:49 +0000]
Revert "Revert "Revert "ARM64: tegra210: move Host1x to separate asid"""

This reverts commit 514b257108d4f9f87c444ee8e4755d3a6a5de224.

Moving host1x to separate address space makes bpmp unstable during
lp0 suspend and resume.

Bug 200223606

Change-Id: Ia028e505d0ad1b5190b0a60fa13d026d9571dde7
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
(cherry picked from commit b3420f478296ecd1ee21553cec869b80a66e7b45)
Reviewed-on: http://git-master/r/1196637
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

3 years agoFix error code to correct pointer type
Joe Korty [Wed, 25 May 2016 12:10:46 +0000]
Fix error code to correct pointer type

To return an errno code inside a pointer,
the error code must first be converted to
the correct pointer type.

drivers/media/v4l2-core/v4l2-of.c:
In function 'v4l2_of_alloc_parse_endpoint':
drivers/media/v4l2-core/v4l2-of.c:227:10: warning:
return makes pointer from integer without
a cast [-Wint-conversion]
return -ENOMEM;

drivers/media/v4l2-core/v4l2-of.c:254:9: warning:
return makes pointer from integer without
a cast [-Wint-conversion]
return rval;

Bug 200187768

Change-Id: I757fe1f51559a0d0cda7463fd5541fac20e3a92e
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163930
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoUse correct format specifier
Joe Korty [Wed, 25 May 2016 07:04:24 +0000]
Use correct format specifier

Use %zd, not %d, to display size_t arguments

drivers/media/platform/tegra/imx091.c:2826:35:
warning: format '%d' expects argument of type 'int',
but argument 5 has type 'long unsigned int' [-Wformat=]

Bug 200187768

Change-Id: I2591203af81f5c3f64b55e8e722fdbc5a59c8de4
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163906
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoRemove unused variable
Joe Korty [Tue, 24 May 2016 10:42:50 +0000]
Remove unused variable

drivers/thermal/pwm_fan.c: In function 'pwm_fan_resume':
drivers/thermal/pwm_fan.c:1053:6:
warning: unused variable 'err' [-Wunused-variable]

Bug 200187768

Change-Id: I6fcfa249ab536d47b6b91029aedf4b2f57eda1cc
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163893
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoarm64: tegra21: emc: Make sure the DLL always has a clock
Alex Waterman [Mon, 23 May 2016 20:58:15 +0000]
arm64: tegra21: emc: Make sure the DLL always has a clock

Ensure the DLL always has a clock. If it does not then the DLL will
not be able to swap to a new clock source. That is to say the DLL
requires both the old and new clock source to be active when its
source is changed.

Bug 1655375

Change-Id: I796725b95628d7ea6753d7986af74324e9c1489b
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1152001
(cherry picked from commit e0a23c1f4a99a88b09faedd82dbdba64fc138bec)
Reviewed-on: http://git-master/r/1185062
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agodtsi: sensors: Remove restrictions to run sensors at full speed
Robert Collins [Mon, 18 Jul 2016 22:23:46 +0000]
dtsi: sensors: Remove restrictions to run sensors at full speed

- Remove frequency restrictions on gyro, accel, compass, barometer.
- Remove barometer_disabled, if currently disabled.

Bug 200191681
Bug 200201316

Change-Id: If75f10034a4c14ebb4010ed4ae3a511e0bd2ade6
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1185061
GVS: Gerrit_Virtual_Submit
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

3 years agoiio: imu: nvi v.336 Add DMP AUX support
Erik Lilliebjerg [Mon, 18 Jul 2016 04:48:59 +0000]
iio: imu: nvi v.336 Add DMP AUX support

- Add DMP support for devices on the auxiliary ports behind the MPU/ICM.  Due
  to the differences between the MPU and ICM DMPs, the auxiliary port API was
  extended that allowed the DMP dependencies to be removed from the auxiliary
  device's external drivers.
- Updated the pressure calculations for the BMP280 driver to the latest BMP280
  specification.

Bug 200191681
Bug 200201316
Bug 200195822

Change-Id: Id4338b11094f8ef00df214c14649b7bc951a6891
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1185055
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agodtsi: sensors: Remove frequency limits on accel/gyro.
Robert Collins [Thu, 7 Jul 2016 18:00:46 +0000]
dtsi: sensors: Remove frequency limits on accel/gyro.

Removes lower (10Hz) limits on accelerometer and gyro
frequency.

Bug 1768847

Change-Id: I324ff9c191902ee24f2d3e008c26246e4617c176
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1177152
(cherry picked from commit 81e14c78944d1af451d2b6078e02a056cb8f6cdd)
Reviewed-on: http://git-master/r/1185054
GVS: Gerrit_Virtual_Submit
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

3 years agoiio: imu: nvi v.334 ICM SMD
Erik Lilliebjerg [Thu, 7 Jul 2016 03:53:55 +0000]
iio: imu: nvi v.334 ICM SMD

- Fix ICM DMP FW v.2 significant motion default parameters.
- Add realtime sensor configuration for significant motion.
- Fix ICM DMP FW v.2 maximum period by limiting accelerometer slowest clock
  setting to gyros since the FW v.2 WAR requires the same speed.

Bug 1768847

Change-Id: I8e3d2574019da6e2e9a0e0e574cc33cab363d490
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1177151
(cherry picked from commit 24b210f89d2856b8ecedb5443e604788e3964680)
Reviewed-on: http://git-master/r/1185053
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agodtsi: sensors: Limit accel to 10Hz lower frequency.
Robert Collins [Wed, 6 Jul 2016 17:21:12 +0000]
dtsi: sensors: Limit accel to 10Hz lower frequency.

Limit gyro and accel to 10Hz lower frequency.  This fixes sensor
clock stability issues and passes CTS @ 100%.

Bug 1768847

Change-Id: I42601e9d2f5b7f1bc18c312919ed4ee14a90b3d4
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1176261
(cherry picked from commit c747d0e003ea1a607090deaf12aa98118d0e6627)
Reviewed-on: http://git-master/r/1185052
GVS: Gerrit_Virtual_Submit
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

3 years agovideo: tegra: host: add upper bound for num_syncpt_incrs
Deepak Nibade [Thu, 21 Jul 2016 09:22:31 +0000]
video: tegra: host: add upper bound for num_syncpt_incrs

Check if num_syncpt_incrs are not more than number of
syncpoints available

Bug 1781393

Change-Id: Iee5070c87c8db0d6c30eb55ca03ec27c7de379ee
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1184846
(cherry picked from commit d85d48ec37173633d8efbc394b2508c710a0cda1)
Reviewed-on: http://git-master/r/1191971
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>