3 years agoASoC: Codec: rt565x: derive proper dmic clk rate
Sameer Pujar [Tue, 2 Aug 2016 11:03:51 +0000]
ASoC: Codec: rt565x: derive proper dmic clk rate

The failure was seen in setting dmic clock when 192KHz HRA playback
was running. Earlier divider factors available were not sufficient
to get the right dmic clock. OSR factor is used now to further divide
the dmic clock to get the rate in required range.
(patch provided by Realtek)

Bug 200223032

Reviewed-on: http://git-master/r/1193642
(cherry picked from commit c30c54ba369e3d42bcb768bc855807455a3dbc61)

Change-Id: Ifed1ef43c96de799bfd9d8de483964a91be73372
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1195875
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>

3 years agoUSB: usbfs: fix potential infoleak in devio
Kangjie Lu [Tue, 3 May 2016 20:32:16 +0000]
USB: usbfs: fix potential infoleak in devio

The stack object “ci” has a total size of 8 bytes. Its last 3 bytes
are padding bytes which are not initialized and leaked to userland
via “copy_to_user”.

CVE-2016-4482
Bug 1787007

Change-Id: I1488436e8322fd645f76c942aeae1daada6be995
(cherry picked from commit 681fef8380eb818c0b845fca5d2ab1dcbab114ee)

Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Signed-off-by: Dhiren Parmar <dparmar@nvidia.com>
Change-Id: I1488436e8322fd645f76c942aeae1daada6be995
Reviewed-on: http://git-master/r/1190551
(cherry picked from commit 0dee449c60dec829c02084d4e10ae373c1ebbd6e)
Reviewed-on: http://git-master/r/1195841
GVS: Gerrit_Virtual_Submit

3 years agopowergate-t21x: Use tegra_powergate_partition
JC Kuo [Fri, 27 May 2016 02:51:28 +0000]
powergate-t21x: Use tegra_powergate_partition

tegra_powergate_partition should be used to disable boot partitions
if partition does not have any driver - clocks are supposed to be
already disabled in this case.

Hence do not call tegra_powergate_partition_with_clk_off else it
results in following log during boot:

[    5.371341] WARNING: at /dvs/git/dirty/git-master_android/kernel/drivers/platform/tegra/clock.c:563 clk_disable_locked+0x38/0x170()
[    5.383166] Attempting to disable clock sata_oob with refcnt 0
[    5.388833] Modules linked in:
[    5.392099] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.96+ #1
[    5.398205] Call trace:
[    5.400666] [<ffffffc0000898c0>] dump_backtrace+0x0/0x14c
[    5.406066] [<ffffffc000089a20>] show_stack+0x14/0x1c
[    5.411136] [<ffffffc000c2a460>] dump_stack+0x20/0x28
[    5.416191] [<ffffffc0000a8dc8>] warn_slowpath_common+0x78/0x9c
[    5.422133] [<ffffffc0000a8e3c>] warn_slowpath_fmt+0x50/0x58
[    5.427805] [<ffffffc000968348>] clk_disable_locked+0x38/0x170
[    5.433635] [<ffffffc0009684d0>] clk_disable+0x50/0x88
[    5.438790] [<ffffffc00095fb90>] partition_clk_disable+0x44/0x7c
[    5.444794] [<ffffffc0009601b4>] __tegra1xx_powergate+0x90/0xe0
[    5.450728] [<ffffffc0009603bc>] tegra1xx_powergate_partition_with_clk_off+0x18/0x4c
[    5.458482] [<ffffffc000960b00>] tegra210_pg_powergate_clk_off+0x154/0x230
[    5.465355] [<ffffffc00095f110>] tegra_powergate_partition_with_clk_off+0xdc/0x12c
[    5.472938] [<ffffffc0012b88c0>] tegra210_disable_boot_partitions+0x54/0x78

bug 200202701

Change-Id: Ie5024a095363a00ec730ffd37a9c3ba7f1bf2e07
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/1189421
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
(cherry picked from commit 2ebe2c42dc9a4de8d8ae84d403bf6a9c9990cda1)
Reviewed-on: http://git-master/r/1154830
GVS: Gerrit_Virtual_Submit

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

Check if num_syncpt_incrs are not more than number of
syncpoints available

Bug 1781393

Change-Id: Iee5070c87c8db0d6c30eb55ca03ec27c7de379ee
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1184846
(cherry picked from commit d85d48ec37173633d8efbc394b2508c710a0cda1)
Reviewed-on: http://git-master/r/1190700
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoandroid: binder: lower handler transaction printk
Li Li [Thu, 14 Jul 2016 18:49:34 +0000]
android: binder: lower handler transaction printk

Bug 200205468

It's a common issue for Android apps to hit the binder transaction
limit. Hence this printk message results in intermittent scheduling
latency if UART console is enabled. This is not a severe error.
Lower the printk level to warning instead so that it will NOT be
routed to UART console after setting printk filter correctly.

Change-Id: I2fe093eaecf22bfff19a66f7ce017e4ae13fa2b0
Signed-off-by: Li Li <lli5@nvidia.com>
Reviewed-on: http://git-master/r/1181570
(cherry picked from commit 3bfadffc34edd3008c051f680bc66c019e47e002)
Reviewed-on: http://git-master/r/1190351
GVS: Gerrit_Virtual_Submit
Reviewed-by: Eric Miao <emiao@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 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/1190237
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 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
(cherry picked from commit f8735dee5e225f998f72a42af2615ae6564c82f7)
Reviewed-on: http://git-master/r/1190234
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agowireless: bcmdhd: fix memory leak
Bhadram Varka [Wed, 22 Jun 2016 06:43:53 +0000]
wireless: bcmdhd: fix memory leak

Bug 1720381
Change-Id: I5d43870858ba02ee2fcf7d98e2c055a47dd91c82
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: http://git-master/r/1169183
(cherry picked from commit 25f4a459f226bcc8f23c0791e51a0b0db198cdf7)
Reviewed-on: http://git-master/r/1190096
GVS: Gerrit_Virtual_Submit
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Tested-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agoTo downgrade voice to video priority for p2p based hotspot.
nagaraj [Tue, 1 Mar 2016 01:58:06 +0000]
To downgrade voice to video priority for p2p based hotspot.

When blake connects and p2p tether is enabled then except blake
packets downgrade all p2p voice packets priority to video.
If p2p voice packets are not downgraded then blake audio corruptions
are observed.

Bug 1720381
Change-Id: Ib9564ae1e610b2cab35529e1ede2704f8b5cd153

