]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/log
hercules2020/nv-tegra/linux-4.4.git
6 years agoBluetooth: hci_uart: prevent kernel crash due to race condition
Dipen Patel [Fri, 12 Jan 2018 21:27:45 +0000 (13:27 -0800)]
Bluetooth: hci_uart: prevent kernel crash due to race condition

There is a race condition during tty close between
cancel_work_sync and hci_uart_tx_wakeup where
hci_uart_write_work may still be scheduled after call
to cancel_work_sync which causes kernel null reference
crash as hci_uart_tty_close frees the required resources

locking out hci_uart_tty_close, hci_uart_tx_wakeup and
work queue along with new flag HCI_UART_PROTO_READY
will prevent kernel crashes and race condition

Bug 200373122

Change-Id: If7c788a934ebf11a1498364db527c850a3105409
Reviewed-on: https://git-master.nvidia.com/r/1637439
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dipen Patel <dipenp@nvidia.com>
Tested-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agolocking: percpu-rwsem: export percpu_free_rwsem function
Dipen Patel [Fri, 12 Jan 2018 21:25:56 +0000 (13:25 -0800)]
locking: percpu-rwsem: export percpu_free_rwsem function

Export for percpu_free_rwsem function for the external modules

Bug 200373122

Change-Id: Iec66aefc264e0c1050ee1b62e4d6d64e179bb298
Reviewed-on: https://git-master.nvidia.com/r/1637438
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dipen Patel <dipenp@nvidia.com>
Tested-by: Dipen Patel <dipenp@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoote_device: reduce verbosity of TLK print
Mihir Joshi [Mon, 18 Dec 2017 19:23:13 +0000 (11:23 -0800)]
ote_device: reduce verbosity of TLK print

Due to run time TOS detection support, we need to verify whether TLK
node is enabled in the DT or not before any TOS related operation.

For that, get_tlk_device_node() API is used internally. If TLK node is not
present it outputs an error message in dmesg which has no relevance from
end user's POV.

This change reduces verbosity of that message so that it doesn't spam the
UART if non-TLK TOS is flashed.

Bug 200366478
Tests GVS

Change-Id: I304f0d87930c3725e5babde0643903d7a4f0e0e5
Signed-off-by: Mihir Joshi <mihirj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1620551
Reviewed-by: Hayden Du <haydend@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers:camera: Update cameras to use common init
Josh Kergan [Wed, 25 Oct 2017 01:31:28 +0000 (18:31 -0700)]
drivers:camera: Update cameras to use common init

All cameras were doing the same setup and cleanup. This common
code was moved to camera_common and now all cameras should behave
the same after probe finishes.

JIRA:
Jira CHWI-1369

NvBugs:
Bug 200368584

Change-Id: If45351cf051e08015d2edb118a0ee2d1630a72da
Signed-off-by: Josh Kergan <jkergan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1585024
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1619031

6 years agodrivers:camera: Provide common setup/tear-down
Josh Kergan [Tue, 24 Oct 2017 23:12:54 +0000 (16:12 -0700)]
drivers:camera: Provide common setup/tear-down

Currently most cameras do the same steps during camera setup and
then these should be unset when the driver is unloaded. This change
moves the common setup and tear down into camera common. This helps
make the camera drivers cleaner and make extending functionality
for all sensors easier. It also takes care of sensor properties
stored in the DT so that they are parsed during the sensor
initialization rather than during channel setup.

 * Create common setup/tear down function for sensors
 * Parse DT for sensor properties during sensor initialization
   rather than channel setup.

JIRA:
Jira CHWI-1369

NvBugs:
Bug 200368584

Change-Id: I85fc8e9272e0289c0d2de29b8809480a56d2d515
Signed-off-by: Josh Kergan <jkergan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1585023
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1619030

6 years agodrivers:camera: Update fmt to be sensor specific
Josh Kergan [Wed, 25 Oct 2017 01:35:01 +0000 (18:35 -0700)]
drivers:camera: Update fmt to be sensor specific

V4L2 driver was providing all the possible color_fmts supported
by the VI, when it should have been providing only the values used
by that sensor. This fix updates the driver to check the formats
supported by the VI with the formats supported by the sensor as
described in the sensor_properties.

JIRA:
Jira CHWI-1379

NvBugs:
Bug 200368584

Change-Id: Ia7f2a7c5080eeb0c65fd10fa16dadb30195a6b29
Signed-off-by: Josh Kergan <jkergan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1613713
Reviewed-on: https://git-master.nvidia.com/r/1618498
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodevfreq: Clean up podgov parameter initialization
Peter Boonstoppel [Mon, 1 May 2017 18:08:57 +0000 (11:08 -0700)]
devfreq: Clean up podgov parameter initialization

Remove support for VIC
Remove checks for chipid
Remove unused througput parameters

Jira NVGPU-20

Change-Id: I806c5689df12ff742f1be577a25ecc1b194e5075
Reviewed-on: https://git-master/r/1473146
(cherry picked from commit 7dafdfeadadc210aba58d2c225f7c6b2b1967336)
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1639683
GVS: Gerrit_Virtual_Submit
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodevfreq: Use devfreq timers for podgov
Peter Boonstoppel [Mon, 1 May 2017 17:27:01 +0000 (10:27 -0700)]
devfreq: Use devfreq timers for podgov

The pod governor used to rely on being invoked from nvgpu on every
gk20_busy/idle() call. This was done originally for load-tracking
purposes. This change refactors the code to instead rely on devfreq's
internal polling loop for calling the governor periodically. It also
removes the idle timeout from the podgov code, since devfreq will keep
polling even when the GPU is idle.

Jira NVGPU-20

Change-Id: I767b74c250d199e3cd5f7e249a49736836a54c0d
Reviewed-on: https://git-master/r/1473145
(cherry picked from commit 6080342d3d911112c9c9486c1bbe0f8e38ea3f57)
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1639682
GVS: Gerrit_Virtual_Submit
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodevfreq: remove throughput hints from podgov
Konsta Holtta [Wed, 29 Mar 2017 12:19:18 +0000 (15:19 +0300)]
devfreq: remove throughput hints from podgov

The CONFIG_TEGRA_THROUGHPUT-dependent throughput hint feature is dead,
so remove the code from podgov that used it.

Bug 1853519
NVGPU-20
TGFXP-673

Change-Id: Icb36eb0b2baa98757b3ce419080b43978384bbc9
Reviewed-on: http://git-master/r/1454591
(cherry picked from commit 7c37ca23a6ade6fcaa3ce6f20afd5dfb906d041f)
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1639681
GVS: Gerrit_Virtual_Submit
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agot210: ffu: Enable FFU
Aniruddha Tvs Rao [Thu, 11 Jan 2018 08:44:18 +0000 (00:44 -0800)]
t210: ffu: Enable FFU

Add config to enable FFU on t210.

Bug 200345130

Change-Id: Ief330c2f687afd9c8288725da16df8253d92981b
Signed-off-by: Aniruddha Tvs Rao <anrao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1637010
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Fix crash when 'rt565x-playback' link is not defined
Jon Hunter [Wed, 10 Jan 2018 09:49:29 +0000 (09:49 +0000)]
ASoC: tegra-alt: Fix crash when 'rt565x-playback' link is not defined

