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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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

2 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>

2 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

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 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>

2 years agoRevert "gpu: nvgpu: enable semaphore acquire timeout"
Shreshtha SAHU [Wed, 27 Jul 2016 05:21:03 +0000]
Revert "gpu: nvgpu: enable semaphore acquire timeout"

This reverts commit a4b13ca7e202a7fca576a4ba7f09b73a92bf81a2.

cudaEventSynchronize is failing due to this.

Bug 200219720
Bug 1636800

Change-Id: Id557ed30a2db2f289f8f546a5d4454ceb179caf0
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1191361
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agodrivers: camera: Fix bytesperline derivation
Bhanu Murthy V [Tue, 26 Jul 2016 22:10:08 +0000]
drivers: camera: Fix bytesperline derivation

Fix bytesperline calculation based on the
corresponding format derived with the code sent
from userspace.

Bug 200214096

Change-Id: Ic2ea7bf986e31b9177d1124142dfb115b935c24d
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1191066
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Gigon Bae <gbae@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Gigon Bae <gbae@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoiio: imu: nvi v.333 ICM DMP FW v.2
Erik Lilliebjerg [Wed, 29 Jun 2016 01:57:07 +0000]
iio: imu: nvi v.333 ICM DMP FW v.2

- Implement Invensense ICM DMP FW v.2 that fixes sensor data timing gaps.

Bug 1768847

Change-Id: I0bde444d2cdfa0721541fad40589135a37a74acd
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1172879
(cherry picked from commit c95d320e9a4b85d13261d2572a39608e1dbb5f43)
Reviewed-on: http://git-master/r/1185051
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

2 years agoiio: imu: nvi v.330 MPL520 support
Erik Lilliebjerg [Tue, 7 Jun 2016 02:19:47 +0000]
iio: imu: nvi v.330 MPL520 support

- Add sensor dependency for wake interrupt.
- Sensor mounting matrix is now globally based.

Bug 1768847

Change-Id: I24c0db40ed7ef4ff75da5b629276ee950673eb1f
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1159846
(cherry picked from commit 3a3706e3c23a2cfe50cb82581bb71223b7085a10)
Reviewed-on: http://git-master/r/1185050
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

2 years agoiio: imu: nvi v.329 Fix ICM DMP period
Erik Lilliebjerg [Sun, 29 May 2016 12:16:55 +0000]
iio: imu: nvi v.329 Fix ICM DMP period

- Fix batch period calls that were getting dropped if the ICM DMP was enabled.

Bug 200199302

Change-Id: Iec7f9e4a8488890409d916bfecdaa98d12ac19f8
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1155678
(cherry picked from commit f137e7d5218a2f2bd11479e3308eb701cdbe6a5b)
Reviewed-on: http://git-master/r/1185049
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

2 years agodriver: media: i2c: update imx185 driver
esen chen [Wed, 27 Jul 2016 02:27:43 +0000]
driver: media: i2c: update imx185 driver

Bug 200168141

DEPENDS ON: <http://git-master/r/1191198>

Change-Id: If8f93ab60dc2d5508c7403daadccde7762f87780
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1191244
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

2 years agoarm64: dts: update imx185 dt
esen chen [Wed, 27 Jul 2016 02:03:33 +0000]
arm64: dts: update imx185 dt

Adding support for new sensor mode type
Remove WDR sensor mode
Enable these modes:
 12bit 30fps
 10bit 30fps
 12bit 60fps
 10bit 60fps

Bug 200168141

DEPENDS ON: <http://git-master/r/1191244>

Change-Id: If87fb9e2ee673d4b3dfdc71fabbd725aed193c3c
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1191198
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agogpu: nvgpu: cancel job clean up before aborting channel
Deepak Nibade [Fri, 1 Jul 2016 07:05:27 +0000]
gpu: nvgpu: cancel job clean up before aborting channel

It is possible that when we abort the channel, we have
job clean up worker running, which could race with abort
and sometimes result in below panic

[  245.483566] Unable to handle kernel paging request at virtual address
800000000
...
[  245.548991] PC is at gk20a_channel_abort_clean_up+0xb8/0x140
[  245.554683] LR is at gk20a_channel_abort_clean_up+0xac/0x140
...
[  247.301860] [<ffffffc000479390>]
gk20a_channel_abort_clean_up+0xb8/0x140
[  247.312853] [<ffffffc0004794d4>] gk20a_channel_abort+0xbc/0xc8
[  247.322970] [<ffffffc0004794f8>] gk20a_disable_channel+0x18/0x30
[  247.333267] [<ffffffc000479628>] gk20a_free_channel+0x118/0x584
[  247.343473] [<ffffffc000479aa0>] gk20a_channel_close+0xc/0x14
[  247.353479] [<ffffffc000479b80>] gk20a_channel_release+0xd8/0x104