Change-Id: I4f6b8de81250aa67e319a2e172477eb4bd82fa1b
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: http://git-master/r/1163501
(cherry picked from commit ac2b7d80831171ce36c1439300527f5f79b1708f)
Reviewed-on: http://git-master/r/1190095
GVS: Gerrit_Virtual_Submit
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Tested-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agonet: wireless: bcmdhd_88: check privilege on priv cmd
Jerry Lee [Wed, 23 Mar 2016 21:33:50 +0000]
net: wireless: bcmdhd_88: check privilege on priv cmd

ANDROID-26425765 fix from
  https://android.googlesource.com/kernel/tegra.git

Original commit message:
> (cherry pick from commit 7b4bd6e41ed514dddf9e403472b1fb6f808d3f4b)
>
> check net admin capability for ioctl calls
>
> Signed-off-by: Jerry Lee <jerrylee@broadcom.com>
> Bug: 26425765
> Bug: 27997075
> Change-Id: Iae1b53aa62fdc24530bb1b85cb69740c87d182e9

Bug 1761317

Change-Id: I6ade4308b1763cbaf4d6291d8c08ee7a09048798
Signed-off-by: Jerry Lee <jerrylee@broadcom.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/1154016
(cherry picked from commit 4e8eef924737d0f7a05e362129d14600f5887f91)
Reviewed-on: http://git-master/r/1190094
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agonet: wireless: bcmdhd_88: Verify SSID length
Ashwin [Thu, 18 Feb 2016 22:37:04 +0000]
net: wireless: bcmdhd_88: Verify SSID length

ANDROID-26571522 fix from
  https://android.googlesource.com/kernel/msm.git

Original commit message:
> Ensure SSID length is correct before memcpy
>
> Bug: 26571522
> Bug: 27240072

Bug 1761317

Change-Id: I2b0279cd360fad613546c8aa280e0c6f4524763c
Signed-off-by: Ashwin <ashwin.bhat@broadcom.com>
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/1154017
(cherry picked from commit 8d15b72bf03b54f1f0e1698c416d50d606ff8e73)
Reviewed-on: http://git-master/r/1190093
GVS: Gerrit_Virtual_Submit
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Tested-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agonet: wireless: bcmdhd_88: [WAR] increase wifi turn off delay
Om Prakash Singh [Tue, 9 Feb 2016 01:04:37 +0000]
net: wireless: bcmdhd_88: [WAR] increase wifi turn off delay

When wifi power on fails, turn wifi off for sometime before attempting
next power on. Incrementally increase this wifi off time to allow previous
(failing) SDIO work to finish. Without this extended wait time subsequent
wifi power on attempts will fail.

Bug 1725516

Change-Id: I30f91f48d8a11bb899258a5e51e3f6c551752d0a
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1133280
(cherry picked from commit 6ba3f78e4abad38c870d501fd9dac758c637ca18)
Reviewed-on: http://git-master/r/1190044
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agopower: bq2419x: use VBUS and PG bits to detect cable
Venkat Reddy Talla [Fri, 22 Jul 2016 11:44:06 +0000]
power: bq2419x: use VBUS and PG bits to detect cable

as per BQ2419x datasheet, external USB cable(VBUS) can
be detected by using either VBUS_STAT bits or PG_STAT bit.
currently PG_STAT bit value used to detect cable state in
battery powered devices and self powered devices, but in battery
powered device(Hawkeye) observed intermittent issue where
cable detection is not proper with PG_STAT bit, so using
VBUS_STAT bits to detect VBUS, due to VBUS discharge delay after
disconnecting delay PG_STAT bit is used to detect cable state
this is observed in E2220 ERS platform.

Bug 200219069

Change-Id: Ie0fad5b88ed67a608b1c682f460b76f8981f2c3b
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1189500
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 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/1183903
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agovideo: tegra: dc: check dc enable before vsync op
Prafull Suryawanshi [Tue, 19 Jul 2016 06:56:04 +0000]
video: tegra: dc: check dc enable before vsync op

bug 200216637

This change adds check for dc enable before disabling
vsync. This fixes the warning for DC-clock gated when
dc is already disabled.

Change-Id: Iecba49b5f0a5b58f1259b587c91fa2f38e26c5f8
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/1183349
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 years agoUSB: fix invalid memory access in hub_activate()
Alan Stern [Wed, 16 Dec 2015 18:32:38 +0000]
USB: fix invalid memory access in hub_activate()

Commit 8520f38099cc ("USB: change hub initialization sleeps to
delayed_work") changed the hub_activate() routine to make part of it
run in a workqueue.  However, the commit failed to take a reference to
the usb_hub structure or to lock the hub interface while doing so.  As
a result, if a hub is plugged in and quickly unplugged before the work
routine can run, the routine will try to access memory that has been
deallocated.  Or, if the hub is unplugged while the routine is
running, the memory may be deallocated while it is in active use.

This patch fixes the problem by taking a reference to the usb_hub at
the start of hub_activate() and releasing it at the end (when the work
is finished), and by locking the hub interface while the work routine
is running.  It also adds a check at the start of the routine to see
if the hub has already been disconnected, in which nothing should be
done.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Alexandru Cornea <alexandru.cornea@intel.com>
Tested-by: Alexandru Cornea <alexandru.cornea@intel.com>
Fixes: 8520f38099cc ("USB: change hub initialization sleeps to delayed_work")
CC: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e50293ef9775c5f1cf3fcc093037dd6a8c5684ea)

CVE-2015-8816
Bug 1774591

Change-Id: Ifbbf8bfd456120b1e1720f4371c1ba15d1b948fa
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/1175595
GVS: Gerrit_Virtual_Submit
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoHID-Jarvis: serialize addition and deletion
David DSH [Mon, 20 Jun 2016 18:03:06 +0000]
HID-Jarvis: serialize addition and deletion

Due to how google handle sounds card, addition and deletion needs to be
serialized to prevent potential interface conflict

Bug 1756591

Change-Id: Id17c749eeb7c4482ac55da54ebde5300818a1fec
Signed-off-by: David DSH <ddastoussthi@nvidia.com>
Reviewed-on: http://git-master/r/1167904
(cherry picked from commit 60961de3ca61571f01ed047086f7d0e469fae687)
Reviewed-on: http://git-master/r/1172582
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoserial: tegra: add debugfs to print the tty buffer used
Shardar Shariff Md [Mon, 27 Jun 2016 17:31:49 +0000]
serial: tegra: add debugfs to print the tty buffer used

Add debugfs entry to print the tty buffer used count
Ex:
 #cat /d/70006300.serial/tty_buffer_count

Bug 200209337