If the 'rt565x-playback' link is not defined in device-tree for the
Tegra210 rt565x machine driver then the following crash is seen ...

 Unable to handle kernel NULL pointer dereference at virtual address 00000068
 pgd = ffffffc00163e000
 [00000068] *pgd=000000017b1d8003, *pud=000000017b1d8003, *pmd=000000017b1d9003, *pte=00e8000050041707
 Internal error: Oops: 96000005 [#1] PREEMPT SMP
 Modules linked in:
 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.4.38-tegra #222
 Hardware name: jetson_tx1 (DT)
 task: ffffffc0fb2f0000 ti: ffffffc0fb2a4000 task.ti: ffffffc0fb2a4000
 PC is at rt5659_set_jack_detect+0x8/0x2c
 LR is at tegra_t210ref_driver_probe+0x248/0x284
 pc : [<ffffffc0009b3864>] lr : [<ffffffc0009c5a60>] pstate: 60000045
 sp : ffffffc0fb2a7bf0
 x29: ffffffc0fb2a7bf0 x28: 0000000000000000 
 x27: 0000000000000000 x26: 0000000000000000 
 x25: 0000000000000000 x24: 0000000000000000 
 x23: 0000000000000000 x22: 0000000000000000 
 x21: ffffffc0fa282010 x20: ffffffc07d136c18 
 x19: ffffffc07d136c20 x18: 0000000000000000 
 x17: 0000000000000000 x16: 0000000000000000 
 x15: 0000000000000008 x14: 66656420746f6e20 
 x13: 6b6e696c20636564 x12: 6f63203a646e756f 
 x11: 7320783536357472 x10: 2d656c69626f6d2d 
 x9 : 666572303132742d x8 : ffffffc00030e7c8 
 x7 : 0000000000000000 x6 : 000000000000006c 
 x5 : 0000000000000000 x4 : ffffffc0fb2a78e0 
 x3 : 0000000000000000 x2 : 0000000000000c16 
 x1 : ffffffc001622228 x0 : 0000000000000000 
 
 Process swapper/0 (pid: 1, stack limit = 0xffffffc0fb2a4020)
 Call trace:
 [<ffffffc0009b3864>] rt5659_set_jack_detect+0x8/0x2c
 [<ffffffc0009c5a60>] tegra_t210ref_driver_probe+0x248/0x284
 [<ffffffc0006323c4>] platform_drv_probe+0x4c/0xb4
 [<ffffffc00062fd44>] really_probe+0x138/0x2f0
 [<ffffffc00062fff0>] driver_probe_device+0x8c/0xcc
 [<ffffffc000630090>] __driver_attach+0x60/0x8c
 [<ffffffc00062de50>] bus_for_each_dev+0x54/0x94
 [<ffffffc00062f938>] driver_attach+0x20/0x28
 [<ffffffc00062f280>] bus_add_driver+0x144/0x230
 [<ffffffc000630fd4>] driver_register+0x90/0xd8
 [<ffffffc000632324>] __platform_driver_register+0x54/0x5c
 [<ffffffc001296918>] tegra_t210ref_driver_init+0x18/0x20
 [<ffffffc0000810d8>] do_one_initcall+0x4c/0xf0
 [<ffffffc001245b64>] do_initcall_level+0xa0/0xc0
 [<ffffffc001245b9c>] do_initcalls+0x18/0x30
 [<ffffffc001245bd8>] do_basic_setup+0x24/0x30
 [<ffffffc001245d10>] kernel_init_freeable+0x118/0x1ac
 [<ffffffc000bc1ba8>] kernel_init+0xc/0xe8
 [<ffffffc000084790>] ret_from_fork+0x10/0x40
 ---[ end trace 783136a9ec7cad16 ]---

This crash is caused because when the 'rt565x-playback' link is not
defined we will still call rt5659_set_jack_detect() but pass a NULL
pointer for the codec handle. Fix this by ensuring we only call
rt5659_set_jack_detect() when the 'rt565x-playback' link is present.

Bug 2045523

Change-Id: Ib8945fee1abe1745c1b087605bf876341b3ad367
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1636468
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: configs: tegra: Enable INPUT_CFBOOST
Terry Wang [Thu, 11 Jan 2018 13:30:55 +0000 (21:30 +0800)]
arm64: configs: tegra: Enable INPUT_CFBOOST

This patch enables the input-cfboost driver module to boost
CPUfreq on an input event.

boot.img size is increased by 22528 bytes

bug 200373262

Change-Id: I33aafe40d8848f27cffaca93f6d1afddee932efb
Signed-off-by: Terry Wang <terwang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1636516
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocoresight: fix cpu dynamic power gating side effect
Clarence.Zhou [Tue, 9 Jan 2018 02:46:27 +0000 (10:46 +0800)]
coresight: fix cpu dynamic power gating side effect

CPU loses all its PTMs' registers' values in low power state when its
dynamic power gating is enabled.

Register CPU PM notifier callback function, which saves and restores
the PTM registers' values, on low power state.

Bug 200348671

Change-Id: Ib451feeb931d32caa5a26750491796b1ac0bd1fc
Signed-off-by: Clarence.Zhou <clarencez@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1634382
GVS: Gerrit_Virtual_Submit
Reviewed-by: Chun Xu <chunx@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers:camera: Update default Format for OV5693
Josh Kergan [Thu, 26 Oct 2017 21:54:49 +0000 (14:54 -0700)]
drivers:camera: Update default Format for OV5693

The sensor ov5693 reports it's default format as RG10
when it really uses BG10, these formats have the same size
so the driver was working, but we should expose the true format.

JIRA CHWI-1379
Bug 200368584

Change-Id: Ia8379d456d451cf71821c7edf75ae2531095ffd1
Signed-off-by: Josh Kergan <jkergan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1586508
(cherry picked from commit 948c7d9d2a5265a554da2de4251f686a2eb79be0)
Reviewed-on: https://git-master.nvidia.com/r/1618510
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Fix error path for rt565x machine driver
Jon Hunter [Mon, 8 Jan 2018 22:09:36 +0000 (22:09 +0000)]
ASoC: tegra-alt: Fix error path for rt565x machine driver

The error path of the Tegra210 rt565x machine driver does not call
tegra_alt_asoc_utils_fini() or unregister the headset switch on
failure.

Failure to call tegra_alt_asoc_utils_fini() may leave clocks enabled
and leak references to clock handles.

Failure to unregister the headset switch on failure prevents causes
subsequent calls to register a switch to fail because one is already
registered. Hence, if the probe of the rt565x machine driver is
deferred, for example because the codec is not register yet, this
will cause subsequent probe attempts to fail because a switch is
already registered.

Fix the above issues by calling tegra_alt_asoc_utils_fini() and
unregistering the switch in the error path of the Tegra210 rt565x
machine driver probe. Finally ensure the switch is unregistered
in the removal of the rt565x machine driver.

Bug 2044665

Change-Id: Iaeb6f7ae30b6fdff46b0a8679003674804399a99
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1634166
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: camera: support syncpt init in channel init
Ahung Cheng [Wed, 27 Dec 2017 05:29:55 +0000 (13:29 +0800)]
drivers: camera: support syncpt init in channel init

This is specific for vi2 driver to use fixed syncpt id

Using dynamic syncpt id in vi2 driver can cause a side
effect that vi2 might send unexpected syncpt incremental
to a freed syncpt. This can be observed when HDMI-IN
hotplug happened and then application re-start a capture.

If the syncpt got assigned to another nvhost client,
that unexpected increment will cause syncpt timeout

bug 200357789

Change-Id: I5d9107b3b21a47c91d5fe56b0cf80ad5e89b9023
Reviewed-on: https://git-master.nvidia.com/r/1627061
GVS: Gerrit_Virtual_Submit
(cherry picked from commit 877d999757341278eb891e7fa0e00f5c484ea4a6)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1629741
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocore: mmc: suspend/resume without power in suspend
Aniruddha Tvs Rao [Wed, 8 Nov 2017 04:07:34 +0000 (09:37 +0530)]
core: mmc: suspend/resume without power in suspend

Check the status of pm flags before resume.

Bug 200352008

Change-Id: I69ee988779c5393b1a8f67d07a01e92cc5f0dd30
Signed-off-by: Aniruddha Tvs Rao <anrao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1594012
(cherry picked from commit 596089e8aa68a4db907617fcc18c8b779e928ff2)
Reviewed-on: https://git-master.nvidia.com/r/1627725
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Jerry Chang <jerchang@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Vick Yu <vyu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocrypto: increase NEON instruction cipher priority
Ian Chang [Thu, 28 Dec 2017 08:49:12 +0000 (16:49 +0800)]
crypto: increase NEON instruction cipher priority

We found issue when enabling file encryption on T210 platform.
After use NEON instruction the issue disappear.So increase
the NEON instruction priority to 400 on T210 platform as WAR.

bug 200345207
bug 200368838

Change-Id: I254418d19e5c9cde4f570244b5a859c7bfc0cfaa
Reviewed-on: https://git-master.nvidia.com/r/1627700
Reviewed-by: Ian Chang <ianc@nvidia.com>
Tested-by: Ian Chang <ianc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoRevert "arm64: configs: Enable android for loglevel print"
Bharat Nihalani [Wed, 27 Dec 2017 04:46:42 +0000 (20:46 -0800)]
Revert "arm64: configs: Enable android for loglevel print"

This reverts commit 080d88aaed36043cd0b88ec8270a1e807a15eaf8
since this causes SQA Automation tests to fail because we
don't see "BOOT_COMPLETE" print with this config enabled.

Bug 200375800

Change-Id: Ib76c0efb83073617dbb55359d63c37bf98944bda
Reviewed-on: https://git-master.nvidia.com/r/1626954
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoCHROMIUM: nouveau: check path_nr before passing it to nvkm_ioctl_path
Kary Jin [Tue, 19 Sep 2017 08:35:08 +0000 (16:35 +0800)]
CHROMIUM: nouveau: check path_nr before passing it to nvkm_ioctl_path

Check the path_nr before passing it into nvkm_ioctl_path to avoid the
out-of-bound issue.

Bug 2019915

Change-Id: Ida06ef6218b914df0794a7431b9679c916988f33
Signed-off-by: Kary Jin <karyj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1615237
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoUPSTREAM: ALSA: timer: Call notifier in the same spinlock
Takashi Iwai [Wed, 10 Feb 2016 11:47:03 +0000 (12:47 +0100)]
UPSTREAM: ALSA: timer: Call notifier in the same spinlock

snd_timer_notify1() is called outside the spinlock and it retakes the
lock after the unlock.  This is rather racy, and it's safer to move
snd_timer_notify() call inside the main spinlock.

The patch also contains a slight refactoring / cleanup of the code.
Now all start/stop/continue/pause look more symmetric and a bit better
readable.

Bug 2019915
Change-Id: Ib90099f88c8b04928a8cdd2808cd9e16da6d519c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Siqi Lin <siqilin@google.com>
Reviewed-on: https://git-master.nvidia.com/r/1615234
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoALSA: timer: Fix race between read and ioctl
Takashi Iwai [Fri, 2 Jun 2017 13:03:38 +0000 (15:03 +0200)]
ALSA: timer: Fix race between read and ioctl

The read from ALSA timer device, the function snd_timer_user_tread(),
may access to an uninitialized struct snd_timer_user fields when the
read is concurrently performed while the ioctl like
snd_timer_user_tselect() is invoked.  We have already fixed the races
among ioctls via a mutex, but we seem to have forgotten the race
between read vs ioctl.

This patch simply applies (more exactly extends the already applied
range of) tu->ioctl_lock in snd_timer_user_tread() for closing the
race window.

Bug 2019915
Reported-by: Alexander Potapenko <glider@google.com>
Tested-by: Alexander Potapenko <glider@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Change-Id: I680a4758ace7eb5fb999fce6abb7070242b6c6da
Reviewed-on: https://git-master.nvidia.com/r/1615233
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoANDROID: scsi: Add segment checking in sg_read
Roberto Pereira [Wed, 11 Oct 2017 00:14:48 +0000 (17:14 -0700)]
ANDROID: scsi: Add segment checking in sg_read

Bug 2019915
Signed-off-by: Roberto Pereira <rpere@google.com>
Change-Id: I91b6b5dbcea7c39643beffdc12a23ee3d8f8775d
Reviewed-on: https://git-master.nvidia.com/r/1615236
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: tegra21: enable CONFIG_MMC_TEST
Sandipan Patra [Fri, 22 Dec 2017 05:32:54 +0000 (11:02 +0530)]
arm64: tegra21: enable CONFIG_MMC_TEST

enabling CONFIG_MMC_TEST to enable mmc test.

boot.img size is increased by 16512 bytes

Bug 1616399

Change-Id: If53ce6d452f18b382741bc2ae056e857f89dae91
Signed-off-by: Sandipan Patra <spatra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1624510
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: camera: fix panic for HDMI-CSI bridge
Ahung Cheng [Tue, 5 Dec 2017 09:37:44 +0000 (17:37 +0800)]
drivers: camera: fix panic for HDMI-CSI bridge

HDMI-CSI bridge doesn't support override control
and doesn't allocate struct for camera_common_data.
When VI driver is access to override control for HDMI-IN,
it is actually to update the memory of mutex pointer.

bug 200366976

Change-Id: Ie9a2e283f9c846136e83b002bbaec64ba07baf80
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1611113
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotlk_driver: check TLK node before tlk_restore_keyslots
Mihir Joshi [Mon, 18 Dec 2017 19:36:30 +0000 (11:36 -0800)]
tlk_driver: check TLK node before tlk_restore_keyslots

Currently, we call tlk_restore_keyslots even if TLK node is not enabled in
DTB.
This patch adds a check to not call the TLK SMC if detected TOS is not TLK

Bug 200366892
Tests GVS

Change-Id: I52b35f9398c8c9a6d0350640313794beeb20e23d
Signed-off-by: Mihir Joshi <mihirj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1620558
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Fix SW reset for Tegra210 ADMAIF9/10
Jon Hunter [Mon, 18 Dec 2017 15:38:26 +0000 (15:38 +0000)]
ASoC: tegra-alt: Fix SW reset for Tegra210 ADMAIF9/10

When using ADMAIF9/10 channels for audio playback/capture on Tegra210,
the soft-reset of the ADMAIF is failing when playback finishes ...

Playing WAVE 'rec.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
[  260.094969] tegra210-ape-admaif tegra210-admaif: Failed at ADMAIF0_TX sw reset

There are a couple issues here ...
1. The ADMAIF that fails is reported as 'ADMAIF0' although in the above
   test ADMAIF9 is being used. This is purely an error in the driver
   which is using 'dev-id' as the ADMAIF ID instead of 'dai->id'. Hence
   the above error message is misleading.
2. The soft reset fails because the regmap configuration for the ADMAIF
   registers on T210 is incorrect. In the function,
   tegra210_admaif_volatile_reg(), only the ADMAIF registers between
   offset 0x000 and 0x500 are considered volatile. The problem is that
   the ADMAIF channel registers for T210 actually span 0x000-0x280 (for
   RX) and 0x300-0x580 (for TX). This means that for TX, the ADMAIF9/10
   channel registers are not considered volatile and hence, polling the
   soft reset register is failing.

Fix the above two issues by correcting the ADMAIF ID reported for any
soft reset failures, and correct the address range for ADMAIF volatile
registers.

Bug 2037162

Change-Id: If22eba754ab4bf2bf5acc3c9da51388b7208c749
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1620448
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: camera: Fix calibration for CSI2
David Bang [Mon, 18 Dec 2017 18:31:53 +0000 (13:31 -0500)]
drivers: camera: Fix calibration for CSI2

CSI2 mipi lanes calibration is driven by sensor
state. As soon as the mipi pad is powered on the
sensor is also powered/streamed to reach the standby
state for performing the calibration during the
initialization sequence of CSI2 HW.
Address issues with loadable sensor modules, calibration
will be performed only when the sensor is bound.

Bug 200324656

Change-Id: I63821287514c1202570fc78a287a01882ff69fcc
Signed-off-by: David Bang <dbang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1565678
Reviewed-on: https://git-master.nvidia.com/r/1620526
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: camera: Fix Mipi Calibration sequence
David Bang [Mon, 18 Dec 2017 17:54:12 +0000 (12:54 -0500)]
drivers: camera: Fix Mipi Calibration sequence

MIPI calibration can happen irrespective of
sensor state by keeping CSI CIL in reset
state. This change adds calibration to complete
when the CSI is powered ON and based on the sensor
settings. By this approach the mipi lanes are
calibrated and are ready as soon as sensor is
turned ON.

Bug 200324656

Change-Id: Id2cd6336395d3a0f0b2637207eb4fdfe6edc3d63
Signed-off-by: David Bang <dbang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1560331
Reviewed-on: https://git-master.nvidia.com/r/1620523
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoRevert "video: hdmi: fix coverity defect"
Ahung Cheng [Wed, 6 Dec 2017 09:17:54 +0000 (17:17 +0800)]
Revert "video: hdmi: fix coverity defect"

This reverts commit da5970b381be265f799b881b60d73c87c5e741ae.

The vendor and product buffers are indeed not nul terminated
(see the CEA-861 spec).
So forcing the last byte to be 0 will cut off the last
character when using full-length vendor (8 chars) or
product (16 chars) names.

bug 2023690

Change-Id: Ie8be3d8db0648e324d829c791d0432a924462908
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1612329
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonet: wireless: bcmdhd_pcie: remove unsed WEXT file.
Insun Song [Tue, 30 May 2017 08:34:51 +0000 (17:34 +0900)]
net: wireless: bcmdhd_pcie: remove unsed WEXT file.

WEXT API was already obsoleted and should be removed.
CVE-2017-0509 (Android-32124445/Broadcom-RB#110688)

Bug 200312259

Change-Id: I9f40b7c02b553b47681cc8a7c836be918526b6dc
Signed-off-by: Insun Song <insun.song@broadcom.com>
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: http://git-master/r/1493649
(cherry picked from commit b0741841e12dbbb10ead5bbf393c80c72331dd7e)
Reviewed-on: https://git-master.nvidia.com/r/1613075
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agousb: xhci: apply XHCI_TRUST_TX_LENGTH to Renesas platforms
Vidya Sagar [Tue, 12 Dec 2017 03:03:53 +0000 (08:33 +0530)]
usb: xhci: apply XHCI_TRUST_TX_LENGTH to Renesas platforms

Renesas platforms are freezing system with the following log

xhci_hcd 0000:01:00.0: WARN Successful completion on short TX: needs XHCI_TRUST_TX_LENGTH quirk?

Hence applying XHCI_TRUST_TX_LENGTH quirk for Renesas

Bug 200371487

Change-Id: I26b47907a5c3722a6d4c8a186121eb30baa8305b
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1616111
Tested-by: Dane Liu <danel@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Add support for overriding the bclk ratio
Jon Hunter [Fri, 17 Nov 2017 11:17:22 +0000 (11:17 +0000)]
ASoC: tegra-alt: Add support for overriding the bclk ratio

To test internal loopback on any I2S interface using various different
sampling frequencies, it is necessary to be able to override the bit
clock ratio. However, rather than adding a kcontrol for each audio
link supported by the machine driver, add a global kcontrol that when
set will control the bit clock ratio for all I2S links.

Bug 2025176

Change-Id: I46ec949d36f0fe34967b9ed718d2189b539a1a37
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1602528
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Improve Tegra210 support for testing I2S4
Jon Hunter [Mon, 27 Nov 2017 12:11:52 +0000 (12:11 +0000)]
ASoC: tegra-alt: Improve Tegra210 support for testing I2S4

On Tegra210 Jetson TX1, the audio path which defines the I2S4 interface
as the CPU DAI, only supports 2-channel 16-bit audio at 48kHz. This
prevents the user from testing other data formats and rates with this
I2S interface.

For Tegra210 Jetson TX1, the I2S4 interface is used by the DAI link
named 'spdif-dit-0'. Improve support for testing the I2S4 interface by
allowing the sampling rate, data format and number of channels for
'spdif-dit-0' DAI link to be updated.

Bug 2025176

Change-Id: Ifb9092a3d66f88d05d4a85aeee02e99469195649
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1605633
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agosoc: tegra: Update DMIC maximum frequency
Jon Hunter [Wed, 6 Dec 2017 11:00:18 +0000 (11:00 +0000)]
soc: tegra: Update DMIC maximum frequency

When attempting to capture audio from DMIC3 on Jetson TX1 after boot
with sampling frequencies of 16kHz or greater the following errors
are seen when enabling the DMIC clock and causes the audio capture
to fail.

 tegra-dvfs: rate 12287995 too high for dvfs on dmic3
 tegra210-dmic tegra210-dmic.2: clk_enable failed: -22

The problem is that the Tegra210 DVFS driver is limiting the DMIC
frequency to 12.19MHz, although the DMIC supports a maximum frequency
of 12.288MHz (48kHz * 256 over-sampling). The 12.19MHz limit came from
the Tegra210 DVFS frequency spreadsheet that describes the maximum
frequencies for all interfaces/peripherals. This spreadsheet is being
updated to increase the maximum frequency for the DMIC to 12.288MHz.
Therefore, update the Tegra210 DVFS driver to align with this new
maximum frequency for the DMIC interfaces.

Bug 2029031

Change-Id: I44a49013e67b19ee6ba88c71dbf1f83fcff408bf
Reviewed-on: https://git-master.nvidia.com/r/1612395
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agort_patches: required rebase due to printk change
Arvind M [Tue, 5 Dec 2017 06:18:06 +0000 (22:18 -0800)]
rt_patches: required rebase due to printk change

Rebases rt patches because of changes in kernel core files.

Bug 200365736

Change-Id: If5e1d61be336a7d304450d34e0b47f9aefb27378
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1610942
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: configs: Enable android for loglevel print
Arvind M [Tue, 5 Dec 2017 05:15:21 +0000 (21:15 -0800)]
arm64: configs: Enable android for loglevel print

1. Sets SERIAL_8250_CONSOLE_FORCE_FORMAT config to 'y' for android.
2. Allows log level to be a part of kernel UART logs.

Bug 200365736

Change-Id: Ic4794b152378c3cd39880430abd597a5add9a0ab
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1610941
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotty: serial: 8250: supports loglevel print format
Arvind M [Wed, 29 Nov 2017 06:05:51 +0000 (22:05 -0800)]
tty: serial: 8250: supports loglevel print format

1. Introduces KConfig variable SERIAL_8250_CONSOLE_FORCE_FORMAT default to
    value 'n'
2. Modifies the UART8250 output format to include kernel loglevel based on
    configuration

Bug 200365736

Change-Id: I7354481d9a1658ac02fe97108c328301e3a6d33f
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1610940
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agokernel: printk: adds extra print format support
Arvind M [Wed, 29 Nov 2017 06:00:04 +0000 (22:00 -0800)]
kernel: printk: adds extra print format support

Adds feature in printk to include log levels in log message with help of
console flag CON_FORCE_LEVEL

Bug 200365736

Change-Id: I8affb2e2141ce5726ed3d392464e9878dce2ea7b
Signed-off-by: Arvind M <am@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1610939
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Add 32-bit and TDM support for I2S3 on Tegra210
Jon Hunter [Mon, 27 Nov 2017 13:07:29 +0000 (13:07 +0000)]
ASoC: tegra-alt: Add 32-bit and TDM support for I2S3 on Tegra210

On Tegra210 Jetson TX1, the audio path which defines the I2S3 interface
as the CPU DAI, only supports 16-bit data formats and 2 channel audio.
This prevents the user from testing other data formats and rates with
this I2S interface..

For Tegra210 Jetson TX1, the I2S3 interface is used by the DAI link
named 'spdif-dit-3'. Improve support for testing the I2S3 interface by
allowing the data format and number of channels for 'spdif-dit-3' DAI
link to be updated.

Bug 2025176

Change-Id: Ia798ac9da099afb6e5be17cf06899ec516b2df41
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1605632
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoxfrm: policy: check policy direction value
Vladis Dronov [Wed, 2 Aug 2017 17:50:14 +0000 (19:50 +0200)]
xfrm: policy: check policy direction value

The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used
as an array index. This can lead to an out-of-bound access, kernel lockup and
DoS. Add a check for the 'dir' value.

This fixes CVE-2017-11600.

Bug 2000057

Change-Id: I9d7006fd56c8970b833061d80f3821e6ea0c855a
References: https://bugzilla.redhat.com/show_bug.cgi?id=1474928
Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)")
Cc: <stable@vger.kernel.org> # v2.6.21-rc1
Reported-by: "bo Zhang" <zhangbo5891001@gmail.com>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Reviewed-on: https://git-master.nvidia.com/r/1605445
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoBACKPORT: pids: make task_tgid_nr_ns() safe
Oleg Nesterov [Fri, 1 Sep 2017 20:50:39 +0000 (13:50 -0700)]
BACKPORT: pids: make task_tgid_nr_ns() safe

This was reported many times, and this was even mentioned in commit
52ee2dfdd4f5 "pids: refactor vnr/nr_ns helpers to make them safe" but
somehow nobody bothered to fix the obvious problem: task_tgid_nr_ns()
is not safe because task->group_leader points to nowhere after the
exiting task passes exit_notify(), rcu_read_lock() can not help.

We really need to change __unhash_process() to nullify group_leader,
parent, and real_parent, but this needs some cleanups. Until then we
can turn task_tgid_nr_ns() into another user of __task_pid_nr_ns() and
fix the problem.

Reported-by: Troy Kensinger <tkensinger@google.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
(cherry picked from commit dd1c1f2f2028a7b851f701fc6a8ebe39dcb95e7c)

Bug 2000057

Change-Id: Iad19a77f4f0aa9f3b6b0539ac9c549fa64c18550
Reviewed-on: https://git-master.nvidia.com/r/1605402
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoPM / Domains: fix resume sequence in resume_noirq
Joseph Lo [Thu, 29 Jun 2017 07:00:47 +0000 (15:00 +0800)]
PM / Domains: fix resume sequence in resume_noirq

Like the 'commit 09b4621f1835 ("PM / Domains: fix redundant
genpd_save_dev call in suspend_noirq")', we should fix the same in
resume_noirq. So the resume sequence will just reverse the sequence in
the suspend_noirq call. This avoids missing "genpd_start_dev" call in
resuem_noirq phase with the drivers using "GENPD_FLAG_PM_UPSTREAM" flag.

And no impacts with other drivers not using "GENPD_FLAG_PM_UPSTREAM"
flag.

Bug 200323145
Bug 200367242

Change-Id: If899293cd7d217b0fdc0bad5f2373495cd25d53c
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Reviewed-on: https://git-master/r/1510693
(cherry picked from commit 5214c67eac70d3ab4e61a00aaccb26f00f8ad5fc)
Reviewed-on: https://git-master/r/1512355
(cherry picked from commit 47618503482ba51e0b2778f8dccae369d58714c9)
Reviewed-on: https://git-master.nvidia.com/r/1554428
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Tested-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocrypto: tegra-cryptodev: Remove unused slot info in ecc request structure
Mallikarjun Kasoju [Mon, 27 Nov 2017 09:33:01 +0000 (15:03 +0530)]
crypto: tegra-cryptodev: Remove unused slot info in ecc request structure

Slot information is not used when doing ecc operations. So removed it.

Bug 200367774

Change-Id: I92a704283ba70eaa7fdbf09587439160d098ec08
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1605489
Reviewed-by: Konduri Praveen <kondurip@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocrypto: se-elp: Remove slot info for elp request structure
Mallikarjun Kasoju [Mon, 27 Nov 2017 09:19:13 +0000 (14:49 +0530)]
crypto: se-elp: Remove slot info for elp request structure

There is no need to store slot information in ecc request structure
as it not used anywhere.

Bug 200367774

Change-Id: Ie366208fd8c56f261b6b71a9baa3b9b9384330ac
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1605488
Reviewed-by: Konduri Praveen <kondurip@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoRevert "Bluetooth: Add Realtek USB bluetooth driver"
Shobek Sam Attupurath [Wed, 22 Nov 2017 21:58:04 +0000 (13:58 -0800)]
Revert "Bluetooth: Add Realtek USB bluetooth driver"

This reverts commit 8024e1b389f6a4b4d4c5883bae1b040b8a8dacc1.
Realtek Bluetooth is no longer needed

Bug 2002562

Change-Id: I8d991a922d0223b24a372bd4c12b881e69a672d6
Reviewed-on: https://git-master.nvidia.com/r/1603459
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shobek Attupurath <sattupurath@nvidia.com>
Tested-by: Shobek Attupurath <sattupurath@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers:csi:csi2 error reset fix
Josh Kergan [Fri, 10 Nov 2017 23:16:25 +0000 (15:16 -0800)]
drivers:csi:csi2 error reset fix

The csi port code had changed so that only one port
is allocated to a channel no matter how many physical
ports are used. The csi2 error handler was not updated
for this change and was trying to set 2 ports when only
one existed. Change updates the csi to use the port offset
values to index the second csi to clear the buffer after an
error occurs.

Bug 1992619

Change-Id: If29a15e67ad8cd507d4aa7a03113ba616610e3cf
Signed-off-by: Josh Kergan <jkergan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1599663
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoscsi: sg: check length passed to SG_NEXT_CMD_LEN
peter chang [Wed, 15 Feb 2017 22:11:54 +0000 (14:11 -0800)]
scsi: sg: check length passed to SG_NEXT_CMD_LEN

The user can control the size of the next command passed along, but the
value passed to the ioctl isn't checked against the usable max command
size.

Bug 1990368

Change-Id: Icf497f3d09d5a1aa05d46391469d7704d906738e
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Chang <dpf@google.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-on: https://git-master.nvidia.com/r/1605270
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agosctp: do not inherit ipv6_{mc|ac|fl}_list from parent
Eric Dumazet [Wed, 17 May 2017 14:16:40 +0000 (07:16 -0700)]
sctp: do not inherit ipv6_{mc|ac|fl}_list from parent

SCTP needs fixes similar to 83eaddab4378 ("ipv6/dccp: do not inherit
ipv6_mc_list from parent"), otherwise bad things can happen.

Bug 1990368

Change-Id: I08d9fecf8ad74735021d4e75bbfe7a018c099396
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-on: https://git-master.nvidia.com/r/1605253
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agosoc: pm-tegra210: Add NULL check in cpuidle init
Bharat Nihalani [Tue, 21 Nov 2017 18:13:57 +0000 (10:13 -0800)]
soc: pm-tegra210: Add NULL check in cpuidle init

Fix NULL pointer de-reference when cpuidle_driver is NULL.

Bug 200366168

Change-Id: I3d1b3423ab7a9aa65092833f06509985cc7075b4
Reviewed-on: https://git-master.nvidia.com/r/1602643
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agopcie: host: tegra: assert AFI, PCI and PCIX resets in suspend
Manikanta Maddireddy [Wed, 6 Sep 2017 07:19:32 +0000 (12:49 +0530)]
pcie: host: tegra: assert AFI, PCI and PCIX resets in suspend

AFI, PCI and PCIX resets should be asserted before entering SC7.

Bug 200337916
Bug 200343199

Change-Id: I5fa7a10e8690b86830bf1b3a4f858ff669b34121
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1553147
(cherry picked from commit a68ebbe5bbe7b706840beb5e70ae86ebf3029697)
Reviewed-on: https://git-master.nvidia.com/r/1604177
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: tegra21: Add USB Audio related configs
Shreshtha SAHU [Mon, 28 Aug 2017 06:58:18 +0000 (12:28 +0530)]
arm64: tegra21: Add USB Audio related configs

Bug 200340830

Change-Id: If2d5c493902df019a476a4b1ad2911f980a4301a
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1546711
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonet: eqos: Don't restrict the size of mtu
Narayan Reddy [Thu, 16 Nov 2017 18:19:55 +0000 (23:49 +0530)]
net: eqos: Don't restrict the size of mtu

Need to allow the changing of mtu size till
the max mtu size supported.

Bug 2016475

Change-Id: I12b885f6bfd3ec217281dc68b3f04ab2cd6ce186
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1600013
Reviewed-by: Ahung Cheng <ahcheng@nvidia.com>
Tested-by: Ahung Cheng <ahcheng@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agosoc: tegra: fix out-of-bounds access of cpu_lp_max_freq
Peter De Schrijver [Thu, 2 Nov 2017 13:00:27 +0000 (15:00 +0200)]
soc: tegra: fix out-of-bounds access of cpu_lp_max_freq

init_cpu_lp_dvfs_table was reading outside the cpu_lp_max_freq
array for speedo IDs > 5.

Bug 200346461

Change-Id: I50b323653dff69ee0403e943bbe5c032de7a63e1
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1590659
Reviewed-on: https://git-master.nvidia.com/r/1603682
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Jeffery Yu <jefferyy@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: configs: add docker related configs
Ninad Malwade [Wed, 22 Nov 2017 03:23:53 +0000 (11:23 +0800)]
arm64: configs: add docker related configs

Adding docker related kernel configs.
Currently dockers are not supported on ARM64 ubuntu version,
but as a requirement we are enabling the required kernel
configs to have out of the box support for the same.

Bug 2001213

Change-Id: I36e74febfb9ff12d503f5925997aa06d1b88d89c
Reviewed-on: https://git-master.nvidia.com/r/1602889
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Tested-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: configs: Enable ADSP DFS for T210
Ajay Nandakumar [Wed, 22 Mar 2017 07:40:56 +0000 (13:10 +0530)]
arm64: configs: Enable ADSP DFS for T210

Enabling ADSP DFS for t210, which allows adsp frequency to be
controlled through external drivers or through userspace from
exposed debugfs entries.

Bug 200359826
Bug 200267304

Change-Id: I5c00a284400d16b4269079c237b0b1d748058a77
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: http://git-master/r/1325974
(cherry picked from commit 238ca41ecf2a15b240abc881fa3f666f65dbacd2)
Reviewed-on: https://git-master.nvidia.com/r/1599471
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: tegra18: Disable PCIe-ASPM
Manikanta Maddireddy [Mon, 20 Nov 2017 03:48:26 +0000 (19:48 -0800)]
arm64: tegra18: Disable PCIe-ASPM

Disables Active State Power Management (ASPM) for PCIe devices

bug 200364428
bug 200301602

Change-Id: I80eddf54bc7cade204e9b98cb43299a4eda00354
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1601278
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: tegra18: update tegra18 defconfig using make commands
Manikanta Maddireddy [Mon, 20 Nov 2017 03:45:01 +0000 (19:45 -0800)]
arm64: tegra18: update tegra18 defconfig using make commands

Update the tegra18 defconfig using make and savedefconfig
commands.

bug 200364428

Change-Id: Ie023beda44b4f0a67f00b8e4886d6e7ed44c1e18
Signed-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1601277
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoclk: tegra: Fix build errors on T18x
Jeffery Yu [Tue, 14 Nov 2017 14:54:26 +0000 (06:54 -0800)]
clk: tegra: Fix build errors on T18x

The fix is to get certain drivers only be enabled for T210.

Bug 200346461

Change-Id: Ica86e89f2324562125d9414f780ade4e6b8903e8
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1597949
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agosoc: dvfs: Increase number of rail stats bins
Alex Frid [Tue, 23 May 2017 22:55:52 +0000 (15:55 -0700)]
soc: dvfs: Increase number of rail stats bins

Bug 200269751

Change-Id: I346489fcf539526cdaff493dd6eecee8bd2104f3
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/1488460
(cherry picked from commit 5fa35ba5235532b2c5cc223a1135c0b8eae038a5)
Reviewed-on: https://git-master.nvidia.com/r/1597948
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoMerge branch 'origin/dev/bnihalani_clk_soc' into HEAD
Bharat Nihalani [Sun, 19 Nov 2017 03:18:55 +0000 (19:18 -0800)]
Merge branch 'origin/dev/bnihalani_clk_soc' into HEAD

This gets clock and DVFS commits from dev-kernel-4.4 in order to improve
stability on T210 platform.

Bug 200346461

Change-Id: I2cd1dee04c1de37b600fe748efbc374305b9de6e

6 years agomedia: i2c: IMX274: Enable 1080p sensor mode
Josh Kuo [Wed, 1 Nov 2017 08:31:05 +0000 (16:31 +0800)]
media: i2c: IMX274: Enable 1080p sensor mode

Enable 1080p@60fps sensor mode

Bug 2011006

Change-Id: Ia55d56bd5f0a7f6ff25a451063e92ceae16aa45d
Signed-off-by: Josh Kuo <joshk@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1589854
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: tegra21: config: CONFIG_BCMDHD=m
Jeffery Yu [Wed, 27 Sep 2017 03:14:51 +0000 (11:14 +0800)]
arm64: tegra21: config: CONFIG_BCMDHD=m

Per as mmc host probe is async, but mmc_rescan of host may be
triggered by bcmdhd driver whose probe is not async. So that
regulators of host etc. may not be initialized. Make bcmdhd
WiFi driver as module.

Bug 200342180

Change-Id: If1083b2914f1bd05b8df2ccf8ba7222fc830b4ce
Reviewed-on: https://git-master.nvidia.com/r/1569025
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Add DAPM Headphone and Mic widgets for I2S3
Jon Hunter [Fri, 10 Nov 2017 16:13:59 +0000 (16:13 +0000)]
ASoC: tegra-alt: Add DAPM Headphone and Mic widgets for I2S3

Tegra I2S3 interface on Jetson TX1 is not working because it is
missing the appropriate DAPM widgets to enable it. Add the
appropriate DAPM widgets for I2S3 (which is using prefix 'l' as
defined by device-tree).

Bug 2021397

Change-Id: I91e8bd13a247eaad4ce2bb1a9cd25d82b000a6c5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1596130
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonet: wireless: bcmdhd: remove SDIO debug IOVARs causing out of bounds
Insun Song [Fri, 7 Jul 2017 21:53:03 +0000 (14:53 -0700)]
net: wireless: bcmdhd: remove SDIO debug IOVARs causing out of bounds

"sd_devreg" IOVAR can cause out of bounds access when user input
manipulated. Proposed fix is removing debug oriented IOVARs completely.

Bug: 37622847
Bug 1990376
Signed-off-by: Insun Song <insun.song@broadcom.com>
Change-Id: I8fc5111fe9d8d2c5d7ae5b1c24ae8e531113beae
Reviewed-on: https://git-master.nvidia.com/r/1565309
(cherry picked from commit c0fac815bbc4b78915e030054a01752f133fe219)
Reviewed-on: https://git-master.nvidia.com/r/1597803
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Tested-by: Om Prakash Singh <omp@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoRevert "video: fbmem: update vscreeninfo for all ttys"
Naveen Kumar S [Tue, 14 Nov 2017 05:44:21 +0000 (11:14 +0530)]
Revert "video: fbmem: update vscreeninfo for all ttys"

This reverts commit 1098203b0cb41ea8244a9e2051d99ffeb764229b.

Due to this change, a mode update in X causes mode update on
all TTYs. This is not expected as fbconsole needs to retain its
mode. This also caused dc timeouts upon switching between X and
fbconsole due to inconsistent mode update. Hence, reverting
this change.

bug 200225083
bug 200363727

Change-Id: Icd693ba591970af1190b7ad766623b2a6a33fac2
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1597620
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Add support for I2S5
Jon Hunter [Mon, 13 Nov 2017 12:46:22 +0000 (12:46 +0000)]
ASoC: tegra-alt: Add support for I2S5

I2S5 is not enable for Jetson-TX1 although the interface is available
on 30-pin header J26. Enable suppot for this interface so that it can
be tested.

Bug 2020869

Change-Id: I87fe177d2139fe94098cb02fadb490e2080dbb6c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1597135
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoMerge "Merge branch 'origin/dev/bnihalani_pwm_thermal' into HEAD" into rel-28
Gerrit Code Review [Tue, 14 Nov 2017 19:02:52 +0000 (11:02 -0800)]
Merge "Merge branch 'origin/dev/bnihalani_pwm_thermal' into HEAD" into rel-28

6 years agoclk: tegra: Fix maximum audio sync clock for Tegra210
Jon Hunter [Wed, 8 Nov 2017 17:39:58 +0000 (17:39 +0000)]
clk: tegra: Fix maximum audio sync clock for Tegra210

The maximum frequency supported for I2S on Tegra210 is 24.576MHz.
However, the maximum I2S frequency is limited to 24MHz because that
is the maximum frequency of the audio sync clock. Increase the
maximum audio sync clock frequency to 24.576MHz for Tegra210 in order
to support 24.576MHz for I2S.

Update the tegra_clk_register_sync_source() function so that it does
not set the initial rate for the sync clocks and use the clock init
tables to set the initial rate instead.

Please note that this is a regression from Linux v3.10.

Bug 2020021

Change-Id: If0a7b4d4f11acd86e9a7c4b7a077985ed6aef2ce
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1594562
Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agowatchdog: t21x: disable internal ping on wdt open
Shreshtha SAHU [Tue, 17 Oct 2017 13:49:12 +0000 (19:19 +0530)]
watchdog: t21x: disable internal ping on wdt open

Disable internal watchdog ping when userspace opens
the watchdog dev. Watchdog ops no longer support .ref
hence its dependency is removed.

Bug 1976162

Change-Id: Ic02712bc9ac21d3df5cb9c9e0eef1522599e1590
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1580583
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: fbmem: update vscreeninfo for all ttys
Naveen Kumar S [Mon, 30 Oct 2017 07:11:46 +0000 (12:41 +0530)]
video: fbmem: update vscreeninfo for all ttys

If Framebuffer Console is active, currently only the foreground TTY's
mode is updated as part of FBIOPUT_VSCREENINFO. This causes issues when
foreground TTY is updated to any other available TTYs, as DC's/FB's mode
might be different. To avoid such inconsistency in mode between ttys and
DC/FB, update mode of all TTYs in FBIO_PUTVSCREENINFO.

bug 200225083

Change-Id: Idfee47b0a20d727ebacfd9e4647a46d7aa38a000
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1588190
GVS: Gerrit_Virtual_Submit
Reviewed-by: Tow Wang <toww@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoMerge branch 'origin/dev/bnihalani_pwm_thermal' into HEAD
Bharat Nihalani [Mon, 13 Nov 2017 15:34:44 +0000 (21:04 +0530)]
Merge branch 'origin/dev/bnihalani_pwm_thermal' into HEAD

This gets bunch of commits in drivers/pwm and drivers/thermal from
dev-kernel-4.4 in order to improve stability on T210 platform.

Bug 200346461

Change-Id: I10ffa20be2990aa0f3b21b239d880866a23f8725

6 years agothermal: tegra: Make sure DFLL cdev is updated
Alex Frid [Wed, 26 Apr 2017 06:00:27 +0000 (23:00 -0700)]
thermal: tegra: Make sure DFLL cdev is updated

During suspend DFLL driver always applies cold Vmin to guarantee safe
resume. Therefore DFLL cdev must trigger update to current temperature
after resume even if no thermal threshold is crossed while the SoC was
suspended. To assure this cleared cdev update flag in early resume.

Bug 200269751

Change-Id: I6caa4e1a183073cfbd7779ac5428a761b3a064ad
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/1470836
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
(cherry picked from commit 2a7d43c9da07ca03dc96419adeb47036d63e1c93)

6 years agothermal: pwm_fan: remove unnecessary NULL check
Navneet Kumar [Mon, 3 Apr 2017 18:17:51 +0000 (11:17 -0700)]
thermal: pwm_fan: remove unnecessary NULL check

remove unnecessary NULL check for private (platform) data.

Coverity ID 33311

Bug 200192410

Change-Id: I2d97cba9b0ee51f4981080c7a9decaf177cfb471
Signed-off-by: Navneet Kumar <navneetk@nvidia.com>
Reviewed-on: http://git-master/r/1454272
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
(cherry picked from commit eada164cbb0f51babfb78923e440a8f0dd4b47a1)

6 years agopwm: tegra: Fix DFLL PWM enable order
Alex Frid [Fri, 23 Jun 2017 04:06:20 +0000 (21:06 -0700)]
pwm: tegra: Fix DFLL PWM enable order

Enabled DFLL PWM output before PWM pin is enabled by pin controller
(this was done in opposite order that created a time window of low
PWM output, and the respective drop in PWM regulator voltage).

Change-Id: I56ab12932a904315033f2bf3317a5c10080b9b03
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/1507650
(cherry picked from commit d5888a2fb38bfa740f7eb48e72ceb3d22818bafd)
Reviewed-on: https://git-master.nvidia.com/r/1526626
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
(cherry picked from commit 4516851cc0d2a1e9e94fda3e458027f3aabc2332)

6 years agopwm: tegra-dfll:Add PWM output enable via GPIO control
Laxman Dewangan [Tue, 27 Jun 2017 18:04:17 +0000 (11:04 -0700)]
pwm: tegra-dfll:Add PWM output enable via GPIO control

In some of design, the PWM output is buffered and it is
controlled by the GPIO.
Add support to enable the PWM output via GPIO control.

bug 1943096

Change-Id: I20d9a5e5f63eb21ad559c21c42c00a53c0c216d6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master/r/1509908
(cherry picked from commit 323ae6644f6b49859974bb40ee966c5295b50e4a)
Reviewed-on: https://git-master.nvidia.com/r/1509952
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkata Jagadish <vjagadish@nvidia.com>
(cherry picked from commit b0731e56bb73042e5d6ad68ab5b30823f5b7adbc)

6 years agopwm: tachometer: return period & duty cycles from tachometer driver
R Raj Kumar [Mon, 22 May 2017 06:04:08 +0000 (11:34 +0530)]
pwm: tachometer: return period & duty cycles from tachometer driver

Return period & duty cycles in nano seconds from tachometer instead of
passing calculated rotations per minute value.

Update pwm sysfs node "rpm" such that it measures the rotations
per minute using period value recevied from pwm tachometer driver.

Change-Id: I1cd2daa1911286e25cecbe50a679d34d86c6f1f1
Signed-off-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/1485766
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
(cherry picked from commit 03bac8937ae15a75f05aa246b6a0a800e49fc16e)

6 years agopwm: tegra: remove clock gating support in tachometer
R Raj Kumar [Mon, 22 May 2017 05:59:50 +0000 (11:29 +0530)]
pwm: tegra: remove clock gating support in tachometer

Removed clock gating support from tegra tachometer driver
since this feature is not required here.

Change-Id: I3fb79b156eae960deedb4f9ca0254c06572c545d
Signed-off-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/1486805
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit 6ffe50e52bc8d554a17958446ad1d003f83dc07a)

6 years agopwm: tegra: Fix checkpatch error
Laxman Dewangan [Wed, 17 May 2017 14:58:41 +0000 (20:28 +0530)]
pwm: tegra: Fix checkpatch error

Fix the check-patch error reported by checkpatch script.

Change-Id: Ia7b05036a16dd040d012e30ed2d326f3bf0de65b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1484062
Reviewed-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit e9748dd046a9e5b4abd451c04ee1143bdb8113b7)