Fix this by cancelling the job clean up worker before aborting
the channel

Bug 1777281
Bug 200209467

Change-Id: Ic24c7c03b27cfb5cd164a52efdb1e2813a41a10a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1174416
(cherry picked from commit 1002f40a3bb54db6e40be77b836437ccb2f3aa96)
Reviewed-on: http://git-master/r/1190946
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agovideo: tegra: host: fix integer overflow
Deepak Nibade [Mon, 27 Jun 2016 08:43:26 +0000]
video: tegra: host: fix integer overflow

Below addition on 32 bit architecture machines could
cause integer overflow since we will assign overflowed
value to "num_unpins"
s64 num_unpins = num_cmdbufs + num_relocs

Fix this and other calculations by explicitly typecasting
variables to u64 first

Bug 1781393

Change-Id: Ib7d9c0be4ac61dc404512b4bb0331aa20a6978bc
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1171748
(cherry picked from commit 8f00b96c137b9c4cb43a8dbe2e153fae49524113)
Reviewed-on: http://git-master/r/1190752
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agovideo: tegra: host: fix possible overflow with num_syncpt_incrs
Deepak Nibade [Mon, 27 Jun 2016 08:33:15 +0000]
video: tegra: host: fix possible overflow with num_syncpt_incrs

We allocate below without checking if num_syncpt_incrs
is valid or not
struct nvhost_ctrl_sync_fence_info pts[num_syncpt_incrs];

If UMD passes a negative value in num_syncpt_incrs, then
it is possible to corrupt the stack

Hence, first check if num_syncpt_incrs is valid (i.e.
not negative)
And then allocate the array dynamically using kzalloc
instead of allocating it on stack

Bug 1781393

Change-Id: I5389fd271149b457f63831a41c104c9814299ddf
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1171747
(cherry picked from commit 07fb347b4060a888b19df3524f36fcf7974a79d1)
Reviewed-on: http://git-master/r/1190751
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agodriver: media: tegra: add sensor mode cid
esen chen [Tue, 26 Jul 2016 04:54:46 +0000]
driver: media: tegra: add sensor mode cid

Add V4L2_CID_SENSOR_MODE_ID to help sensor modes setting
Using use_sensor_mode_id in dt enable PCL to set mode id

Bug 200168141

Change-Id: I6d90fcbcb709e9e5d8cc8fe2bbd906005f8d4e70
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1190587
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoiio: imu: Invensense: Update 5.3.0.K-52 to latest tool chain.
Robert Collins [Thu, 23 Jun 2016 20:47:56 +0000]
iio: imu: Invensense:  Update 5.3.0.K-52 to latest tool chain.

Bug 1767467

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

2 years agoiio: imu: Invensense: Update to official 5.3.0.K-52 code base.
Robert Collins [Thu, 23 Jun 2016 20:25:51 +0000]
iio: imu: Invensense:  Update to official 5.3.0.K-52 code base.

Bug 1767467

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

2 years agoiio: imu: Invensense: Update to official 5.3.0 code base.
Robert Collins [Tue, 24 May 2016 17:00:17 +0000]
iio: imu: Invensense:  Update to official 5.3.0 code base.

Bug 1767467

Change-Id: I49c74bfc13871d2004b534ba93824094abc0d82e
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1151329
(cherry picked from commit 78a76b4ae3de465a26e66a661e979fe339091ec9)
Reviewed-on: http://git-master/r/1189577
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agomisc: tegra-profiler: Fix armv7 PMU setup.
Alexey Kravets [Thu, 29 Oct 2015 08:08:10 +0000]
misc: tegra-profiler: Fix armv7 PMU setup.

Bug 1694191
Bug 200142156

Change-Id: I72c21c15a4c29a1b91b0dd798e9294ac341cc395
Signed-off-by: Alexey Kravets <akravets@nvidia.com>
Reviewed-on: http://git-master/r/824698
(cherry picked from commit e97a74e0dbeaabaa82d3d7d759096f530961761d)
Reviewed-on: http://git-master/r/1176876
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1189519
GVS: Gerrit_Virtual_Submit
Tested-by: Anatoly Nikiforov <anikiforov@nvidia.com>

2 years agodriver: media: i2c: Update IMX185 driver
Frank Chen [Tue, 12 Jul 2016 21:31:02 +0000]
driver: media: i2c: Update IMX185 driver