Change-Id: I709edaba7810adaf3116ee8464a69e2f1558a883
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: http://git-master/r/1173079
(cherry picked from commit a6fd65932ba5d893a29f54e0a0aba55c06ecf519)
Reviewed-on: http://git-master/r/1171961
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agotty: add support to get tty buffer used
Shardar Shariff Md [Mon, 27 Jun 2016 17:27:25 +0000]
tty: add support to get tty buffer used

Add support to get currently occupied tty buffer count

Bug 200209337

Change-Id: If5d4809815c4da6a6e6211218df71c164395373b
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1173078/
(cherry picked from commit 71f1f80bd599c0f2bec1af85043ea249f0cc81d9)
Reviewed-on: http://git-master/r/1171960
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Tested-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agovideo: tegra: hdcp: init downstream work only once
Ken Chang [Thu, 26 May 2016 03:42:05 +0000]
video: tegra: hdcp: init downstream work only once

work initialization shall be done only once thus
move the code to an earlier place which is a part
of hdmi init callback.

Bug 1768426

Change-Id: Ic809fb1d4472e27e1bee62382afe886f8df94225
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit bbe579a1e54842e0f96ed2a04838b0680068cef7)
Reviewed-on: http://git-master/r/1166570
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 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
Reviewed-on: http://git-master/r/1011959
(cherry picked from commit 544ed2d95a1fd5564ad072a91ba1a156ff2d41b0)
(cherry picked from commit ff9e30551163c20da87a2825c3ad31aa6d5b97fe)
Reviewed-on: http://git-master/r/#/c/1177604
(cherry picked from commit 172d51e49fa530eb3d7a81ea7ea1dcf8fcfb3b18)
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1143232
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 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
Reviewed-on: http://git-master/r/1012839
(cherry picked from commit e27946db4cc054ab016459e3e16f3e68a51f0872)
(cherry picked from commit 48fd293c986e4d42e01c6cc5d6e2ba5ba4ee3a19)
Reviewed-on: http://git-master/r/1177603
(cherry picked from commit bc8d67ff4b5a263479dcef44f06c4288dab22fd2)
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1143231
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agovideo: tegra: host: fix nvhost_cmdbuf typo
Season Li [Wed, 27 Jul 2016 00:08:58 +0000]
video: tegra: host: fix nvhost_cmdbuf typo

cmdbuf_exts in nvhost_submit_args is type
nvhost_cmdbuf_ext, not nvhost_cmdbuf.

Bug 1793104

Change-Id: If7d446e0176111354d82469833adaf2daa04b302
Signed-off-by: Season Li <seasonl@nvidia.com>
Reviewed-on: http://git-master/r/1191132
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 years agoANDROID: dm verity fec: initialize recursion level
Sami Tolvanen [Fri, 17 Jun 2016 18:31:17 +0000]
ANDROID: dm verity fec: initialize recursion level

Explicitly initialize recursion level to zero at the beginning of each
I/O operation.

bug 200207661
bug 200216410

Change-Id: I00c612be2b8c22dd5afb65a739551df91cb324fc
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
(cherry picked from commit 32ffb3a22d7fd269b2961323478ece92c06a8334)
Reviewed-on: http://git-master/r/1183327
Reviewed-by: Ian Chang <ianc@nvidia.com>
Tested-by: Ian Chang <ianc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>

3 years agodm verity fec: limit error correction recursion
Sami Tolvanen [Fri, 3 Jun 2016 21:06:14 +0000]
dm verity fec: limit error correction recursion

If verity tree itself is sufficiently corrupted in addition to data
blocks, it's possible for error correction to end up in a deep recursive
error correction loop that eventually causes a kernel panic as follows:

[   14.728962] [<ffffffc0008c1a14>] verity_fec_decode+0xa8/0x138
[   14.734691] [<ffffffc0008c3ee0>] verity_verify_level+0x11c/0x180
[   14.740681] [<ffffffc0008c482c>] verity_hash_for_block+0x88/0xe0
[   14.746671] [<ffffffc0008c1508>] fec_decode_rsb+0x318/0x75c
[   14.752226] [<ffffffc0008c1a14>] verity_fec_decode+0xa8/0x138
[   14.757956] [<ffffffc0008c3ee0>] verity_verify_level+0x11c/0x180
[   14.763944] [<ffffffc0008c482c>] verity_hash_for_block+0x88/0xe0

This change limits the recursion to a reasonable level during a single
I/O operation.

bug 200207661
bug 200216410

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Change-Id: I0a7ebff331d259c59a5e03c81918cc1613c3a766
Reviewed-on: http://git-master/r/1183264
Reviewed-by: Ian Chang <ianc@nvidia.com>
Tested-by: Ian Chang <ianc@nvidia.com>
Reviewed-by: Robert Shih <rshih@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agocfboost: Boost on MSC_ACTIVITY and any ABS
Brian Harris [Thu, 1 May 2014 17:37:51 +0000]
cfboost: Boost on MSC_ACTIVITY and any ABS

Modifies cfboost to trigger on EV_MSC=MSC_ACTIVITY and any EV_ABS. Also added
a timeout between boosts equal to half the boost duration since it will be
getting a lot more events now. This makes cfboost more resilient to touch
driver changes.

Bug 1509022

Change-Id: I734cdce22b6a1f65466924a92768c2afd4992960
Signed-off-by: brianh@nvidia.com
Reviewed-on: http://git-master/r/404285
(cherry picked from commit 66f5b8b0b842c6792da6f70196a09f145182e972)
Reviewed-on: http://git-master/r/747674
(cherry picked from commit 6a79891def064c7c35f20edcee55f60ad33c3fb7)
Reviewed-on: http://git-master/r/1164608
Reviewed-by: David Pu <dpu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jordan Nien <jnien@nvidia.com>
Tested-by: Jordan Nien <jnien@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 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/1151796
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>

3 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/1141283
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>

3 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/1141282
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>

3 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/1141281
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>

3 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/1151795
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>

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

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

Bug 1768847

Change-Id: I324ff9c191902ee24f2d3e008c26246e4617c176
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1177152
(cherry picked from commit 81e14c78944d1af451d2b6078e02a056cb8f6cdd)
Reviewed-on: http://git-master/r/1178682
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>

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

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

Bug 1768847

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

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

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

Bug 1768847

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

3 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/1178679
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 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/1178678
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 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/1178677
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agoslab: cpu_get_cache: use get_cpu, put_cpu calls
Vaibhav Shinde [Fri, 3 Jun 2016 10:17:49 +0000]
slab: cpu_get_cache: use get_cpu, put_cpu calls

smp_processor_id() is called in preemptible code
from cpu_get_cache function

Bug 200200711