6 years agopwm: tegra: Add support to select slower parent
Laxman Dewangan [Wed, 17 May 2017 14:50:37 +0000 (20:20 +0530)]
pwm: tegra: Add support to select slower parent

If requested minimum frequency from the platform is not possible
from the higher rate parent then change the parent to slow parent
if slow-parent clock information is provided from DT.

This will help to select the lower frequency of PWM signal.

bug 1927065

Change-Id: I4eada8c51d283b308a6fe58e21596ed2f54c4c58
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1484061
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit aaca5fe19e655885aac71e09589b1d67189c7074)

6 years agopwm: tegra: Add support to lower pwm frequency
Laxman Dewangan [Tue, 16 May 2017 18:23:35 +0000 (23:53 +0530)]
pwm: tegra: Add support to lower pwm frequency

The PWM output signal depends on the clock source frequency
and PWM divider for period. There is possibility to have lower
PWM frequency which is not possible with higher PWM clock source
and on this case, it is required to have more fine divider of clock
source to get desired lower side frequency.

Add DT property "pwm-minimum-frequency-hz" to findout the platform
specific requirement and adjust the clock source frequency to
support this lower side frequency.

bug 1927065

Change-Id: Icb642d6886b39348b9b22310b9f0446be8087ae5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1483242
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: R Raj Kumar <rrajk@nvidia.com>
(cherry picked from commit 6e8b704ae3fbf7b9c0fbc291ebadd0b4e71c1c58)