Switch to new driver model which takes raw
Gain/Frame Rate/Exposure from PCL and do all
the necessary calculation to get the final
register settings.

Bug 1789332
Bug CHWI-246

Change-Id: I27bfcb6d6d1263dfe95e5f463fdd9ed57330b235
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1181636
Reviewed-by: Esen Chen <esenc@nvidia.com>
Tested-by: Esen Chen <esenc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoarm64: dts: Update IMX185 DT settings
Frank Chen [Sun, 17 Jul 2016 22:03:07 +0000]
arm64: dts: Update IMX185 DT settings

1. Move UseDecibelGain flag from mode setting to
   global settins
2. Update gain decibel range
3. Update FPS range

Bug 1789332
Bug CHWI-246

Change-Id: Iba3cfcc44f0606fc3dc691b1f6981b59302fb5fb
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1183842
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agomisc: tegra-profiler: enable multiprocess support
Arul Sekar [Tue, 10 May 2016 18:21:24 +0000]
misc: tegra-profiler: enable multiprocess support

- support multi process profiling requests from user
- uses trace_all_tasks parameter
- skip kernel swapper (pid == 0) tasks

Bug 1764640

Change-Id: I1f0e2d4432d095b1e6e4db0781be9ce355bf23ed
Signed-off-by: Arul Sekar <aruls@nvidia.com>
(cherry picked from commit f0799d139c2d32ce44efd4b544fca20fed7c08af)
Reviewed-on: http://git-master/r/1161158
Tested-by: Anatoly Nikiforov <anikiforov@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit 6ff5f51d2604b5a443f898b2f7c1a2cac34edc10)
Reviewed-on: http://git-master/r/1175198

2 years agomisc: tegra-profiler: support multiple PMUs
Alexey Kravets [Wed, 7 Oct 2015 11:47:24 +0000]
misc: tegra-profiler: support multiple PMUs

Support multiple PMUs in tegra profiler module.
Allow per-CPU capabilities query and per-CPU PMU setup.

Bug 1694191
Bug 200142156

(cherry picked from commit 3f18b6372263fb76aebfc66a5bbe76c44c4a5daa)
Change-Id: I10e1779aa76814b1615610f1acdb700875349607
Signed-off-by: Alexey Kravets <akravets@nvidia.com>
Reviewed-on: http://git-master/r/819795
(cherry picked from commit 7bf627d61f4b724c22d02aef609fd60507a2b593)
Reviewed-on: http://git-master/r/824265
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1175197
Tested-by: Anatoly Nikiforov <anikiforov@nvidia.com>

2 years agoi2c: tegra: fix unknown interrupt issue after ARB lost
Shardar Shariff Md [Mon, 9 Nov 2015 05:50:03 +0000]
i2c: tegra: fix unknown interrupt issue after ARB lost

For i2c transaction with repeat start (We post 7W [header + data
for Write followed by read in FIFO]) and unmask required interrupts.
But HW starts processing if there are atleast 3W in FIFO and during
this time if ARB lost error occurs then current data in FIFO is cleared
and chance of posting remaining data after FIFO is cleared. Now
SW handles the ARB lost error as interrupts are enabled later after
posting all packets and after clearing the ARB lost interrupt the
packet mode is disabled(Normal mode), which causes the Normal mode
interrupt(Unknown interrupt in case of packet mode) due to stale
data in fifo.

- To fix this, enable (unmask) error interrupt before posting the
packets into FIFO and clear the packet mode disable before clearing
ARB lost error also for other errors(NACK/FIFO overflow).

- Dont issue bus clear for ARB lost error if bus is operating in
multimaster mode.

Bug 200151590
Bug 200151064

Change-Id: I20d19a25aee400dd0a6517bdcaf87e2c84b0770a
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/842348
(cherry picked from commit 7c8f33dec55fc63286acb35bee3f175f2f989189)
Reviewed-on: http://git-master/r/1190656
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

2 years agoi2c: tegra: override slcg for Master core logic
Shardar Shariff Md [Tue, 3 Nov 2015 21:09:10 +0000]
i2c: tegra: override slcg for Master core logic

- override(disable) 2nd-level clock for I2C master
core logic i.e keeping 2nd-level clock always ON
when bus is operating in multi-master mode.

Bug 200146630

Change-Id: I04840c2a0453ecbf5c10a9ea0e0f3d0523c5071a
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/842347
(cherry picked from commit 115380a0fff228cb606e135e703d87c297070835)
Reviewed-on: http://git-master/r/1190655
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