Change-Id: Ie16a65218c747e08ae1bb7bff21aebea02e7fa51
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-on: http://git-master/r/1158670
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoiio: imu: Invensense 5.2.0: Update to latest tool chain.
Robert Collins [Tue, 24 May 2016 18:32:28 +0000]
iio: imu: Invensense 5.2.0: Update to latest tool chain.

Bug 1770082

Change-Id: Ied83660c9afb92bb3dcb2fe0b348f5b7ee6ea4ca
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1152681
(cherry picked from commit e48cc5d3958e91b9bd5f623d872da6f59cc3ea66)
Reviewed-on: http://git-master/r/1178676
Tested-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

3 years agoiio: imu: Invensense: Update to official 5.2.0 code base.
Robert Collins [Tue, 24 May 2016 17:39:45 +0000]
iio: imu: Invensense:  Update to official 5.2.0 code base.

Bug 1770082

Change-Id: I0870b3ba9e0ab0321348801d4943abc0cc8b209a
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1152680
(cherry picked from commit f7c0ae6c7578fb1d34701f763745cabd0edbc183)
Reviewed-on: http://git-master/r/1178675
Tested-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

3 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/1178674
Tested-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

3 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/1178673
Tested-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

3 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/1178672
Tested-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

3 years agoiio: imu: nvi v.328 fix wake IRQ
Erik Lilliebjerg [Tue, 24 May 2016 00:28:14 +0000]
iio: imu: nvi v.328 fix wake IRQ

- Some sensors require other sensors to be enabled (significant motion requires
  accelerometer) which caused the setting of the ICM DMP wake IRQ to be
  incorrect.  Fixed by basing the ICM DMP wake IRQ setting on only the intended
  enabled sensors (enabled from HAL as opposed to enabled due to dependency).

Bug 200199302

Change-Id: Ia8fe2f475c1cac1efc3606b4250633655facc874
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1152136
(cherry picked from commit 97c50202f49092f7c762b96e7b417e27385a6c04)
Reviewed-on: http://git-master/r/1158346
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agoplatform: tegra: enable motion_int wake
Akhilesh Reddy Khumbum [Fri, 20 May 2016 20:56:36 +0000]
platform: tegra: enable motion_int wake

- Enable wake63 for motion_int: The GPIO_PX2 to which the MPU hw irq
  is routed is currently not configured as a wake up source and because
  of this when the system goes into suspend, the MPU irq is unable to
  wake the system up.

Bug 200199302

Change-Id: If27acc8d077b691aa671ce6c1a59e9adcf0f3304
Signed-off-by: Akhilesh Reddy Khumbum <akhumbum@nvidia.com>
Reviewed-on: http://git-master/r/1151301
(cherry picked from commit 4bef08e949bce50908cacac793df159f141bb112)
Reviewed-on: http://git-master/r/1158345
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agodts: sensors: Fix sensor orientation matrix
Robert Collins [Mon, 23 May 2016 14:33:26 +0000]
dts: sensors: Fix sensor orientation matrix

Bug 200189040

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

3 years agoiio: imu: nvi v.327 ICM DMP matrix
Erik Lilliebjerg [Mon, 23 May 2016 14:13:46 +0000]
iio: imu: nvi v.327 ICM DMP matrix

- Change how the NVI driver handles sensor mounting matrix from a localized
  method to a global method.

Bug 200189040

Change-Id: I8842389e8a954945c0ea4219edef95dd730a3c19
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1151863
(cherry picked from commit 0622db2cf9e89f03e72b8fb9ee92e19b29a3e4ae)
Reviewed-on: http://git-master/r/1158343
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agoiio: imu: nvi v.326 DMP configuration
Erik Lilliebjerg [Mon, 23 May 2016 14:05:29 +0000]
iio: imu: nvi v.326 DMP configuration

- Add device tree ICM DMP sensor configuration allowing which sensors enable
  the ICM DMP.
- Add this configuration ability at runtime.

Bug 200189040

Change-Id: Ifb3c4e6cd2535b4271d1bc1cb931876b62f5486b
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1151862
(cherry picked from commit 273dfcf8424192cfcced79a6e14b0b7a3230b0fe)
Reviewed-on: http://git-master/r/1158342
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agoiio: imu: nvi v.325 ICM DMP support
Erik Lilliebjerg [Mon, 23 May 2016 08:27:46 +0000]
iio: imu: nvi v.325 ICM DMP support

The following done to support the Invensense ICM DMP:
- Add ability for AUX client to select the AUX port.
- Add efficient AUX device enable/disable.
- Add sensor accuracy.
- Add DMP initialization after AUX device registers.

Bug 200189040

Change-Id: Ibfb93703f9e10a69bb0164bde3b0d1c16f0fc0ec
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1151696
(cherry picked from commit c3f4471e90fde5409cead50dfcbaf0a4700c69f5)
Reviewed-on: http://git-master/r/1158341
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agoiio: imu: nvi v.324 Fix wake up IRQ
Erik Lilliebjerg [Thu, 19 May 2016 19:44:43 +0000]
iio: imu: nvi v.324 Fix wake up IRQ

- The DMP IRQ mode is selected by which sensors are enabled which is tracked
  by a bit mask.  The bug was that this bit mask was not clearing the bit
  pertaining to a disabled sensor and hence the DMP was programming the
  incorrect IRQ mode when suspending.

Bug 200199302

Change-Id: Id4fa3f1bc96041a3c5eb81689af0a5be04075697
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1150633
(cherry picked from commit 73a907d169612ce79ca6363c7bbd7661e6a8c335)
Reviewed-on: http://git-master/r/1158340
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agoRevert "Revert "iio: meter: Coverity: Use secure snprintf to prevent buffer overrun.""
Robert Collins [Thu, 19 May 2016 23:45:28 +0000]
Revert "Revert "iio: meter: Coverity: Use secure snprintf to prevent buffer overrun.""

This reverts commit 11eb58677582c320c043e60f2ef942b64c29ad0a.

Bug 1768847
Bug 200199302

Change-Id: I9b52a3a34d4b997e52fbcf8c93f6c2b973a70a3d
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1150887
(cherry picked from commit 6e99b208ff68d8accc327eff21bd93c2914888a8)
Reviewed-on: http://git-master/r/1158339
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>

3 years agoRevert "Revert "iio: meter: Coverity: Use secure snprintf to prevent buffer overrun.""
Robert Collins [Thu, 19 May 2016 23:45:11 +0000]
Revert "Revert "iio: meter: Coverity: Use secure snprintf to prevent buffer overrun.""

This reverts commit a0b285d279bbf401df76747d900c6cfa4e0f7169.