6 years agopwm: tegra: remove duty cycle check for ramp time
Venkat Reddy Talla [Fri, 21 Apr 2017 11:22:23 +0000 (16:52 +0530)]
pwm: tegra: remove duty cycle check for ramp time

To configure ramp time through sysfs node there is no
dependency with duty cycle and duty cycle parameter is
not required, so remove duty cycle check while
configuring ramp time through sysfs node.

Bug 1825451

Change-Id: I7b271d1affc0bf9255a62c61de222172bfe28126
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1467517
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit 66354859aed76ca29249ca4cb9d91ba1deb72356)

6 years agopwm: tegra: add pwm based pmc soft led blink driver
Venkat Reddy Talla [Fri, 21 Apr 2017 08:30:44 +0000 (14:00 +0530)]
pwm: tegra: add pwm based pmc soft led blink driver

In T210b01 LED breathing(soft led blink) functionality
added and led breathing control is through PWM signal,
add pwm based driver to configure tegar pmc led breathing
parameters.

Bug 1825451

Change-Id: Id01a96a2b277fb8545ca1ee22822c576c7a4acea
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1467403
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit 0ad18f000ed0ccfa4dd0246ddc57e721cac42bc9)

6 years agopwm: tach: fix tach overflow case
R Raj Kumar [Tue, 25 Apr 2017 08:38:56 +0000 (14:08 +0530)]
pwm: tach: fix tach overflow case