2 years agoarch: arm64: boot: dts: T210 camera devnames
Bhanu Murthy V [Mon, 18 Jul 2016 22:49:34 +0000]
arch: arm64: boot: dts: T210 camera devnames

Add devnames instead of devnodes to improve
flexibility in binding userspace and kernel drivers.

Bug 1758789
Bug 200219854

Change-Id: I680a5a968e1c5dc32783470dfcc881b791491934
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1151351
(cherry picked from commit 457c67e29e7a5892bb6ace057059e803470fd83d)
Reviewed-on: http://git-master/r/1183082
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agodriver: media: tegra: Update tegra camera_common
Frank Chen [Sat, 16 Jul 2016 00:33:08 +0000]
driver: media: tegra: Update tegra camera_common

1. Undefine standard V4L2 GAIN/Exposure CIDs and
switch to our own custom CIDs.

2. Add helper function to read mode specific info
from device tree.

Jira: CHWI-246

Bug 200168141

DEPENDS ON: <http://git-master/r/1176440>

Change-Id: I7bfd69a030031f8b450472ee9124cf08a030b1a9
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1183834
Reviewed-by: Esen Chen <esenc@nvidia.com>
Tested-by: Esen Chen <esenc@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agogpu: nvgpu: suppress prints in submit path
Deepak Nibade [Tue, 24 May 2016 08:21:26 +0000]
gpu: nvgpu: suppress prints in submit path

When we run out of gpfifo space or private command buffer
space, we have error spew like below :
__gk20a_channel_syncpt_incr: not enough priv cmd buffer space
gk20a_submit_channel_gpfifo: fail

Dumping these prints to UART cause increase in submit
latencies

But on these failures, we return -ENOSPC to UMD and then
UMD retries the submit, hence it might be unnecessary to dump
these prints

Hence, remove the error prints of insufficient space
and use gk20a_dbg_fn() instead of gk20a_err() to print failure
in gk20a_submit_channel_gpfifo()

Bug 200202653

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

2 years agothermal: Avoid scheduling work during poweroff
Rohit Vaswani [Wed, 20 Jul 2016 02:01:17 +0000]
thermal: Avoid scheduling work during poweroff

During a critical thermal trip, orderly_poweroff is called.
However, if the userspace is slow to react to poweroff (systemd),
and the thermal zone is configured with polling mode because of
either polling_delay or passive_delay, thermal_core may end up
in calling orderly_poweroff multiple times.
This eventually slows the userspace even more by
scheduling overwhelming number of threads in the system.

Relevant dump_stack spew during the shutdown process:
 dump_backtrace+0x0/0xf4
 show_stack+0x14/0x1c
 dump_stack+0x20/0x28
 handle_critical_trips+0x80/0xa0
 handle_thermal_trip+0x40/0x64
 thermal_zone_device_update+0xf0/0x110
 thermal_zone_device_check+0x10/0x18
 process_one_work+0x274/0x430
 worker_thread+0x184/0x294
 kthread+0xc0/0xc8

We should not try to spawn-off more threads once we have
decided to shutdown i.e. we should disable polling mode
once it is known that a critical trip is going to result
in a poweroff. This patch does that by setting the polling
and passive delay to zero which cancels the repeated work
and allows userspace to shutdown.

Change-Id: Ia8714c288f9a332dc8ea7a3ffc7156fc6095ed9e
Signed-off-by: Rohit Vaswani <rvaswani@nvidia.com>
Reviewed-on: http://git-master/r/1183768
Reviewed-by: Navneet Kumar <navneetk@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Wen Yi <wyi@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agodrivers: camera: Fix v4l2 driver compliance
Bhanu Murthy V [Tue, 19 Jul 2016 01:00:42 +0000]
drivers: camera: Fix v4l2 driver compliance

Fix s/g/query dv timings compliance, report not
supported if the sub device on CSI does not support
the timing fops.
Fix s/g crop fops for sub devices which does not
support cropping.
Fix subdev used in s/g param fops.

Bug 1675242
Bug 200214096

Change-Id: If262ca8038694ffb05273a99268b86984b1532c1
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1183150
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agodts: plugin-manager: Fix ov5693 csi port index
Frank Chen [Wed, 20 Jul 2016 21:54:22 +0000]
dts: plugin-manager: Fix ov5693 csi port index

Correct csi port index for ov5693 sensor. Incorrect
index will cause dpd and mfi failures.

Bug 200220580