Bug 1768847
Bug 200199302

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

3 years agoRevert "Revert "iio: meter: Coverity: Use secure snprintf to prevent buffer overrun.""
Robert Collins [Thu, 19 May 2016 23:44:46 +0000]
Revert "Revert "iio: meter: Coverity: Use secure snprintf to prevent buffer overrun.""

This reverts commit bc6623967cdc27b0ded3362bb7ce3389da69d857.

Bug 1768847
Bug 200199302

Change-Id: I82719897f8e1280941bcd1d88a8ca572b95b0cb4
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1150885
(cherry picked from commit 134977ec10625e29b3c41071276c91522c6c9eee)
Reviewed-on: http://git-master/r/1158337
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>

3 years agoRevert "Revert "iio: mag: Coverity: Correct data case to prevent endian confusion.""
Robert Collins [Thu, 19 May 2016 23:44:26 +0000]
Revert "Revert "iio: mag: Coverity: Correct data case to prevent endian confusion.""

This reverts commit 257d2c73e108ae23f4de16f21a6d1d2d2b5e5178.

Bug 1768847
Bug 200199302

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

3 years agoRevert "Revert "iio: mag: Coverity: Use secure snprintf to prevent buffer overrun.""
Robert Collins [Thu, 19 May 2016 23:43:59 +0000]
Revert "Revert "iio: mag: Coverity: Use secure snprintf to prevent buffer overrun.""

This reverts commit 73dd99e9895e3122b7421016f04cd8ba683416f4.

Bug 1768847
Bug 200199302

Change-Id: I6513d9f9476093a8ad1911b9395fb0cba4a0f4ba
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1150883
(cherry picked from commit 8599294bf2bca38a71f8e0067308db6f44ec2d45)
Reviewed-on: http://git-master/r/1158335
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>

3 years agoRevert "Revert "iio: imu: NVI v.323 Fix ICM significant motion""
Robert Collins [Thu, 19 May 2016 23:43:10 +0000]
Revert "Revert "iio: imu: NVI v.323 Fix ICM significant motion""

This reverts commit 0b88ff780663b3e9a113b3fdb9c7827f2e7b8c89.

Bug 1768847
Bug 200199302

Change-Id: I9f71e0b75399d2b458d93c8d503b69e31400b3fc
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1150882
(cherry picked from commit 9c987ca17a809138be9e7f9f19d236c99e105ac5)
Reviewed-on: http://git-master/r/1158334
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>

3 years agoRevert "Revert "dtsi: sensors: Limit gyroscope min frequency to 10hz""
Robert Collins [Thu, 19 May 2016 23:42:50 +0000]
Revert "Revert "dtsi: sensors: Limit gyroscope min frequency to 10hz""

This reverts commit 7b5e11c50fe63ab67954c0e12bd28f768b1c1305.

Bug 1768847
Bug 200199302

Change-Id: I0dda0dd082167d4fb62999fca650f7332a124c84
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1150881
(cherry picked from commit 160aefa10ab2bd0aead1ca3c53bc6c8a7b85aaf8)
Reviewed-on: http://git-master/r/1158333
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>

3 years agoRevert "Revert "iio: imu: NVI v.322 Fix sensor DT configuration""
Robert Collins [Thu, 19 May 2016 23:42:24 +0000]
Revert "Revert "iio: imu: NVI v.322 Fix sensor DT configuration""

This reverts commit 6f8d093c8dd69fffff32fda150cc07c3dbad431e.

Bug 1768847
Bug 200199302

Change-Id: Ib7f008c12da871475d2560569da31cde87064c30
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1150880
(cherry picked from commit 99879a3c3e43e0c794d569308653d92249ca1073)
Reviewed-on: http://git-master/r/1158332
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>

3 years agoRevert "Revert "iio: imu: nvi: v.321 Spawn probe function into separate thread.""
Robert Collins [Thu, 19 May 2016 23:41:43 +0000]
Revert "Revert "iio: imu: nvi: v.321 Spawn probe function into separate thread.""

This reverts commit 026b5b631960d6e7c2b1e866a45df7cbbf18ee12.

Bug 1768847
Bug 200199302

Change-Id: Iccf33a0671079b99f1625b591cc41b9a10d680dc
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1150879
(cherry picked from commit 901359a97624ef22dfc78a86066b4b14fc4d07c3)
Reviewed-on: http://git-master/r/1158331
GVS: Gerrit_Virtual_Submit
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>

3 years agoRevert "Revert "iio: imu: nvi: v.320 ICM DMP support""
Robert Collins [Thu, 19 May 2016 23:41:07 +0000]
Revert "Revert "iio: imu: nvi: v.320 ICM DMP support""

This reverts commit 054670a6aa3632a1e0dd3604d47e1548c764fcbf.

Bug 1768847
Bug 200199302

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

3 years agoARM64: dts: hawkeye: remove thermal zone for modem
Vaibhav Shinde [Thu, 16 Jun 2016 09:25:22 +0000]
ARM64: dts: hawkeye: remove thermal zone for modem

Bug 200207382

Change-Id: I1737cd5bf1d57c9428cadb673160c2c5ea5d02eb
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-on: http://git-master/r/1165749
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agof2fs: add check for bmap param
Nitin Kumbhar [Thu, 7 Jul 2016 06:01:06 +0000]
f2fs: add check for bmap param

Validate parameter passed to the ioctl_fibmap function
that could lead to an array overflow. This is fixed by
adding a max block check for get_data_block_bmap.

CVE-2016-3802
Bug 1774591

Change-Id: If2280bb30ed06221faaae2de37cf3eccc0d25273
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/1176676
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agotegra: dc: hdcp: Fix for receiver content playback
Pranami Bhattacharya [Thu, 16 Jun 2016 01:48:57 +0000]
tegra: dc: hdcp: Fix for receiver content playback

- This fixes content playback when A/V receiver is connected
- re-using opened session for V' verification
- passing tsec gsc address as input for V' verification

Bug 200209966

Change-Id: Ia3cbd03e80d4f6e2f9f3bca244dba7ef9c767949
Signed-off-by: Pranami Bhattacharya <pranamib@nvidia.com>
Reviewed-on: http://git-master/r/1165357
Reviewed-on: http://git-master/r/1176371
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agokernel: tlk: Communicate with hdcp TA from kernel
Pranami Bhattacharya [Sun, 8 May 2016 21:46:45 +0000]
kernel: tlk: Communicate with hdcp TA from kernel

- Needed for SRM rollback protection.
- Need a method of communication between kernel and TZ.
- The hdcp driver calls hdcp TA to program generate CMAC.
- The CMAC is passed back to the kernel for validation.
- Uses shared memory for communication.