Avoid overriding the tach register value in
tach overflow case.
Add module author info

Bug 200237693

Change-Id: I34f05fa788f0163f7608938e8ae39ff57531e9a5
Signed-off-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/1469379
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit ba66a831f3bbad81f761eb3c9d928285f3306f12)

6 years agopwm: core: Move pwm_get_rpm() to header as static inline
Laxman Dewangan [Fri, 14 Apr 2017 15:44:54 +0000 (21:14 +0530)]
pwm: core: Move pwm_get_rpm() to header as static inline

Function pwm_get_rpm() is wrapper over pwm_capture() and hence
move it to header instead of implementing in the core file.

Change-Id: I6f06296bd2d1c40de66748e8a6708e0ed9d27047
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1462979
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
(cherry picked from commit f358dc50c8bd57c44dbf2cdb4cf1a8c75728290a)

6 years agopwm: tegra: Add PWM based Tacho meter driver
Laxman Dewangan [Thu, 13 Apr 2017 10:45:37 +0000 (16:15 +0530)]
pwm: tegra: Add PWM based Tacho meter driver

PWM Tachometer capture the PWM signal which si in general output
of FAN, provide the period of PWM siganl which is converted to
RPM by SW.

Add Tegra Tachometer driver which implemets the pwm-capture to
measure period.