Change-Id: Ie9de7e02db739c45dba0ffba56f0070623b1a024
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1184514
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agoarm64: dts: Add new dts file for Darcy with new memory
Daniel Fu [Wed, 8 Jun 2016 13:18:19 +0000]
arm64: dts: Add new dts file for Darcy with new memory

Bug 200203997

Change-Id: I17bfe732dd71c7d59a5ef70665c8dd07f9f86546
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/1161188
(cherry picked from commit 790caf00c2ef2e025ed8651c0aec5c8e4539a545)
Reviewed-on: http://git-master/r/1183414
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agodrivers: camera: Ignore resolution errors for CSI
Bhanu Murthy V [Thu, 14 Jul 2016 17:01:06 +0000]
drivers: camera: Ignore resolution errors for CSI

Ignore only frame height or width short/long errors
from CSI. Resolution mismatch can occur the actual lines
can be inclusive of embedded data lines which application
ignores anyway. Report failure only when the pixel parser
or CIL status is wrong.

Bug 1708456

Change-Id: I96fda6b6802e1497de2d5ca074c416d3b6ea5e40
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1181511
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agodrivers: camera: support maxframerate property
Bhanu Murthy V [Thu, 7 Jul 2016 01:24:09 +0000]
drivers: camera: support maxframerate property

Add check for maxframerate to distinguish different
mode tables needed by sensor for optimal use.

Bug 1769654

Change-Id: If8db48af46df984e440fff3472f0ea93145d5a01
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176484
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agoarm64: dts: imx274: enable multiple sensor modes
Josh Kuo [Thu, 7 Jul 2016 08:23:26 +0000]
arm64: dts: imx274: enable multiple sensor modes

enable multiple sensor modes for imx274.

support 4k@60fps, 4k@30fps and 1080p@60fps

Bug 1769654

Change-Id: Id25bc8279f273add5df1d76e0b5ff7de19224462
Signed-off-by: Josh Kuo <joshk@nvidia.com>
Reviewed-on: http://git-master/r/1176815
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agodrivers: imx274: Add maxfps properties
Bhanu Murthy V [Thu, 7 Jul 2016 01:25:36 +0000]
drivers: imx274: Add maxfps properties

Add max fps properties for imx274 driver

Bug 1769654

Change-Id: I063ef6f0ebb5b98625a047d0c2e4297b6a2bb532
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176485
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agoinclude: media: Add max fps properties
Bhanu Murthy V [Thu, 7 Jul 2016 01:22:12 +0000]
include: media: Add max fps properties

Add maxfps default and current format fields
to camera common data to identify proper
sensor mode id.

Bug 1769654

Change-Id: I10b09b437a97f80f16d5e625b50a99bc819c4670
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176483
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoinclude: media: Add maxframerate field
Bhanu Murthy V [Thu, 7 Jul 2016 01:19:01 +0000]
include: media: Add maxframerate field

Add maxframerate field as part of pixelformat
to distinguish different framerate ranges support
as two different modes in sensor drivers.
e.g: 4k@(0-30) and 4K@(0-60).
More parameters might be changed in sensor with a
framerate range for optimal usage.

Bug 1769654

Change-Id: I80e6a36911e802d9f7b17b61248b6268f9b0439d
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176482
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agomedia: tc358840: BUG_ON for overrunning array
Ahung Cheng [Wed, 6 Jul 2016 05:16:59 +0000]
media: tc358840: BUG_ON for overrunning array

In print_avi_infoframe, it allocates array buffer of 17 bytes.
It might run into a case to access array buffer at byte position 28.
in hdmi_infoframe_unpack when switch case value is SPD.

bug 200192413

Change-Id: I3624d471353f8c5b0ed317fc30e61beee7290439
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1176086
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agodrivers: imx274: adding multiple sensor modes
Josh Kuo [Thu, 23 Jun 2016 05:52:39 +0000]
drivers: imx274: adding multiple sensor modes

adding multiple sensor modes for imx274.

support 4k@60fps, 4k@30fps and 1080p@60fps

Bug 1769654

Change-Id: I1753d63e0c8adaafc59951de8c67b6314da24304
Signed-off-by: Josh Kuo <joshk@nvidia.com>
Reviewed-on: http://git-master/r/1170059
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoarm64: tegra21: enable CONFIG_SWAP
Shreshtha SAHU [Wed, 20 Jul 2016 04:42:18 +0000]
arm64: tegra21: enable CONFIG_SWAP

boot.img has increased by 38592 bytes.

Bug 1790199

Change-Id: Icb37ba97da8003cc70e2f205c1104ac6a926c54e
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1183845
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm: arm64: boot: dts: gang_mode
Ahung Cheng [Wed, 8 Jun 2016 03:34:44 +0000]
arm: arm64: boot: dts: gang_mode