Bug 1717885

Change-Id: Ia720d94e05d4b9846f90d62269d258737b3da050
Signed-off-by: Pranami Bhattacharya <pranamib@nvidia.com>
Reviewed-on: http://git-master/r/1169664
Reviewed-on: http://git-master/r/1176364
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoSRM rollback protection
Pranami Bhattacharya [Sun, 8 May 2016 21:30:00 +0000]
SRM rollback protection

This does the following-
- Send method for nonce generation in ucode
- Communicate with hdcp TA to pass nonce
- Get the cmac from hdcp TA
- Pass cmac to ucode
- OPEN: verify vprime  in DP needs FIX

Bug 1717885

Change-Id: Ib75eeee0fbb78c8e97be4c7e03141241a31fc5c2
Signed-off-by: Pranami Bhattacharya <pranamib@nvidia.com>
Reviewed-on: http://git-master/r/1169667
Reviewed-on: http://git-master/r/1176363
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agotty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
Peter Hurley [Mon, 11 Jan 2016 06:40:55 +0000]
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)

ioctl(TIOCGETD) retrieves the line discipline id directly from the
ldisc because the line discipline id (c_line) in termios is untrustworthy;
userspace may have set termios via ioctl(TCSETS*) without actually
changing the line discipline via ioctl(TIOCSETD).

However, directly accessing the current ldisc via tty->ldisc is
unsafe; the ldisc ptr dereferenced may be stale if the line discipline
is changing via ioctl(TIOCSETD) or hangup.

Wait for the line discipline reference (just like read() or write())
to retrieve the "current" line discipline id.

CVE-2016-0723
Bug 1774591

Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 5c17c861a357e9458001f021a7afa7aab9937439)
Change-Id: Ie8de32a16a05fe7a5b444301ead0d5c32a805a13
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/1175591
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agovideo: adf: avoid tear down of same dma-buf attachment
Nitin Kumbhar [Tue, 5 Jul 2016 10:34:52 +0000]
video: adf: avoid tear down of same dma-buf attachment

The adf_device_post_nocopy function eventually calls the dma_buf_attach
and dma_buf_map_attachment functions. If the dma_buf_attach function
succeeds but the dma_buf_map_attachment function fails, both
the adf_buffer_map function and the adf_device_post_nocopy function
will call the dma_buf_detach function to tear down the same dma-buf
attachment. Fix this by zeroing out the mapping data so it doesn't
get cleaned up twice.

This fixes elevation of privilege vulnerability.

CVE-2016-3811
Bug 1774591

Change-Id: Ib7b0e88755d61d5d0e43a7204c5dd329fafc5c58
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/1175584
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agoAIO: properly check iovec sizes
Greg Kroah-Hartman [Sat, 20 Feb 2016 01:36:21 +0000]
AIO: properly check iovec sizes

In Linus's tree, the iovec code has been reworked massively, but in
older kernels the AIO layer should be checking this before passing the
request on to other layers.

Many thanks to Ben Hawkes of Google Project Zero for pointing out the
issue.

Bug 1774591

Reported-by: Ben Hawkes <hawkes@google.com>
Acked-by: Benjamin LaHaise <bcrl@kvack.org>
Tested-by: Willy Tarreau <w@1wt.eu>
[backported to 3.10 - willy]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit ff19ac8fb71e8a2bf07d61b959062998139c1104)
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Change-Id: Ia91c9dcbb605fefa8cd186bc0c896f1cd8aec4eb
Reviewed-on: http://git-master/r/1175560
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

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

3 years agotlk_driver: Drop Log Level for open_session prints
Anand Prasad [Tue, 21 Jun 2016 18:17:12 +0000]
tlk_driver: Drop Log Level for open_session prints

The open client session prints tend to spam the logs when there are
several requests into the TLK driver to the same TA.
Drop the logger level for those prints so only developers that
require it, enable it.

Bug 1779951

Change-Id: I1765adf963bfc909967f78e7798e2c0d01404442
Signed-off-by: Anand Prasad <anprasad@nvidia.com>
Reviewed-on: http://git-master/r/1168741
(cherry picked from commit fc0949f10b9e84d530d98005cc0febaee8583dae)
Reviewed-on: http://git-master/r/1171130
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 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/1169255
Reviewed-by: Automatic_Commit_Validation_User

3 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/1173218
Tested-by: Anatoly Nikiforov <anikiforov@nvidia.com>
Reviewed-by: Anatoly Nikiforov <anikiforov@nvidia.com>

3 years agonet: wireless: bcmdhd: reduce packet timeout to 100ms
Leo He [Fri, 4 Mar 2016 02:57:30 +0000]
net: wireless: bcmdhd: reduce packet timeout to 100ms

bug 200153029

This packet timeout prevents system entering syspend.
This 500ms timeout is too long, which will slow
resume/suspend cycle in WiFi wakeup, so reducing it to 100ms.
Also, BRCM confirmed that it's safe to remove this timeout.

Change-Id: I62dd11e292d3c9fbfe959d76fc510c2115958b7e
Signed-off-by: Leo He <leoh@nvidia.com>
Reviewed-on: http://git-master/r/1023810
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 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/1172522
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 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/1172521
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoarm64: dts: darcy: update fastboot instruction
Yunfan Zhang [Fri, 17 Jun 2016 07:12:01 +0000]
arm64: dts: darcy: update fastboot instruction

- Update fastboot menu navigation with X/Y instead of D-pad
- To make fastboot menu to be consistent with recovery menu
  X/Y to navigation
  A to select

Bug 1755901

Change-Id: I591dbc0f6124566278df5f3dde360b6e5e2422ef
Signed-off-by: Yunfan Zhang <yunfanz@nvidia.com>
Reviewed-on: http://git-master/r/1166711
(cherry picked from commit f6a8b217a6ee3a9fde923a97462a0d04cde58899)
Reviewed-on: http://git-master/r/1171580
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoinput: touch: sharp: disable irq from pm suspend
David Pu [Tue, 21 Jun 2016 23:53:37 +0000]
input: touch: sharp: disable irq from pm suspend

if touch is not disabled from input_disable sysfs node, userspace daemon
won't receive SLEEP signal from driver and it won't put touch controller
in sleep state, it will trigger unexpected interrupts which will block
system suspend when turn touch avdd off. disable irq if tap to wake is
not enabled(if tap to wake is enabled, avdd is always on so no interrupt
will be triggered when suspend).

Bug 200211228