bug 200237693

Change-Id: I50fc7bdbf26bcc32868b89b17ba529fcf1b1aa53
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1462285
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit c0cf2792833f594a8b0e6d54e34a93d3f67e1f2b)

6 years agopwm: core: Add support to read tachometer via pwm capture
Laxman Dewangan [Wed, 12 Apr 2017 17:35:46 +0000 (23:05 +0530)]
pwm: core: Add support to read tachometer via pwm capture

Add support for tachometer driver via PWM core framework.
For this add PWM HW call backs for setting capture-window-length,
read RPM.

Also add sysfs for configuring window length and reading RPM
from user space.

bug 200237693

Change-Id: I1a80150c70434769f9fc23c9b0cf1fabe6729665
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1461621
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit fe2668e0ef22443a611f7a26b89cf906f21a606d)

6 years agopwm: core: Add details for ramp time and double pulse period
Laxman Dewangan [Wed, 12 Apr 2017 17:33:12 +0000 (23:03 +0530)]
pwm: core: Add details for ramp time and double pulse period

Add details in header file for PWM ramp time and double pulse
period. Also make the dummy function implementation as static
inline.

Change-Id: I8f28a52105b2cc902380c5577b44b88dca1e55e6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1461620
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
(cherry picked from commit 38c9304feaa316167c6bfb4f3d5f3f258cc34717)