Add gang_mode entry for TC358840

bug 1772273

Change-Id: Ib245d1fb1437fde8c0fce7e64dd0eed1329fdd8d
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
(cherry picked from commit 5e9c441b7a7857d8e22cdd95e08daaf8c898b46b)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1165728
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agodrivers: media: camera: Gang Mode from device tree
Ahung Cheng [Fri, 3 Jun 2016 10:22:05 +0000]
drivers: media: camera: Gang Mode from device tree

Add support for reversing CSI mapping by looking for a new entry,
gang-mode. Set gang mode to GANG_MODE_R_L, instead of default
GANG_MODE_L_R, to swap input ports.

bug 1772273

Change-Id: Ia2be129354e4aca3c7236125667f18e950061f63
Reviewed-on: http://git-master/r/1158678
(cherry picked from commit b595683f9b562b55323ed185e3a4405a31b722b5)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
(cherry picked from commit 7cc03562332180e21090c288ffaa5dfd89ec2df3)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1165727
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>

2 years agov4l2-event: v4l2_event_queue: do nothing if vdev == NULL
Hans Verkuil [Tue, 23 Jun 2015 09:20:23 +0000]
v4l2-event: v4l2_event_queue: do nothing if vdev == NULL

If the vdev pointer == NULL, then just return.

This makes it easier for subdev drivers to use this function without having to
check if the sd->devnode pointer is NULL or not.

Bug 1770474

Change-Id: I4d9798b58ea13e987dcf50442a96694a8f803291
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: http://git-master/r/1154256
(cherry picked from commit 4e09f1b068c7f67926258f6b0a802fe5691ccd4b)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1165707
Reviewed-by: Hayden Du <haydend@nvidia.com>

2 years agoARM64: DTS: t210: sdhci pd disable
Bitan Biswas [Mon, 15 Feb 2016 11:41:48 +0000]
ARM64: DTS: t210: sdhci pd disable

sdmmc power domain disabled for T210

bug 200155814

Change-Id: Ie0ae38b517354a8223e5fd8ecf89c60ab65d1a70
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1011959
(cherry picked from commit 544ed2d95a1fd5564ad072a91ba1a156ff2d41b0)
Reviewed-on: http://git-master/r/1177604
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agommc: sdhci: allow clock enable in suspend sequence
Bitan Biswas [Wed, 17 Feb 2016 12:24:10 +0000]
mmc: sdhci: allow clock enable in suspend sequence

Some host with SDHCI_QUIRK2_NON_STD_RTPM deviation
need to enable clock in the suspend sequence.
This change enables such platforms to
suspend properly.

bug 200155814

Change-Id: I37969748660965c4b4097837e9b9c6bb7a593b4e
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1012839
(cherry picked from commit e27946db4cc054ab016459e3e16f3e68a51f0872)
Reviewed-on: http://git-master/r/1177603
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agommc: sdhci: mmc detect change timeout update
Bitan Biswas [Fri, 8 Jul 2016 11:15:44 +0000]
mmc: sdhci: mmc detect change timeout update

Higher mmc detect change timeout is needed
even if card is removed during suspend

bug 200196862

Change-Id: Ie771af36324d9e5003d1a4167f306c765848b490
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1177591
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoFix uninitialized variable
Joe Korty [Wed, 25 May 2016 13:09:41 +0000]
Fix uninitialized variable

Quiet gcc warning by giving 'in6' an initial
value of NULL.

Technically this is wrong, but there seems to
be no path through the function where 'in6' is
not set then used.  If that is wrong, we will
get a NULL pointer kernel panic.  Though bad,
that is better then the current situation,
where some random spot in the kernel gets
modified via the following of an undefined
pointer value in 'in6'.

include/net/ipv6.h:417:34: warning:
'in6' may be used uninitialized in this function
[-Wmaybe-uninitialized]
return ((ul1[0] ^ ul2[0]) | (ul1[1] ^ ul2[1])) == 0UL;

net/ipv4/tcp.c:3513:19: note: 'in6' was declared here
struct in6_addr *in6;

Bug 200187768

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

2 years agoRemove unused variables and labels
Joe Korty [Wed, 25 May 2016 13:05:34 +0000]
Remove unused variables and labels