Change-Id: Idd18f10bc5ba7ca29636da09e7ce541341ad597c
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/1168955
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jordan Nien <jnien@nvidia.com>
Tested-by: Jordan Nien <jnien@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agotegra:nvavp: Fix buffer overflow issue
Praveen Kumar Reddy M.V [Mon, 13 Jun 2016 11:38:32 +0000]
tegra:nvavp: Fix buffer overflow issue

Fixed possible buffer overflow issue in func
nvavp_pushbuffer_update().

Bug 1774401

Change-Id: Id0dec1cbf91d492335d0809c3c0bf146f6cb9d3d
Signed-off-by: Praveen Kumar Reddy M.V. <pkreddy@nvidia.com>
Reviewed-on: http://git-master/r/1163365
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoarm: t124: enable CONFIG_EXT4_USE_FOR_EXT23
Ian Chang [Thu, 23 Jun 2016 02:58:35 +0000]
arm: t124: enable CONFIG_EXT4_USE_FOR_EXT23

as we port EXT4 file system from 3.18 for file
base encryption, some APIs will be changed and it
broke EXT3 file system. Set CONFIG_EXT4_USE_FOR_EXT23 to
true so we still can support EXT3.

bug 200205692
bug 200207661

Change-Id: I681d55ccceeddc1db8a77f8c206a44d74891e0ef
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/1169987
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>

3 years agovideo: tegra: nvmap: remove nvmap_vm_insert_handle()
Sri Krishna chowdary [Tue, 21 Jun 2016 14:34:46 +0000]
video: tegra: nvmap: remove nvmap_vm_insert_handle()

Inserting new pages in a handle to a vma does not seem
to improve perf in most cases and so is more like overhead.
Remove this path. Accounting dirty pages should not hold
handle lock again from within nvmap_handle_mk(), so add
an argument to it to avoid taking the lock again from
_nvmap_handle_mkdirty().

This also avoids a coverity defect.

Coverity ID 32110

bug 200174682

Change-Id: I0a04f554dda1aa2f27dd81fcae08b7dc8adfe249
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
(cherry picked from commit 3a959fad6c958c0572b7a216168558382c029391)
Reviewed-on: http://git-master/r/1169400
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agovideo: tegra: nvmap: optimize handle mk clean/dirty operations
Sri Krishna chowdary [Fri, 11 Mar 2016 17:35:50 +0000]
video: tegra: nvmap: optimize handle mk clean/dirty operations

When handle has all clean pages, avoid any further clean operation.
Similarly for dirty pages. This avoids any unnecessary overeheads
in empty cuda kernel launch whose buffer is not accessed by cpu
before passing to GPU.

bug 200174682

Change-Id: Iac40de5b6d07a5abc6590647665768fd1965a130
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1029688
(cherry picked from commit 244bb96eda9fab1ad21779a07c32f5ad91fc71b8)
Reviewed-on: http://git-master/r/1163348
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/1169399
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoRevert "arm: t124: use mdelay instead of msleep"
Ian Chang [Wed, 22 Jun 2016 05:09:24 +0000]
Revert "arm: t124: use mdelay instead of msleep"

bug 200173166

This reverts commit b55a20095989e20b12d25d4b797323c1c44c7ddd.

Change-Id: I085d3226c0495edc24a90c5d83695e7c8f32999f
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/1169107
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>

3 years agogpu: nvgpu: Fix gk20a_busy() in debug dump
Terje Bergstrom [Mon, 13 Jun 2016 15:27:30 +0000]
gpu: nvgpu: Fix gk20a_busy() in debug dump

When debug dump is called from an interrupt thread, we do not want
to call gk20a_busy() because it causes race in case rail gating is
being engaged at the same time. It has to be called from all debugfs
paths.

Bug 200198908
Bug 1770522

Change-Id: I7eda7d029b0a59cce0320ecc1b750dc2f4d7ccf0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1163440
(cherry picked from commit 1409d216e536f742700f1ef23a17481509024799)
Reviewed-on: http://git-master/r/1168385
GVS: Gerrit_Virtual_Submit
Tested-by: Deepak Nibade <dnibade@nvidia.com>

3 years agogpu: nvgpu: Do not register debug dump to nvhost
Terje Bergstrom [Mon, 13 Jun 2016 16:01:50 +0000]
gpu: nvgpu: Do not register debug dump to nvhost

Do not register device for debug dump to nvhost. This can cause races
if nvhost calls debug dump spew at the same time when GPU is being
powered off.

Bug 200198908
Bug 1770522

Change-Id: Ia7e57437d647041e82dd4c61ffd08fb1cbe1f32f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1163441
(cherry picked from commit 768dc5ad42c927c0a272f7d14b9e3ac0378378a6)
Reviewed-on: http://git-master/r/1168384
GVS: Gerrit_Virtual_Submit
Tested-by: Deepak Nibade <dnibade@nvidia.com>

3 years agovideo: tegra: host: remove gpu debug dump
Deepak Nibade [Tue, 21 Jun 2016 08:45:01 +0000]
video: tegra: host: remove gpu debug dump

Calling gk20a debug dump from nvhost can cause races
if nvhost calls debug dump at the same time when GPU is being
powered off.

Bug 200198908
Bug 1770522

Change-Id: If3238b44e29b944183d71180f038d9c3c6ed645b
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1168383
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

3 years agovideo: tegra: sor: fix dc locking in sor_crc_show
Santosh Reddy Galma [Fri, 10 Jun 2016 12:34:40 +0000]
video: tegra: sor: fix dc locking in sor_crc_show

fix improper placement of dc lock and check for
sor partition powergating before accessing SOR registers.

Bug 200204933

Change-Id: I7908127137e0ba38af92dc545ebb1f7133a35e88
Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com>
Reviewed-on: http://git-master/r/1162500
(cherry picked from commit d3ddcba434df7f0a32e07e079e64b45ff3b363f9)
Reviewed-on: http://git-master/r/1165033
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

3 years agoarm64:t210: enable ext4 file encryption
Ian Chang [Tue, 21 Jun 2016 17:15:43 +0000]
arm64:t210: enable ext4 file encryption

bug 200207661
bug 200205692

Change-Id: I1dfe74627d0c000cb3643001a7be78cdf4961f74
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/1168646
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoMerge "Merge remote-tracking branch 'remotes/origin/dev/n_preview_ext4_crypto' into...
mobile promotions [Wed, 22 Jun 2016 11:55:46 +0000]
Merge "Merge remote-tracking branch 'remotes/origin/dev/n_preview_ext4_crypto' into rel-24" into rel-24

3 years agopinctrl: max77620: ignore default config for FPS source only
Venkat Reddy Talla [Wed, 25 May 2016 09:18:05 +0000]
pinctrl: max77620: ignore default config for FPS source only