6 years agopwm: Add PWM capture support
Lee Jones [Wed, 12 Apr 2017 15:06:05 +0000 (20:36 +0530)]
pwm: Add PWM capture support

Supply a PWM capture callback op in order to pass back information
obtained by running analysis on a PWM signal. This would normally (at
least during testing) be called from the sysfs routines with a view to
printing out PWM capture data which has been encoded into a string.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
(Cherry-picked from mainline commit
3a3d1a4e32ab47323d7b8c8b7631a8d36a3098b2
and manually resolved conflict)

Change-Id: I992f74e7f8a7f67948643ce2e38919f59cbaddc5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1461619
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit 679d0b29628c90b920211ae09b31e68859df4d8e)

6 years agopwm: core: add support for ramp and double pulse mode
Laxman Dewangan [Tue, 11 Apr 2017 08:28:11 +0000 (13:58 +0530)]
pwm: core: add support for ramp and double pulse mode

Add support to configure the ramp up and down time of pulse
which is required for the soft pwm signal.

Also add support to set the double pulse mode and their periods.
With this, there is pair of the pulses with period of double_period.

Change-Id: I28b9a8f73bf7478efd7882ec92179d48144056bb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1460361
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit d6b9339f6abb94cca3c72e9630a07c6d679de7ae)