drivers/media/i2c/imx185.c:548:6:
warning: unused variable 'i' [-Wunused-variable]
drivers/media/i2c/imx185.c:644:1:
warning:
label 'fail' defined but not used [-Wunused-label]
drivers/media/i2c/imx185.c:999:7:
warning:unused variable 'dt_name' [-Wunused-variable]
drivers/media/i2c/imx185.c:560:9:
warning: 'gain' may be used uninitialized in this
function [-Wmaybe-uninitialized]

Bug 200187768

Change-Id: I6e66765abe97fc8923ff48c778a5a3befddb4fc1
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163943
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agoSilence uninitialized variable warning
Joe Korty [Wed, 25 May 2016 12:58:56 +0000]
Silence uninitialized variable warning

When we go through the switch() case
where 'send_direct' is not initialized, the
code later on that uses 'send_direct' will
be skipped over.  So it is safe to set this
'send_direct' to any value we want in order
to quiet this gcc warning.

net/mac80211/cfg.c: In function 'ieee80211_tdls_mgmt':
net/mac80211/cfg.c:3225:5: warning:
'send_direct' may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (send_direct) {

Bug 200187768

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

2 years agoAdd default case in switch statement
Joe Korty [Wed, 25 May 2016 12:57:27 +0000]
Add default case in switch statement

Provide a reasonable default value
(ie, the original value) for smps_mode
when a new value is not being assigned.

This forces the value of 'changed' to be correct
when no attempt at changing is being done to
'smps_mode'.

net/mac80211/ht.c: In function
'ieee80211_ht_cap_ie_to_sta_ht_cap':
net/mac80211/ht.c:232:5: warning:
'smps_mode' may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (smps_mode != sta->sta.smps_mode)

Bug 200187768

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

2 years agoFix 'const' propagation prob
Joe Korty [Wed, 25 May 2016 12:47:49 +0000]
Fix 'const' propagation prob

The strings pointed to are unchanging while in use,
so add a 'const' to the string definition.

drivers/usb/misc/usb_nvshieldled.c:
In function 'nvshieldled_probe':
drivers/usb/misc/usb_nvshieldled.c:394:7: warning:
passing argument 3 of 'of_property_read_string' from
incompatible pointer type [-Wincompatible-pointer-types]
       &edp_name)) {

In file included from drivers/usb/misc/usb_nvshieldled.c:26:0:
include/linux/of.h:268:12: note: expected 'const char **' but
argument is of type 'char **'
extern int of_property_read_string(struct device_node *np,

Bug 200187768

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

2 years agoFix the casting issue
Gaurav Singh [Wed, 25 May 2016 12:45:10 +0000]
Fix the casting issue

Allow a 64 bit pointer to be cast and put into a
32-bit integer, when that pointer points to a
location within a 32 bit userspace.

Normally this is a very bad thing to do, the compiler
is right to warn us about this, but in this very
specific case, it is OK.

In file included from fs/compat_binfmt_elf.c:128:0:
fs/binfmt_elf.c: In function 'create_elf_tables':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/elf.h:143:7:
warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
(elf_addr_t)current->mm->context.vdso);

fs/binfmt_elf.c:216:26: note:
in definition of macro 'NEW_AUX_ENT'
elf_info[ei_index++] = val;

fs/binfmt_elf.c:226:2: note:
in expansion of macro 'ARCH_DLINFO'
ARCH_DLINFO;

Bug 200187768

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

2 years agoFix uninitialized variable
Joe Korty [Wed, 25 May 2016 12:56:24 +0000]
Fix uninitialized variable

sound/soc/codecs/rt5639.c: In function 'rt5639_pll_calc':
sound/soc/codecs/rt5639.c:2833:19: warning:
'm_t' may be used uninitialized in this
function [-Wmaybe-uninitialized]
 pll_code->m_code = m;

Bug 200187768

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

2 years agoFix kernel warnings
Joe Korty [Wed, 25 May 2016 12:54:57 +0000]
Fix kernel warnings

1) rt5659_enable_push_button_irq() is not yet being
used, so comment it out with #ifdef FIXME.
2) Give mt_t an initial value of zero, for those
paths where it is not initialized.