Currently configuring power up/down period is ignored if
power up/down period value 4 passed through DTS node,
because there is a check in driver to ignore configuring
FPS source if FPS source is FPS_SRC_DEF(value 4),
made changes to ignore FPS source configuration only
if OTP/default config needs to be used with out
ignoring power up/down period configuration.

Bug 200163523

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

3 years agoARM64: DTS: disable DTS nodes based on ODM data
Venkat Reddy Talla [Mon, 20 Jun 2016 10:53:34 +0000]
ARM64: DTS: disable DTS nodes based on ODM data

Disabling DTS nodes based on ODM data bits.

Bug 200210832

Change-Id: Iad1fc46ed7723cfccb0016b62c7f75487ea3ec68
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1167789
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Vaibhav Shinde <vashinde@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agoarm64: dts: HE: enable some nodes by default
Harry Lin [Fri, 17 Jun 2016 03:23:59 +0000]
arm64: dts: HE: enable some nodes by default

DT nodes were default disabled and enabled by
odmdata.
Now with plugin-manager, nodes set in odmdata are
enabled/ disabled under control of DT node
"plugin-manager".
But plugin-manager support path is not in
bootloader and we need some nodes enabled in BL.
Enable these nodes by default.
If a platform need it disabled, it needs to set
odmdata and add corresponding odm entry's overlay
under DT node "plugin-manager".

Bug 200206776

Change-Id: Ib237c88aab9f8692210530ec540bf6ac59b0d93e
Signed-off-by: Harry Lin <harlin@nvidia.com>
Reviewed-on: http://git-master/r/1166571
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agoserial: tegra: de-activate RTS before reading the data
Shardar Shariff Md [Fri, 17 Jun 2016 11:35:11 +0000]
serial: tegra: de-activate RTS before reading the data

In RX path in PIO mode, deactivate RTS before reading and
activate after reading.

Bug 200210200

Change-Id: Ic0506980592fe2b53b1e2711b10c5cd3946488a8
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1166915
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agoMerge remote-tracking branch 'remotes/origin/dev/n_preview_ext4_crypto' into rel-24
Ian Chang [Tue, 21 Jun 2016 17:26:12 +0000]
Merge remote-tracking branch 'remotes/origin/dev/n_preview_ext4_crypto' into rel-24

bug 200205692
bug 200207661

Change-Id: I3fdfaf519d7ca8096c876266755c3b278e8c3346
Signed-off-by: Ian Chang <ianc@nvidia.com>

3 years agovideo: tegra: hdmi: fix hdmi hpd state machine
Santosh Reddy Galma [Fri, 20 May 2016 15:01:14 +0000]
video: tegra: hdmi: fix hdmi hpd state machine

-send hdmi hot-unplug notification to userspace
if EDID changed after rechecking EDID during resume
in suspend-resume path.
- re-factoring tegra_hdmi_hpd_worker

Bug 200195385

Change-Id: I3917bc5e8c2b2fe71022e9765693043304d33739
Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com>
Reviewed-on: http://git-master/r/1151171
(cherry picked from commit f08647fc0ac56974fc178a7f8dc8d9e8c85eff38)
Reviewed-on: http://git-master/r/1165047
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

3 years agoarch: arm64: boot: dts: HDMI Support
Bhanu Murthy V [Thu, 9 Jun 2016 22:43:04 +0000]
arch: arm64: boot: dts: HDMI Support

Remove HDMI node in PCL list of devices as
camera SW stack path is not supported for this driver.
IMX274 module cannot be supported as default board
and entries in plugin manager is causing the HDMI
driver to stay in disabled state.
Fix made to remove stray entries which disable HDMI
in DT for flash target IMX274 module.

Bug 200178647

Change-Id: I75f73c8177b088fa703fac986842d90323d8c981
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1162034
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agoarch: arm64: dt: update cropping feature support
Bhanu Murthy V [Thu, 9 Jun 2016 21:30:04 +0000]
arch: arm64: dt: update cropping feature support

Add post_crop_frame_drop flag to support cropping
in E3322/E3333 modules. Without the flag userspace
fails to initialize the sensor

Bug 200182321

Change-Id: I90016d5f6a299c338932fe2a56900c6f4c784bbc
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1161994
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agoarch: configs: Add E3323/E3322 support for L4T
Bhanu Murthy V [Thu, 9 Jun 2016 20:34:38 +0000]
arch: configs: Add E3323/E3322 support for L4T

Add E3323, E3322 support for media controller
drivers in L4T

boot.img size is increased by 37064 bytes

Bug 200182321
Bug 1742111

Change-Id: Ibe8936d66ad56f1550ec7afd889247cc67fdf55c
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1161961
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Wenjia Zhou <wenjiaz@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agoJarvis/Pepper: Locking problem
David DSH [Fri, 3 Jun 2016 02:50:17 +0000]
Jarvis/Pepper: Locking problem

Make the FIFO thread safe

Note:
1) adding, removing and working with hdev needs a better scheme
2) We could remove the memory barrier around fifo controller operations

Bug 1769217

Change-Id: Idf388261aee32150523cd98c7a0d6b4d592542d0
Signed-off-by: David DSH <ddastoussthi@nvidia.com>
Reviewed-on: http://git-master/r/1152033
(cherry picked from commit 95e996f43754d8817330557e52547ef7c08003e4)
Reviewed-on: http://git-master/r/1165942
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoHID: usbhid: more mice with ALWAYS_POLL
Oliver Neukum [Mon, 30 Mar 2015 10:36:35 +0000]
HID: usbhid: more mice with ALWAYS_POLL

[ Upstream commit 003e817a9ecf6cfded59630858bbf04056d71e9a ]

During a stress test these mice kept dropping and reappearing
in runlevel 1 as opposed to 5.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 6ec16957394dec27288a2e3ba1bb29486a5a4392 in mainline v3.18)

Bug 200094818

Change-Id: I8be974e95bd725d02eca356032f8beefcbfa6b37
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1154423
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

3 years agoHID: usbhid: add always-poll quirk
Johan Hovold [Fri, 5 Sep 2014 16:08:47 +0000]
HID: usbhid: add always-poll quirk

Add quirk to make sure that a device is always polled for input events
even if it hasn't been opened.

This is needed for devices that disconnects from the bus unless the
interrupt endpoint has been polled at least once or when not responding
to an input event (e.g. after having shut down X).

Bug 200094818

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 0b750b3baa2d64f1b77aecc10f20deeb28efe60d in mainline v3.18)

Change-Id: I8220fa3c64b64b5fbadec0c3db231d1266342af4
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1154422
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>