6 years agoBluetooth: Add Realtek USB bluetooth driver
Srinivas Ramachandran [Thu, 16 Mar 2017 20:15:17 +0000 (13:15 -0700)]
Bluetooth: Add Realtek USB bluetooth driver

Bug 2002562

Change-Id: I6a73cad0251e446053952f7bc1e9fc3fcf713700
Signed-off-by: Shobek Sam Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1535385
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonet: wireless: rtl8822be: Update Realtek driver to v5.2.4g
Shobek Sam Attupurath [Fri, 29 Sep 2017 19:34:07 +0000 (12:34 -0700)]
net: wireless: rtl8822be: Update Realtek driver to v5.2.4g

Add Realtek driver that includes following fixes -

1. NPI driver changes
2. FW version 13.7 to fix TX EVM issues
3. Update BTCOEX to v48 - HID and A2DP updates
4. Coverity fixes

DRIVERVERSION v5.2.4g_NV_24270.20170928
BTCOEXVERSION COEX20170919-4848

Bug 1986015
Bug 1907004
Bug 1969977
Bug 1935772

Change-Id: I69a88b5871f71392018d0073dd727c375f6aa0a6
Signed-off-by: Shobek Sam Attupurath <sattupurath@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1571149
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: crypto: Avoid user pointer dereference
Shravani Dingari [Thu, 27 Apr 2017 10:50:38 +0000 (16:20 +0530)]
drivers: crypto: Avoid user pointer dereference

Instead of directly dereferencing pointers supplied by user,
use copy_from_user and copy_to_user API to check the validity
of user supplied buffers

Coverity ID 38812

Bug 200192571

Change-Id: Ic6a7614703b1bba78bf69e482f9a1e0f9effe9c9
Signed-off-by: Shravani Dingari <shravanid@nvidia.com>
Signed-off-by: Aniruddha TVS Rao <anrao@nvidia.com>
Reviewed-on: http://git-master/r/1454808
(cherry picked from commit 0fdddc256631e0b38ca8dcffac09dde330bf93b9)
Reviewed-on: https://git-master.nvidia.com/r/1595721
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: description for fbcon mode property
Naveen Kumar S [Tue, 10 Oct 2017 08:34:58 +0000 (14:04 +0530)]
video: tegra: description for fbcon mode property

Add description and an example for "nvidia,fbcon-default-mode"
DT property. This property can be used to specify mode parameters
for fbconsole in "struct tegra_dc_mode" format. If specified,
this mode will be used as the default mode for fbconsole.

bug 200308135

Change-Id: I86051607476bfc89e938369f28350428eec889cf
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1588510
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agomfd: max77620: Add configurations of backup battery
Laxman Dewangan [Thu, 9 Nov 2017 12:26:22 +0000 (17:56 +0530)]
mfd: max77620: Add configurations of backup battery

Add PMIC configurations for backup battery and low-battery
monitoring.

Bug 2020512

Change-Id: If70bfe375ec83668d30c6521148d0461fabc33c8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1595616
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agomfd: max77620: Add DT binding details for backup battery
Laxman Dewangan [Thu, 9 Nov 2017 12:25:58 +0000 (17:55 +0530)]
mfd: max77620: Add DT binding details for backup battery

Add DT binding details for DT properties and nodes for
backup battery and low battery monitoring configurations.

Bug 2020512

Change-Id: I374e99faae115e4f77aaea4273d6600fbb20a06c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1595615
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra: camera: Update LC898212 control ID names
Frank Chen [Thu, 9 Nov 2017 20:04:12 +0000 (12:04 -0800)]
tegra: camera: Update LC898212 control ID names

Update the control ID name to match the recent
sensor driver control ID changes.

Bug 200350907

Change-Id: I3af2ab683e5d4f98f6597d57b82b77a903d7cd63
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1595380
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Josh Kergan <jkergan@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: crypto: Avoid resource leak
Aniruddha TVS Rao [Mon, 20 Mar 2017 05:17:13 +0000 (10:47 +0530)]
drivers: crypto: Avoid resource leak

memory allocated to local variable "req" is not freed before returning
from the function for a  possible set of conditions.
Free "req" in such a case to avoid resource leak.

Coverity ID 2011369

Change-Id: I8ede395554b039587fed62738214854b129e6203
Signed-off-by: Aniruddha TVS Rao <anrao@nvidia.com>
Reviewed-on: http://git-master/r/1324017
(cherry picked from commit 2d88bf1173c14d5db710671f2a3bf7656ebcc227)
Reviewed-on: https://git-master.nvidia.com/r/1554399
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra-cryptodev: Avoid untrusted user pointer dereference
Mallikarjun Kasoju [Sun, 21 May 2017 10:57:53 +0000 (16:27 +0530)]
tegra-cryptodev: Avoid untrusted user pointer dereference

In RSA operations use copy_from_user to get key data
into local buffer before using it.

Bug 200305294

Change-Id: Ia647b81664be3de2ac1016e352a6505ff2015d49
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: http://git-master/r/1486620
(cherry picked from commit 4235ae6bd23c3547636f21b985ed006cc238775d)
Reviewed-on: https://git-master.nvidia.com/r/1594355
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: crypto: Avoid use of tainted scalar value
Aniruddha TVS Rao [Tue, 28 Mar 2017 11:51:00 +0000 (17:21 +0530)]
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.

Coverity ID 24040

Bug 200192571
Bug 1862381

Change-Id: I75237559409178468a6425ec3ceb4b601b21e2de
Signed-off-by: Aniruddha TVS Rao <anrao@nvidia.com>
Reviewed-on: http://git-master/r/1329922
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
(cherry picked from commit 3538fb80178bce43a1f3250ac3340f0bda54de63)
Reviewed-on: https://git-master.nvidia.com/r/1554425
GVS: Gerrit_Virtual_Submit
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>