sound/soc/codecs/rt5659.c:1314:13: warning:
'rt5659_enable_push_button_irq' defined but
not used [-Wunused-function]
static void
rt5659_enable_push_button_irq(struct snd_soc_codec *codec,

sound/soc/codecs/rt5659.c: In function 'rt5659_pll_calc':
sound/soc/codecs/rt5659.c:3636:19: warning:
'm_t' may be used uninitialized in this
function [-Wmaybe-uninitialized]
pll_code->m_code = m;

Bug 200187768

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

2 years agommc: sdhci: Support polling mode
Arun Kannan [Thu, 14 Jul 2016 00:58:16 +0000]
mmc: sdhci: Support polling mode

Add support for broken-cd property in DT.

Bug 1765751

Change-Id: I5196de66ce9458971d7d8bf5f34f5c1351477f6a
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/1181053
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kamal Balagopalan <kbalagopalan@nvidia.com>

2 years agousb: gadget: xudc: enable RX detector control
Mark Kuo [Mon, 23 May 2016 11:02:00 +0000]
usb: gadget: xudc: enable RX detector control

Enable receiver detector control when necessary.

Bug 200162414
Bug 200179626

Change-Id: Ief7aeb0556cd7f6f4bd308f8c715ef68acf86b4b
Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Signed-off-by: Hans Yang <hansy@nvidia.com>
Reviewed-on: http://git-master/r/1169998
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoxhci-hcd: add success/failure soft retry counters
JC Kuo [Wed, 4 May 2016 11:30:39 +0000]
xhci-hcd: add success/failure soft retry counters

This commit adds counters for successful and failed soft retry
attempts.

bug 200162414

Change-Id: I7406cea4368da85c78c8fe350398031fc8121015
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/1169997
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoxhci-tegra: t210: support XHCI "soft retry"
JC Kuo [Tue, 22 Dec 2015 13:33:15 +0000]
xhci-tegra: t210: support XHCI "soft retry"

This commit implements a TEGRA210 XHCI specific programming sequence
which needs to be done along with "soft retry".

Verified E2220-ERS.

new added
- wait for U0 when is going to assert clame_en_early, timeout in 300us

Bug 200162414

Change-Id: I9b9e1eeb39d259416c199819808020c48171ab57
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/1169996
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoxhci-hcd: support soft retry on SS transfer error
JC Kuo [Sun, 20 Dec 2015 06:37:02 +0000]
xhci-hcd: support soft retry on SS transfer error

This commit implements XHCI "soft retry" for SuperSpeed endpoints which
encounters transfer errors.
When transfer error happens on an SuperSpeed endpoint, XHCI driver will
1. queue a "reset endpoint" command with TSP=1 (Transfer State Preserve)

2. invoke a HCD driver specific callback "->endpoint_soft_retry()" to let
HCD driver has a chance to configure its hardware

3. ring door bell for the endpoint upon seeing the command completion

bug 200162414

Change-Id: I19df13614f794437c7f4d4369dbdaed13e1da85a
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/1169995
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoplatform: tegra: padctl: add receiver detector API
Mark Kuo [Mon, 23 May 2016 09:52:37 +0000]
platform: tegra: padctl: add receiver detector API

Support clamp_en_early and receiver detector controls.

A copy of JC's original work at http://git-master/r/#/c/1141282/3 on
tegra_usb_pad_ctrl.c

Bug 200162414
Bug 200179626

Change-Id: I8a29f7d90bfedaaa1b2609f46f511754eaa1e71f
Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-on: http://git-master/r/1169994
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agovideo: tegra: dc: sysfs for HDMI AVI content type
Ahung Cheng [Tue, 14 Jun 2016 04:43:47 +0000]
video: tegra: dc: sysfs for HDMI AVI content type

Updated avi infoframe would be picked up by HW for next frame.

Sysfs node:
/sys/devices/platform/host1x/tegradc.1/hdmi_config/it_content_type
Value:
        0x0 = HDMI_AVI_IT_CONTENT_GRAPHICS,
        0x1 = HDMI_AVI_IT_CONTENT_PHOTO,
        0x2 = HDMI_AVI_IT_CONTENT_CINEMA,
        0x3 = HDMI_AVI_IT_CONTENT_GAME,
        0x4 = HDMI_AVI_IT_CONTENT_NONE, (Default)

bug 1772096

Change-Id: I9c9f79dcf0b6a9ff192ad0d457c55f38e21c2cfd
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1164025
(cherry picked from commit 708f5ad20644a2946f3e936e8c267333294d6408)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1170952
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agodrivers: imx2xx: Fail probe if device unavailable
Bhanu Murthy V [Wed, 13 Jul 2016 01:40:38 +0000]
drivers: imx2xx: Fail probe if device unavailable

Return error if otp read or fuse id read fails
Turn off power before returning error and remove
check for device not available during power off as
it's already verified during power on.

Bug 1784114

Change-Id: Id217b87fb8352c426f68468b1520da9520b0dcc7
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1180011
(cherry picked from commit 7ecab59b36e15224e0ea3901055be20794f61f6e)
Reviewed-on: http://git-master/r/1180977
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>