4 years agoplatform: tegra: powergate: disable powergate for SE2 on T214
Krishna Reddy [Tue, 23 May 2017 22:07:29 +0000]
platform: tegra: powergate: disable powergate for SE2 on T214

ISP2 is replaced with SE2 on T214.
Disable powergate for SE2 on T214.

Bug 1811409

Change-Id: I53148f385a6a52b6995ed6d69ee3d0bb165925e5
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/1488276
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>

4 years agoplatform: tegra: mc: update mcerror client list for T214
Krishna Reddy [Tue, 23 May 2017 22:06:28 +0000]
platform: tegra: mc: update mcerror client list for T214

ISP2 mc client is replaced with SE2 in T214.
Bug 1811409

Change-Id: I6a948738449f6404c53adb8ed8f4e4cf4d500b7e
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/1488275
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>

4 years agoarm64: Fix up potential integer overflow
Sai Gurrappadi [Wed, 31 May 2017 23:05:27 +0000]
arm64: Fix up potential integer overflow

raw_capacity is a u32 which could potentially overflow when shifted with
SCHED_CAPACITY_SHIFT. Cast it as a u64 to prevent this.

Change-Id: Idcf3dc0979a87919279cb2261d8935a354500b70
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1493442
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agodmaengine: tegra-apb: Really fix runtime-pm usage
Jon Hunter [Wed, 31 May 2017 15:38:40 +0000]
dmaengine: tegra-apb: Really fix runtime-pm usage

Commit edd3bdbe9db1 ("dmaengine: tegra-apb: Correct runtime-pm usage")
added pm_runtime_get/put() calls to the tegra-apb DMA system suspend
callbacks. Runtime PM is disabled during system suspend and so these
APIs cannot be used. Fix the suspend handling for the tegra-apb DMA by
moving the save and restore of the DMA register context into the
runtime PM suspend and resume callbacks, and then use the
pm_runtime_force_suspend/resume() APIs to invoke the runtime PM
callbacks during system suspend.

Furthermore, make use of the pm_runtime_force_suspend() API in the
probe error path and driver removal function to simplify the driver.

Bug 1936074

Change-Id: I10b096c5aa6e380736f23a73e6e6eeb276c06557
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: http://git-master/r/1493122
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

4 years agoNVIDIA-REVIEWERS: Update nvpmodel and devfreq
Sachin Nikam [Wed, 31 May 2017 10:13:29 +0000]
NVIDIA-REVIEWERS: Update nvpmodel and devfreq

Adding nvpmodel and devfreq owners.
And also making pci/* so that it covers all files
under it.

Bug 200298099

Change-Id: Ia6e84997e3d983ad6b05494a05274d2d0390fa6b
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/1492907
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>

4 years agoHID: hidinput: Avoid logical neg compared with s32
Aniruddha TVS Rao [Thu, 2 Feb 2017 06:49:07 +0000]
HID: hidinput: Avoid logical neg compared with s32

Condition within if statement compares logical neg
with s32 variable.
Typecast s32 variable to bool for proper comparison

Coverity ID 37821

Change-Id: I3ce528ca2d9d5f28b8ba12bf3efc4c302536c5da
Signed-off-by: Aniruddha TVS Rao <anrao@nvidia.com>
Reviewed-on: http://git-master/r/1297772
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
(cherry picked from commit de986988a827844595bdcf8c3cf61794e43e25cb)
Reviewed-on: http://git-master/r/1493867

4 years agoRevert "ARM64: configs: Enable SCHEDUTIL for tegra android"
Timo Alho [Thu, 1 Jun 2017 07:00:12 +0000]
Revert "ARM64: configs: Enable SCHEDUTIL for tegra android"

This reverts commit 5fd6b0070df9900cd72e7e6ed37be359790ee5fd.

Bug 1936676

Change-Id: Iac734aff0909c33b260c4ff5f4c31d0a63dc3ce7
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/1493762
Reviewed-by: Jani Uusi-Rantala <juusirantala@nvidia.com>

4 years agoarm64: configs: l4t: enable modversions
Sachin Nikam [Mon, 29 May 2017 14:56:47 +0000]
arm64: configs: l4t: enable modversions

This is needed for Loadable Kernel Module (LKM)
+CONFIG_MODVERSIONS=y

boot.img size is increased by 262,144 bytes

Bug 200286110
Bug 200307034

Based on android k4.9 commit as follows:
commit 252eeb972ca1 ("arm64: configs: tegra18: enable modversions")
Reviewed-on: http://git-master/r/1322886

Change-Id: Ibc2885a659f53e36ba15bc51d2ceeb01f913fe5e
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1491638
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agosoc/tegra: fuse: disable fuse clkon always
Shardar Shariff Md [Wed, 31 May 2017 13:00:56 +0000]
soc/tegra: fuse: disable fuse clkon always

Disable keeping fuse clock always enabled and this is done
for chip later to Tegra186 and as part of this add new compatible
for T194. This helps to save power. On earlier chips, fuse clock is
always enabled as there was issue with MCE not enabling the fuse clock
while accessing fuse registers

Bug 200295264

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

4 years agosoc/tegra: fuse: keep fuse clkon always depend on chip data flag
Shardar Shariff Md [Wed, 31 May 2017 12:54:58 +0000]
soc/tegra: fuse: keep fuse clkon always depend on chip data flag

Depend on is_clkon_always chip data flag keep the fuse clock always
enabled, this flag is added to enable this feature based on chip.

Bug 200295264

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

4 years agosoc/tegra: fuse: remove dependency on CONFIGs
Shardar Shariff Md [Wed, 4 Jan 2017 11:20:30 +0000]
soc/tegra: fuse: remove dependency on CONFIGs

Remove dependency on CONFIG macros.

This is done as part of kernel unification

Bug 200260692

Change-Id: Ie28ffea88a86f66173325b2faf51422bdd8ad9d5
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1280117
(cherry picked from commit a5a75f02206136e68d1e0362bb4c6bdc51d58e44)
Reviewed-on: http://git-master/r/1493044
GVS: Gerrit_Virtual_Submit
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

4 years agodrivers: tegra: use strlcpy for string copy
Shreshtha SAHU [Wed, 29 Mar 2017 10:16:07 +0000]
drivers: tegra: use strlcpy for string copy

Coverity Defect CID 27867

Change-Id: Ia6b881f98ec364c7d27003b105054cfee2609ad6
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1330594
(cherry picked from commit f7b7ee6205e6ee0cd2771be3c94f45374a7429b2)
Reviewed-on: http://git-master/r/1493137
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agofirmware: tegra: fix coverity bugs
Sivaram Nair [Thu, 9 Mar 2017 18:00:55 +0000]
firmware: tegra: fix coverity bugs

Removed some redundant checks (unsigned compared against -ve).

Bug 200192149

Change-Id: I080f43c6906ce9d75d178765d6d8638fd768fe6c
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/1318165
Reviewed-on: http://git-master/r/1493428
Reviewed-by: Navneet Kumar <navneetk@nvidia.com>
GVS: Gerrit_Virtual_Submit

4 years agoof: fdt: enable memory node info prints
Krishna Reddy [Fri, 26 May 2017 18:04:27 +0000]
of: fdt: enable memory node info prints

Allow debugging incorrect memory info passed to kernel.
Bug 200298341

Change-Id: I9165dfd177fd39bba6f54c37040754470b9aff05
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/1490683
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>

4 years agousb: gadget: add default serial number.
Henry Lin [Tue, 15 Sep 2015 08:30:41 +0000]
usb: gadget: add default serial number.

In Windows, device descriptor's serial number is required for driver
installation. We need to give a default value for serial number if
userspace program does not setup it via configfs.

Bug 200138978
Bug 1933398

Change-Id: I9f62bcd6ee13c8451a6b295484da92c3ef006a0e
Reviewed-on: http://git-master/r/799335
Reviewed-on: http://git-master/r/1166736
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: http://git-master/r/1490224
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

4 years agophy: tegra: xusb: add fpga support
Henry Lin [Tue, 16 May 2017 11:13:45 +0000]
phy: tegra: xusb: add fpga support

Bug 1923759

Change-Id: I885a372802580e9e7b8bcaf3d6357c3b725de8f6
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: http://git-master/r/1484659
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

4 years agophy: tegra: xusb: add t194 support
Henry Lin [Wed, 24 May 2017 15:46:09 +0000]
phy: tegra: xusb: add t194 support

Bug 1923759

Change-Id: I74ff8c6d14b6c9fde48ecc0d2058a4fe5a934197
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: http://git-master/r/1488957
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

4 years agousb: gadget: mods changes for t194 fpga
Henry Lin [Thu, 18 May 2017 04:43:39 +0000]
usb: gadget: mods changes for t194 fpga

Bug 1923759

Change-Id: I7fbfad1e4355ef82acfac68d474548d792516a32
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: http://git-master/r/1484658
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

4 years agousb: gadget: xudc: add fpga support
Henry Lin [Thu, 18 May 2017 04:34:18 +0000]
usb: gadget: xudc: add fpga support

FPGA platform doesn't need to configure regulator and clock.

Bug 1923759

Change-Id: I9294b07652c96ff5ab3ffc5dfc57b8f6c79023ae
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: http://git-master/r/1484657
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

4 years agousb: gadget: xudc: add t194 support
Henry Lin [Wed, 24 May 2017 15:22:33 +0000]
usb: gadget: xudc: add t194 support

Bug 1923759

Change-Id: I07be767eb51bdfa566db4c84a9f994bb8039dcbe
Signed-off-by: Henry Lin <henryl@nvidia.com>
Reviewed-on: http://git-master/r/1488956
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

4 years agoarm64: configs: tegra: Make security as LKM
Nicolin Chen [Tue, 30 May 2017 23:20:31 +0000]
arm64: configs: tegra: Make security as LKM

This patch changes the security and cryto modules from =y to =m.

boot.img size is reduced by 124928 bytes

Bug 200305192

Change-Id: I55bdbc31954b066ccc274b71b59db99101c9d096
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1492475
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: Add cfboost driver in Kconfig and Makefile
Nicolin Chen [Fri, 26 May 2017 19:59:26 +0000]
input: Add cfboost driver in Kconfig and Makefile

This patch adds an entry in Kconfig and Makefile for input-cfboost driver.

Bug 200305104

Change-Id: Id9a22584bed5a65d886d2afca5b092528304e9b3
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490933
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: cfboost: add dual cluster freq boost
David Pu [Fri, 10 Jun 2016 23:22:22 +0000]
input: cfboost: add dual cluster freq boost

T18x changed to per cluster freq qos API, updated the driver to
add same min cluster freq request for two CPU clusters.

Bug 200199021
Bug 200305104

Change-Id: Icb46750a2f9452e2d771991fd277523098563f4c
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/1163445
(cherry picked from commit 9cc4e4dcbb37b2356a8565f6a0dabcda3574b0a4)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490932
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agodrivers: input: Boost CPU & GPU
Arun Gona [Wed, 15 Oct 2014 18:55:45 +0000]
drivers: input: Boost CPU & GPU

Add GPU sysfs node for clock boosting.

bug 200040953
Bug 200305104

Change-Id: I171e3301acd10ac207d180f2a09d76ed5c45c859
Signed-off-by: Arun Gona <agona@nvidia.com>
Reviewed-on: http://git-master/r/558054
(cherry picked from commit 16774794d1be40b08adb34b00b6de896bc119648)
Signed-off-by: Li Li <lli5@nvidia.com>
(cherry picked from commit 519d9be54c759e5253f178433d9e0a928ef6fb87)
Reviewed-on: http://git-master/r/669329
(cherry picked from commit 10f3849d2a4bd70d0f596a5d56f93e74762fa1b7)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490931
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agocfboost: Boost on any kdb evt
Li Li [Thu, 20 Nov 2014 23:51:21 +0000]
cfboost: Boost on any kdb evt

Support keyboard and shield controller.

Bug 200305104

Change-Id: I2a685e54ca33cee52dfeaedfc18366204dc77a3a
Signed-off-by: Li Li <lli5@nvidia.com>
(cherry picked from commit 9bcbab59177002fea95ad7896e69b6a53e7acef5)
Reviewed-on: http://git-master/r/655450
(cherry picked from commit 9376078c57b8c7a79655080b5965243d8ae97dbf)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490930
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agocfboost: initialize boost values to 0
Donghan Ryu [Wed, 7 May 2014 13:53:32 +0000]
cfboost: initialize boost values to 0

boost_freq, boost_emc and boost_cpus should be 0
initially if these parameters are not set.

Bug 1385013
Bug 200305104

Change-Id: I39a6e1f216eb109915ec0f9bc2cb9f2456fdcaef
Reviewed-on: http://git-master/r/406475
Signed-off-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-on: http://git-master/r/409700
(cherry picked from commit 88b10a7b1a63227e8fe84d5d0d95c8b0ca18f753)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490929
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agocfboost: add boost_cpus
Donghan Ryu [Sat, 3 May 2014 08:43:48 +0000]
cfboost: add boost_cpus

cfboost might want to change the number of min online cpus.
This change adds a new nodes for that.

Bug 1385013
Bug 200305104

Change-Id: I69aaa1eb93298f3c8413a77ca5cb2fbe39bb345c
Reviewed-on: http://git-master/r/404690
Signed-off-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-on: http://git-master/r/409699
(cherry picked from commit 6e0c08dc36aea2f7c8b2d3b3620cf5418b6c0828)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490928
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: cfboost: Add EMC boost
Li Li [Thu, 17 Apr 2014 21:29:00 +0000]
input: cfboost: Add EMC boost

Bug 200305104

Change-Id: Id9b7ea216b8c93e291cc95d7522ba21d15701eeb
Reviewed-on: http://git-master/r/397838
Signed-off-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-on: http://git-master/r/402485
(cherry picked from commit 95702446083ae416459f2c552318f346f3590a70)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490927
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: cfboost: Explicitly turn on the GPU
Arto Merilainen [Wed, 30 Apr 2014 07:54:58 +0000]
input: cfboost: Explicitly turn on the GPU

Currently we inform the QoS that the GPU should be powered, however,
we need to also restore the state of the GPU. This patch adds explicit
pm_runtime_get/put_autosuspend() calls to ensure that the GPU is really
initialised immediately.

Bug 1506585
Bug 200305104

Change-Id: I1f08ca072f4a7ef038bb4e8e12323846480c6a12
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/403770
(cherry-picked from commit 22665ef35d4d70dda8763d83ad866bc4b145fd11)
Reviewed-on: http://git-master/r/405231
(cherry picked from commit d6669c0f7499a5c770c3056e271ef343e29e1f9f)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490926
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: cfboost: Export symbols
Arto Merilainen [Thu, 27 Mar 2014 06:40:56 +0000]
input: cfboost: Export symbols

The GPU driver needs to register itself to the cfboost framework
despite it can be compiled as a module. This patch adds necessary
exports to the cfboost driver.

Bug 1476801
Bug 200305104

Change-Id: Ia0be866eeb13aa3d561bcc88dc24bcda76c48b51
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/387608
(cherry picked from commit 8f1454d422f835aee77dbbeb21e867b06a289376)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490925
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: cfboost: Update raydium touch evbit
Vikas Jain [Mon, 30 Dec 2013 16:32:56 +0000]
input: cfboost: Update raydium touch evbit

New raydium driver code sets BTN_TOOL_RUBBER
instead of BTN_TOUCH. This failed the input
handler event matching. Updated code to handle
this change.

Bug 1408316
Bug 1408317
Bug 1408322
Bug 200305104

Signed-off-by: Vikas Jain <vjain@nvidia.com>

Change-Id: If37af3d2f51d4f25b25f9b9c9ceda51f379e489a
Reviewed-on: http://git-master/r/350668
(cherry picked from commit 88f5d5e403f60424149870cdc9b38a8a191d45fa)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490924
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: cfboost: Add GPU wake-up
Terje Bergstrom [Wed, 9 Oct 2013 10:14:49 +0000]
input: cfboost: Add GPU wake-up

Add interface for registering a GPU device. Whenever touch event is
received, ask the domain not to be powered off.

Bug 1364240
Bug 200305104

Change-Id: I2e61b6969ecdf89dcf00f57565eefdf0a93b3acd
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/288809
(cherry picked from commit cec684a846de1dab1d151575389c554ad00dc508)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490923
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput-cfboost: use RT kthread for PM QoS request
Yogish Kulkarni [Tue, 5 Feb 2013 12:01:08 +0000]
input-cfboost: use RT kthread for PM QoS request

It has been observed that input drivers worker thread gets scheduled
before boost worker thread, specifically in case of Raydium touch.
The delayed scheduling of boost works adds to first touch latency
when cpu is idle and running at lower clock rate. Hence use RT
kthread for fast scheduling of boost work. Thread Priority is set to
MAX_RT_PRIO-10 so that the highest RT priority level is left for
EMC DVFS.

[ This change also replaces the deprecated queue_kthread_work() in
  the original change with the new kthread_queue_work() -- Nicolin ]

Bug 1245419
Bug 1229219
Bug 1364240
Bug 200305104

Change-Id: I342161532a7b8407d1ecfad29710e13a47331bff
Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-on: http://git-master/r/249716
(cherry picked from commit 851e0df306161be573b1a94c6eb3fdfdb5107167)
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/288807
(cherry picked from commit e46bb2b553d3ea54cd438bd09295d0f166315397)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490922
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: cfboost: Add module parameter callback
Antti P Miettinen [Tue, 1 Oct 2013 13:37:57 +0000]
input: cfboost: Add module parameter callback

Cancel PM QoS request upon frequency changing to zero.

Bug 200305104

Change-Id: Ie6bba1eb3f3177751449d53d9237e021140edf82
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/280744
(cherry picked from commit 8623a52d17f0e0788d393fbc4e8a9b2987ae492d)
Reviewed-on: http://git-master/r/298662
(cherry picked from commit 6adb06c1bfc08222cd3ec1309cbc05d32745cefa)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490921
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinput: cfboost: Fix pm_qos_add_request
Xiaohui Tao [Mon, 26 Aug 2013 17:47:06 +0000]
input: cfboost: Fix pm_qos_add_request

cf_core is used to set how many cpu cores to be brought
online. The pm_qos_class is set to be the wrong value.
Change it from PM_QOS_CPU_FREQ_MIN to PM_QOS_MIN_ONLINE_CPUS.

Bug 200305104

Change-Id: I0905ef1afbc2bc3724367e6d6e69da3dcc566632
Signed-off-by: Xiaohui Tao <xtao@nvidia.com>
(cherry picked from commit 78e77f377560188d57a894146c57425cc809bb60)
Signed-off-by: Yogish Kulkarni <yogishk@nvidia.com>
Reviewed-on: http://git-master/r/266160
(cherry picked from commit 2513b27de197d67487f43477be6bd3ec4cc35493)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490920
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoinclude: trace: events: Add missing input_cfboost.h
Nicolin Chen [Fri, 26 May 2017 19:36:46 +0000]
include: trace: events: Add missing input_cfboost.h

Commit 72a91641c99b ("input: Add MSC_TIMESEC/_TIMEUSEC for android")
added some trace points in the input-cfboost.c driver but it didn't
add this header file. There are compiling errors when building the
driver due to this reason.

So this patch just adds the missing header file.

Bug 200305104

Change-Id: I13a3d751e4eb2ac322bb9bbd1e16f017f222e0b4
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490919
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoPM / QoS: export pm_qos_update_request_timeout
Nicolin Chen [Sat, 18 Mar 2017 03:55:31 +0000]
PM / QoS: export pm_qos_update_request_timeout

When compiling input-cfboost as a module, there is an error:

    ERROR: "pm_qos_update_request_timeout"
    [drivers/input/input-cfboost.ko] undefined!

So this patch fixes it by exporting the function.

Bug 1887171
Bug 200305104

Change-Id: Id0a52492b3ab28e3cd618579714c4edfc4b5e869
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1323582
(cherry picked from commit 4a857a18406a978c2e1588b4630ca4f5a58a6ee3)
Reviewed-on: http://git-master/r/1490918
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoPM / QoS: add dev_pm_qos_update_request_timeout()
Terje Bergstrom [Wed, 9 Oct 2013 08:33:38 +0000]
PM / QoS: add dev_pm_qos_update_request_timeout()

Add dev_pm_qos_update_request_timeout() that works in the same way as
pm_qos_request_timeout().

[ This patch also includes the missing stub to solve the compile errors
  when CONFIG_PM=n -- Nicolin]

Bug 1364240
Bug 200305104

Change-Id: I9da700df443f48099eac929055e9fe2db4c2f540
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/288808
(cherry picked from commit 15f195c55f50f0f0c3646ecf7cd0e1c415b5025d)
Reviewed-on: http://git-master/r/1140111
(cherry picked from commit 8b4668f2a247439ee48a4e5f67f9cfb9a7d827d5)
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: http://git-master/r/1490917
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agot186: configs: enable qspi driver
dmitry pervushin [Wed, 31 May 2017 15:20:04 +0000]
t186: configs: enable qspi driver

Bug 1899781
Bug 1930692
Bug 1930693

Change-Id: Ib5d26774435384b7e6293f4bf8c0dd74c3fa4495
Signed-off-by: dmitry pervushin <dpervushin@nvidia.com>
Reviewed-on: http://git-master/r/1493101
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>

4 years agoof: plugin-manager: Use the allocated memory for copying property
Laxman Dewangan [Fri, 3 Mar 2017 12:14:25 +0000]
of: plugin-manager: Use the allocated memory for copying property

When copying property value in target property, allocate
memory and then copy the content.

CID 489255

Change-Id: If282db3177d53ab75aa8dcadb5735ca66aaf0314
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit 4830a11d1bf77affd7463e5503813721297ca855)
Reviewed-on: http://git-master/r/1493107
GVS: Gerrit_Virtual_Submit

4 years agoof: plugin-manager: Avoid memory leak
Laxman Dewangan [Fri, 3 Mar 2017 12:09:28 +0000]
of: plugin-manager: Avoid memory leak

Free the allocated memory before exiting from functions
which is allocated the memory.

CID: 489256

Change-Id: Iac14af8bbb78e3edc793ceac0e1a3a3bb0a03b9a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit cf9523f5f4ac0aff374b0c4743a6b3868a959ceb)
Reviewed-on: http://git-master/r/1493106
GVS: Gerrit_Virtual_Submit

4 years agoof: plugin-manager: Avoid condition of buffer not null terminated
Laxman Dewangan [Fri, 3 Mar 2017 12:01:38 +0000]
of: plugin-manager: Avoid condition of buffer not null terminated

Coverity fix:

Avoid the strncpy with the length of buffer to avoid the unterminated
buffer copy.

CID 490204

Change-Id: I06243a4ec9695234925146129983c676b046e994
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit b9dc12dde5115cdecef07c8fb126d3190ef0b511)
Reviewed-on: http://git-master/r/1493105
GVS: Gerrit_Virtual_Submit

4 years agoof: plugin-manager: Fix section mismatch error
Laxman Dewangan [Tue, 3 Jan 2017 11:43:27 +0000]
of: plugin-manager: Fix section mismatch error

Remove "__init" from the function to avoid section mismatch
errors:

WARNING: vmlinux.o(.text+0x780e08): Section mismatch in reference
from the function handle_properties_overrides() to the function
.init.text:do_property_overrides()
The function handle_properties_overrides() references
the function __init do_property_overrides().
This is often because handle_properties_overrides lacks a __init
annotation or the annotation of do_property_overrides is wrong.

Change-Id: Ie6c900814e9bdded1cec66749a8291b1b93e9a10
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit 121b771fd6a4ed2fac142d94d70dc6e0438a0a77)
Reviewed-on: http://git-master/r/1493104
GVS: Gerrit_Virtual_Submit

4 years agomisc: add mods driver config
Chris Dragan [Wed, 24 May 2017 09:50:42 +0000]
misc: add mods driver config

Bug 200295104

Change-Id: Id78f4d782eb29a2009ebf148f49134ce929a60cc
Signed-off-by: Chris Dragan <kdragan@nvidia.com>
Reviewed-on: http://git-master/r/1488742
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agoAdd PREEMPT_RT 4.9.30-rt20 patch series
Timo Alho [Tue, 30 May 2017 08:45:54 +0000]
Add PREEMPT_RT 4.9.30-rt20 patch series

Add the PREEMPT_RT 4.9.30-rt20 patch series rebased to dev-kernel-4.9.
The patches were imported to a clean upstream 4.9.30 branch with
git quiltimport, then cherry-picked to dev-kernel-4.9 updated to
4.9.30 and conflicts resolved during cherry-picking, then
re-exported with git format-patch.

Change-Id: I78d34300c29205ee7a871ad096f0599de2bd47d8
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/1491925
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>

4 years agoMerge "Merge branch 'linux-4.9.30' into dev-kernel-4.9" into dev-kernel-4.9
mobile promotions [Wed, 31 May 2017 13:54:40 +0000]
Merge "Merge branch 'linux-4.9.30' into dev-kernel-4.9" into dev-kernel-4.9

4 years agoi2c: tegra: increase i2c pm runtime ref count
Shardar Shariff Md [Tue, 30 May 2017 14:24:55 +0000]
i2c: tegra: increase i2c pm runtime ref count

I2C pm runtime resume is failing after SC7. To workaround this issue
call runtime resume (i.e through pm_runtime_get_sync()) in probe to
increase runtime pm reference count, so that pm runtime suspend is skipped.
Will be reverting this change after runtime resume issue is root caused.

Bug 1931350

Change-Id: Ie399dc4eaf6ac3df2575e5e100a12708423536a0
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1492128
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

4 years agommc: tegra: Enable 64 DMA support in T210
Pavan Kunapuli [Tue, 30 May 2017 12:50:55 +0000]
mmc: tegra: Enable 64 DMA support in T210

Enable 64 bit DMA addessing support for T210 SDMMC controllers.

Bug 1913612

Change-Id: I8f75607f3dbfc60a45985631e5b5141df490b2b4
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/1492057
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

4 years agoarm64: config: enable SAF775x driver
Dipesh Gandhi [Wed, 24 May 2017 07:46:23 +0000]
arm64: config: enable SAF775x driver

boot.img size not changed.

Jira EMA-421

Change-Id: I81259f2dfa544602b785b2440a318a5d23474cc2
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1488663
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>

4 years agoiommu: arm-smmu: make use of copy_from_user
Pritesh Raithatha [Tue, 30 May 2017 07:50:46 +0000]
iommu: arm-smmu: make use of copy_from_user

Kernel is not supposed to directly access user space address.

KASAN is reporting user-memory-access failure as following:

[  258.610351] ================================================================
[  258.610357] BUG: KASAN: user-memory-access on address 0000000040a0d000
[  258.610361] Read of size 1 by task python/5288
[  258.610371] CPU: 1 PID: 5288 Comm: python Tainted:GBWO 4.9.28-tegra-gd84651f
[  258.610374] Hardware name: quill (DT)
[  258.610377] Call trace:
[  258.610394] [<ffff20000808c740>] dump_backtrace+0x0/0x238
[  258.610402] [<ffff20000808c98c>] show_stack+0x14/0x20
[  258.610411] [<ffff2000085fed7c>] dump_stack+0xa4/0xc8
[  258.610421] [<ffff20000829c978>] kasan_report_error+0x420/0x510
[  258.610428] [<ffff20000829d164>] kasan_report+0x74/0x80
[  258.610434] [<ffff20000829b054>] __asan_load1+0x4c/0x58
[  258.610441] [<ffff20000860db50>] strncpy+0x30/0x68
[  258.610451] [<ffff2000088abb14>] smmu_context_filter_write+0xe4/0x2d8
[  258.610459] [<ffff20000852bf64>] full_proxy_write+0xd4/0x130
[  258.610466] [<ffff2000082c63c4>] __vfs_write+0xd4/0x258
[  258.610471] [<ffff2000082c77cc>] vfs_write+0xcc/0x250
[  258.610478] [<ffff2000082c9728>] SyS_write+0xb8/0x148
[  258.610484] [<ffff2000080830b0>] el0_svc_naked+0x24/0x28
[  258.610486] ================================================================

Fixing it by using copy_from_user.

Bug 200312403

Change-Id: I4fb6b33adbc44397d155e49c0043475e9d246a45
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/1491872
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agofirmware: tegra: do not call msleep() in resume
Sivaram Nair [Wed, 8 Mar 2017 01:02:01 +0000]
firmware: tegra: do not call msleep() in resume

On VDK, we call msleep() to wait on channels to become ready. This will
cause a problem during suspend->resume if we arrive in native_resume()
before the timer is resumed. If this happens, we never return from the
msleep() call. To fix this, use polling during suspend->resume().

Bug 1880883

Change-Id: I3af53cea356becf0012d92b9b1c3626283b99f68
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/1490589
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Vignesh Radhakrishnan <vigneshr@nvidia.com>
Reviewed-by: Vignesh Radhakrishnan <vigneshr@nvidia.com>
Reviewed-by: Krishna Sitaraman <ksitaraman@nvidia.com>

4 years agosched, fair: Prefer idle CPUs for on task wakeup
Sai Gurrappadi [Wed, 24 May 2017 19:21:55 +0000]
sched, fair: Prefer idle CPUs for on task wakeup

Rather than biasing towards already active CPUs, bias towards idle
siblings so that tasks experience lower latency.

Bug 1903075

Change-Id: I96d88f1ffa8977fbd56076553579ad9db6bbdb29
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1489080
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agosched, fair: Rename ENERGY_AWARE to CAPACITY_AWARE
Sai Gurrappadi [Fri, 19 May 2017 04:17:49 +0000]
sched, fair: Rename ENERGY_AWARE to CAPACITY_AWARE

Rename the sched feature so that the same userspace can be used across
kernel versions..besides, energy_aware has been hacked to do just the
capacity_aware bits anyways.

Bug 1903075

Change-Id: I5d6c48c053e9496f35c429b856ef53688ea59170
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1485423
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agosched: Kick NOHZ balance if task misfit
Sai Gurrappadi [Mon, 2 Nov 2015 18:52:45 +0000]
sched: Kick NOHZ balance if task misfit

Even if the local rq has just one thread, the thread could be misfit
because the local CPU's capacity isn't big enough to satisfy the
thread's bandwidth requirement.

In this case, we still do the nohz balance kick to try and move the
single thread off to a higher capacity CPU. The kick also updates
blocked sums (util and runnable) which influence thread distribution
in the CAPACITY_AWARE case.

Bug 1665314

Conflicts:
kernel/sched/fair.c

Change-Id: Id3cc9af856d609744d084cb9bd8d058027bd90c1
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
(cherry picked from commit 9cafec66121b0a59427ee46f84216ae814a27640)
Reviewed-on: http://git-master/r/829122
Reviewed-on: http://git-master/r/1485352
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agosched: Consider misfit tasks when load-balancing
Sai Gurrappadi [Wed, 30 Sep 2015 22:29:48 +0000]
sched: Consider misfit tasks when load-balancing

With the new group_misfit_task load-balancing scenario additional policy
conditions are needed when load-balancing. Misfit task balancing only
makes sense between source group with lower capacity than the target
group. If capacities are the same, fallback to normal group_other
balancing. The aim is to balance tasks such that no task has its
throughput hindered by compute capacity if a cpu with more capacity is
available. Load-balancing is generally based on average load in the
sched_groups, but for misfitting tasks it is necessary to introduce
exceptions to migrate tasks against usual metrics and optimize
throughput.

This patch ensures the following load-balance for mixed capacity systems
(e.g. ARM big.LITTLE) for always-running tasks:

1. Place a task on each cpu starting in order from cpus with highest
capacity to lowest until all cpus are in use (i.e. one task on each
cpu).

2. Once all cpus are in use balance according to compute capacity such
that load per capacity is approximately the same regardless of the
compute capacity (i.e. big cpus get more tasks than little cpus).

Necessary changes are introduced in find_busiest_group(),
calculate_imbalance(), and find_busiest_queue(). This includes passing
the group_type on to find_busiest_queue() through struct lb_env, which
is currently only considers imbalance and not the imbalance situation
(group_type).

To avoid taking remote rq locks to examine source sched_groups for
misfit tasks, each cpu is responsible for tracking misfit tasks
themselves and update the rq->misfit_task flag. This means checking task
utilization when tasks are scheduled and on sched_tick.

Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com>

From the chromeos EAS tree.

Bug 1665314
Bug 1903075

Change-Id: I6aca548522dc5775e1ae035a9a99e78245f06c7b
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1485343
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agoARM64: configs: Enable SCHEDUTIL for tegra android
Sai Gurrappadi [Wed, 10 May 2017 22:11:45 +0000]
ARM64: configs: Enable SCHEDUTIL for tegra android

boot.img size increased by 6144 bytes.

Bug 1903075

Change-Id: I442b1889cd12291346aec8a192f840e6c3d16e36
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1479504
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agocpufreq: schedutil: Make iowait_boost_max tunable
Sai Gurrappadi [Wed, 24 May 2017 05:56:54 +0000]
cpufreq: schedutil: Make iowait_boost_max tunable

Let platforms configure the iowait_boost_max value rather than hardcoding
it to cpuinfo_max_freq.

Bug 1903075

Change-Id: I5dfdeaa7b41de994afa61f708f8d10551e967b9b
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1488565
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agocpufreq: schedutil: Don't jump to Fmax for RT/DL
Sai Gurrappadi [Wed, 10 May 2017 22:07:38 +0000]
cpufreq: schedutil: Don't jump to Fmax for RT/DL

Jumping to Fmax for RT/DL tasks while theoretically sound, it just doesn't
work on mobile/embedded platforms. Disable it for now and replace it with
something more sensible later.

Bug 1903075

Change-Id: Ibb3acf8bc3f0281d3674df5f0b20987bb6e479b3
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1479503
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agocpufreq: schedutil: Only update rate limit on freq. changes
Sai Gurrappadi [Thu, 19 May 2016 01:41:17 +0000]
cpufreq: schedutil: Only update rate limit on freq. changes

Updating the rate limit timestamp regardless of whether the actual
frequency changed or not causes frequency requests to get throttled
instead of just the actual frequency changes being throttled.

Fix this by only updating the rate limit time stamp when the actual
requested frequency as clipped to the table changes.

Based on a patch by Steve Muckle <steve.muckle@linaro.org>.

TPM-955

Conflicts:
kernel/sched/cpufreq_schedutil.c

(cherry picked from commit c0454b39a2c462d57e1fc69e5248ed69c82a0a5b)

Change-Id: I740dd93d2bd43a89777a942bd99e7fb15b8aa1c3
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1164516
Reviewed-on: http://git-master/r/1479502
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agocpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task
Viresh Kumar [Tue, 15 Nov 2016 08:23:22 +0000]
cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task

If slow path frequency changes are conducted in a SCHED_OTHER context
then they may be delayed for some amount of time, including
indefinitely, when real time or deadline activity is taking place.

Move the slow path to a real time kernel thread. In the future the
thread should be made SCHED_DEADLINE. The RT priority is arbitrarily set
to 50 for now.

Hackbench results on ARM Exynos, dual core A15 platform for 10
iterations:

$ hackbench -s 100 -l 100 -g 10 -f 20

Before After
---------------------------------
1.808 1.603
1.847 1.251
2.229 1.590
1.952 1.600
1.947 1.257
1.925 1.627
2.694 1.620
1.258 1.621
1.919 1.632
1.250 1.240

Average:

1.8829 1.5041

Based on initial work by Steve Muckle.

Signed-off-by: Steve Muckle <smuckle.linux@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from upstream commit 02a7b1ee3baa15a98b541d8cfd156bbe1a091c20)

Conflicts:
kernel/sched/cpufreq_schedutil.c

Change-Id: I1d7b703f7d452249085a4989d18c12357e02d067
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1479501
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agocpufreq: schedutil: enable fast switch earlier
Viresh Kumar [Tue, 15 Nov 2016 08:23:21 +0000]
cpufreq: schedutil: enable fast switch earlier

The fast_switch_enabled flag will be used by both sugov_policy_alloc()
and sugov_policy_free() with a later patch.

Prepare for that by moving the calls to enable and disable it to the
beginning of sugov_init() and end of sugov_exit().

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

(cherry picked from upstream commit 4a71ce4348bb61740d411822357061f8bf870f4c)

Change-Id: I5b84801ae12a0c0605a947b24ba7d2e7778e71bc
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1485342
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>

4 years agoarm64: config: Enable MTD_QSPI
Laxman Dewangan [Tue, 30 May 2017 10:30:53 +0000]
arm64: config: Enable MTD_QSPI

Enable MTD QSPI driver to support QSPI flash via MTD
framework.

bug 1899781

Change-Id: Ia1c65946a4a6b7b8f1625d4da8bb3d047d3f8e67
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1491969
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agomtd: devices: qspi-mtd: Set device of_node to mtd
Laxman Dewangan [Tue, 30 May 2017 13:46:13 +0000]
mtd: devices: qspi-mtd: Set device of_node to mtd

Set SPI device of node to the mtd node so that partition
can be scanned from the SPI device node.

bug 1899781

Change-Id: I1d84de5a9050e07a061816bd8545b00d74998582
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1492088
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Anubhav Jain <anubhavj@nvidia.com>
Reviewed-by: Anubhav Jain <anubhavj@nvidia.com>
GVS: Gerrit_Virtual_Submit

4 years agomtd: devices: Add config for qspi-mtd
Laxman Dewangan [Tue, 30 May 2017 10:10:15 +0000]
mtd: devices: Add config for qspi-mtd

Add config variable for the QSPI-MTD driver.

bug 1899781

Change-Id: Ib2584cce42521d3f3c66e06c67d03dce51f0e563
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1491968
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Anubhav Jain <anubhavj@nvidia.com>
Reviewed-by: Anubhav Jain <anubhavj@nvidia.com>
GVS: Gerrit_Virtual_Submit

4 years agomtd: qspi-mtd: Add header for qspi-mtd
Laxman Dewangan [Tue, 30 May 2017 10:09:15 +0000]
mtd: qspi-mtd: Add header for qspi-mtd

Add generic header for qspi-mtd for adding the devices and
qspi specific structure.

bug 1899781

Change-Id: Ie213fb57d2446e4fe08b372f8d711e7b2dc80081
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1491967
Tested-by: Anubhav Jain <anubhavj@nvidia.com>
Reviewed-by: Anubhav Jain <anubhavj@nvidia.com>
GVS: Gerrit_Virtual_Submit

4 years agoRevert "ARM64: tegra: android: disable CAN"
Joshua Cha [Tue, 30 May 2017 02:39:58 +0000]
Revert "ARM64: tegra: android: disable CAN"

This reverts commit 7208114838f1b24b9bdfc13d8c33ce78acb19084.

Bug 1932272

Change-Id: I3fb2befc5e5e74648b368dbd5faf13a598e12925
Signed-off-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-on: http://git-master/r/1491777
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agoMerge branch 'linux-4.9.30' into dev-kernel-4.9
Timo Alho [Tue, 30 May 2017 06:42:44 +0000]
Merge branch 'linux-4.9.30' into dev-kernel-4.9

Bug 1935260

4 years agodriver: mtd: Porting qspi_mtd.c file to k49
Anubhav Kumar Jain [Mon, 29 May 2017 15:46:18 +0000]
driver: mtd: Porting qspi_mtd.c file to k49

Moving qspi_mtd.c file from kernel-4.4 to kernel-4.9
Also added corresponding Makefile
Commit history taken from kernel-4.4
Commit-Id | Date | description [Author]
99db43e 2017-02-15 mtd: Fix compilation warning [mobile promotions]
bb53f8d 2016-11-22 driver: fix compiler warnings in qspi_mtd.c [mobile promotions]
8b3e124 2016-11-22 drivers: fix compiler warnings in qspi_mtd.c [mobile promotions]
45237a5 2016-09-07 drivers: qspi_mtd: remove disable QUAD flag [mobile promotions]
239bed3 2016-02-23 drivers: qspi_mtd: Changing read from normal to fast read [Alexander Van Brunt]
b8dc137 2016-02-17 driver:mtd:qspi_flash:use volatile reg for quad [Alexander Van Brunt]
dac834f 2016-01-22 arm64: dts: tegra21: correct NOR flash name [Alexander Van Brunt]
0032527 2015-12-15 drivers: allow selected drivers to async probe [Alexander Van Brunt]
8c65318f 2015-06-28 driver: mtd: qspi_flash: Improve locking mechanism [Alexander Van Brunt]
695dd86 2015-06-11 qspi: s25fl512s support 512B page size [Alexander Van Brunt]
e94b1c1 2015-01-06 qspi: updated driver for handling ddrq mode [Alexander Van Brunt]
a90ed40 2014-11-12 qspi: added support for subblock erase [Alexander Van Brunt]
fafc616 2014-11-04 kernel: Changes for QSPI flash support in Kernel [Alexander Van Brunt]
a71a4d4 2014-07-30 driver: mtd: qspi_flash : Add mtd driver layer [Alexander Van Brunt]

Bug 1899781

Change-Id: I55e4f92ae903c7532167a517e0524f88f994116f
Signed-off-by: Anubhav Kumar Jain <anubhavj@nvidia.com>
Reviewed-on: http://git-master/r/1491690
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

4 years agospi: qspi-tegra: Add QSPI_TEGRA config flag
Laxman Dewangan [Mon, 29 May 2017 14:56:10 +0000]
spi: qspi-tegra: Add QSPI_TEGRA config flag

There is different QSPI driver for T210/T186. The client code
is same for all. Add the config flag QSPI_TEGRA to select the
client doe which gets selected from the T210/T186 specific config.

bug 1899781

Change-Id: Ia5cf5b714a82628ae81563221ee4197797660cc3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1491636
Tested-by: Anubhav Jain <anubhavj@nvidia.com>
Reviewed-by: Anubhav Jain <anubhavj@nvidia.com>
GVS: Gerrit_Virtual_Submit

4 years agoASoC: tegra-alt: add ahc interrupt setup/free
Dipesh Gandhi [Thu, 25 May 2017 07:16:33 +0000]
ASoC: tegra-alt: add ahc interrupt setup/free

Jira EMA-421
Bug 200307265

Change-Id: Ia1db54c0a51ef00a201561fe9d15d60106611ca2
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1489612
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Ajay Nandakumar M <anandakumarm@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>

4 years agodrivers: misc: saf775x: Add codec driver
Dipesh Gandhi [Wed, 24 May 2017 07:43:06 +0000]
drivers: misc: saf775x: Add codec driver

Pulling in saf775x driver from kernel-4.4

Jira EMA-421
Change-Id: Ibb07cb3e82d3c23844ddb95c17830468787a3b49
Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-on: http://git-master/r/1478998
Reviewed-by: Simon Je <sje@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>

4 years agoANDROID: mnt: Fix next_descendent
Daniel Rosenberg [Mon, 29 May 2017 23:38:16 +0000]
ANDROID: mnt: Fix next_descendent

next_descendent did not properly handle the case
where the initial mount had no slaves. In this case,
we would look for the next slave, but since don't
have a master, the check for wrapping around to the
start of the list will always fail. Instead, we check
for this case, and ensure that we end the iteration
when we come back to the root.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 62094374
Change-Id: I43dfcee041aa3730cb4b9a1161418974ef84812e

4 years agoRevert "arm64: configs: tegra18: lp855x loadable"
Prafull Suryawanshi [Mon, 29 May 2017 10:27:29 +0000]
Revert "arm64: configs: tegra18: lp855x loadable"

This reverts commit 66e0b8cca1257cec23b4b16f985581026902de22.

This change has been reverted as it causes issue with backlight
to be on always and also not all brightness to be changed.

bug 200313166

Change-Id: I35c00896d48f2113e8ca1466dc05e3edeb6e452f
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/1491505
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>

4 years agoplatform: tegra: hsp: fix coverity bug
Sivaram Nair [Thu, 9 Mar 2017 18:26:27 +0000]
platform: tegra: hsp: fix coverity bug

Local variable is hiding the function argument - rename one of them.

Bug 200192149

Change-Id: Ib7697cac90950e0e28016fe9e4576e58dfbe0adc
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/1318166
(cherry picked from commit 9f6e1d3a27accc831f7382a5ebbad39f41c49c3e)
Reviewed-on: http://git-master/r/1490473
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>

4 years agoplatform: tegra: hsp: immediately empty mailbox
Pekka Pessi [Thu, 2 Mar 2017 15:14:10 +0000]
platform: tegra: hsp: immediately empty mailbox

When handling full mailbox interrupts, clear the empty mailbox
immediately so that new messages can be delivered.

Both users of mailbox driver return 0 from the handler. Void the
notification function later.

Bug 1854467
Bug 1883764

Change-Id: I78b0c1c8f67603f1191b09a23ed939d653538224
Reviewed-on: http://git-master/r/1313941
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
(cherry picked from commit b2d24343b8a4bb764082d01fd581b7162df92c40)
Reviewed-on: http://git-master/r/1490472
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>

4 years agoplatform: tegra: hsp: fix mbox ie handling
Pekka Pessi [Mon, 2 Jan 2017 20:21:39 +0000]
platform: tegra: hsp: fix mbox ie handling

The opposite interrupt is probably used by the mailbox peer.  However,
it is possible that peer initializes its interrupts before the kernel.

Jira CAMC-253
Bug 1818880

Change-Id: I763d2295f4fb02e91fac913f4c413f510e557502
Signed-off-by: Pekka Pessi <ppessi@nvidia.com>
Reviewed-on: http://git-master/r/1279594
(cherry picked from commit ce5b6413306e6ac969f5fbafbd39223ca2f56bb6)
Reviewed-on: http://git-master/r/1490471
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>

4 years agobacklight: add driver for DS1050
Haley Teng [Tue, 20 Oct 2015 08:38:16 +0000]
backlight: add driver for DS1050

Bug 200305193

Change-Id: I0d401e393221ff2e62d7d510a9d5f54493193919
Reviewed-on: http://git-master/r/823180
(cherry-picked from commit bc6a13329b37279dca668fa461521f72bef068d6)
Signed-off-by: Emma Yan <eyan@nvidia.com>
Reviewed-on: http://git-master/r/1490539
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agoNVIDIA-REVIEWERS: update owner for ds1050_bl
Sachin Nikam [Mon, 29 May 2017 09:21:31 +0000]
NVIDIA-REVIEWERS: update owner for ds1050_bl

DS1050 is a Backlight driver for Auto boards.
Also move backlight under Display group.

Bug 200305193

Change-Id: I3f133ce62dcfdd85ba69f4db17f840e7f1696a75
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/1491468
Reviewed-by: Timo Alho <talho@nvidia.com>

4 years agoarm64: configs: tegra: make camera as modules
Sachin Nikam [Fri, 12 May 2017 11:42:56 +0000]
arm64: configs: tegra: make camera as modules

Make below camera sensors, focuser, expander
and decoder as module for LKM:

+CONFIG_VIDEO_IMX185=m
+CONFIG_VIDEO_IMX274=m
+CONFIG_VIDEO_LC898212=m
+CONFIG_VIDEO_OV5693=m
+CONFIG_VIDEO_OV9281=m
+CONFIG_VIDEO_OV10823=m
+CONFIG_VIDEO_OV23850=m
+CONFIG_I2C_IOEXPANDER_PCA9570=m
+CONFIG_VIDEO_TC358840=m

boot.img size is reduced by 284672 bytes.

Bug 200305188

Change-Id: I4a58452e9f72035a8ae1dc569fce164632b98e7b
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: http://git-master/r/1480789
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agoARM64: tegra: l4t: k4.9 spi, watchdog, rtc enable
Krishna Yarlagadda [Thu, 18 May 2017 10:15:10 +0000]
ARM64: tegra: l4t: k4.9 spi, watchdog, rtc enable

This patch is merge of below changes done
in android defconfig for k4.9

1. spi enable
commit 0e28184fe7f7 ("arm64: tegra: enable SPI")
arm64: tegra: enable SPI

Enable Tegra SPI driver config

Bug 200261161

2. tegra watchdog enable
commit 1d387f64747a ("arm64: tegra: enable tegra watchdog driver")
arm64: tegra: enable tegra watchdog driver

Enable tegra watchdog driver in defconfig.

Bug 200261205

3. rtc enable
commit eebf1eca516d ("arm64: tegra: set Tegra RTC as hctosys device")
arm64: tegra: set Tegra RTC as hctosys device

Use Tegra RTC for system time and PMIC RTC as
backup RTC device

Bug 200261204

boot.img size increased by 67584 bytes

Change-Id: Iee4dc8a10bf911b28112aa0ad9b151dd74ce9465
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1484811
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

4 years agoarm64: configs: tegra: enable TI SN65dsi86 bridge
Emma Yan [Thu, 25 May 2017 23:45:43 +0000]
arm64: configs: tegra: enable TI SN65dsi86 bridge

CONFIG_TEGRA_DSI2EDP_SN65DSI86=y

boot.img size increased by 2048 bytes.

Bug 200311036

Change-Id: If1eae681db0936ba964bed46546e2555c2bd7ecb
Signed-off-by: Emma Yan <eyan@nvidia.com>
Reviewed-on: http://git-master/r/1490117
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agoARM64: tegra: sanitize android defconfig
Timo Alho [Fri, 26 May 2017 11:58:04 +0000]
ARM64: tegra: sanitize android defconfig

rewrite defconfig file using menuconfig+savedefconfig

Essentially this patch re-order sensor configurations and remove
DS1050 backlight that is not implemented yet.

Bug 1933787
Bug 20035193

Change-Id: I0b86760e9bd2a9e9128235de54bcddedb8c1e136
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/1490521
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

4 years agopinctrl: tegra: add t19x Kconfig trysource
Timo Alho [Fri, 26 May 2017 11:45:34 +0000]
pinctrl: tegra: add t19x Kconfig trysource

While at it, also complete t18x trysource.

Change-Id: If3fdb3a10a4f14031e31d6bd722e60a3fafbfe0e
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/1490520
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

4 years agoarm64: dts: define CONFIG_ANDROID in DTCCPP_FLAGS
Emma Yan [Wed, 24 May 2017 07:48:14 +0000]
arm64: dts: define CONFIG_ANDROID in DTCCPP_FLAGS

Kernel config is not included in device tree files
since device tree is independent of kernel repo.

Therefore, define the macro CONFIG_ANDROID in
DTCCPP_FLAGS only for Android.

Bug 200296475

Change-Id: I8d77123bb260964adc1036dbc0768ba5e6ae317c
Reviewed-on: http://git-master/r/1488673
(cherry-picked from commit 38662a03e23af0e116c9ffbce0e5837c64d10d9d)
Signed-off-by: Emma Yan <eyan@nvidia.com>
Reviewed-on: http://git-master/r/1488689
Reviewed-by: Laxman Dewangan <ldewangan@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>

4 years agoRevert "xhci: tegra: add id extcon support for OTG"
Timo Alho [Fri, 26 May 2017 17:50:09 +0000]
Revert "xhci: tegra: add id extcon support for OTG"

This reverts commit 2d79aa8de7029e2ff622e4497226a568a9577b65.

Bug 1933905

Change-Id: I0295a8360679b27318565903028459092b86dd54
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/1490676
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shu Zhong <shuz@nvidia.com>

4 years agoRevert "extcon: gpio-states: fix cable transition states"
Timo Alho [Fri, 26 May 2017 17:50:00 +0000]
Revert "extcon: gpio-states: fix cable transition states"

This reverts commit 369d2f2fc1f2fc3ce1844c330fb6e4c11ce988c2.

Bug 1933905

Change-Id: Ibae9003b6318191b69ba3a9a56b623f1ce2cc025
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/1490675
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shu Zhong <shuz@nvidia.com>

4 years agoRevert "phy: tegra: xusb: XUSB VBUS/ID based OTG support"
Timo Alho [Fri, 26 May 2017 17:49:52 +0000]
Revert "phy: tegra: xusb: XUSB VBUS/ID based OTG support"

This reverts commit fbd9f6f30040545ab619daa41576f97147643e30.

Bug 1933905

Change-Id: Id14c087da643990622edfe3535d58d281eb76da7
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/1490674
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shu Zhong <shuz@nvidia.com>

4 years agocrypto: testmgr: Add debug prints
Mallikarjun Kasoju [Tue, 18 Apr 2017 03:55:35 +0000]
crypto: testmgr: Add debug prints

Add prints for the pass case so that
the test results are clear.

Bug 200298271

Change-Id: I0d717aad55316d65236fee26cc31c9605b585ac0
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: http://git-master/r/1464296
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Tested-by: Konduri Praveen <kondurip@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1477398

4 years agoi2c: i2c-tegra-hv: fix global-out-of-bounds in tegra_hv_i2c_devtype
Pritesh Raithatha [Thu, 25 May 2017 05:42:31 +0000]
i2c: i2c-tegra-hv: fix global-out-of-bounds in tegra_hv_i2c_devtype

Adding empty bracket at end of array to fix following KASAN defect:

BUG: KASAN: global-out-of-bounds in platform_match+0xbc/0x120
at addr ffff20000b3305e0
Address belongs to variable tegra_hv_i2c_devtype+0x20/0x6e0
...
[<ffff2000089f76cc>] driver_register+0xb4/0x198
[<ffff2000089f93e0>] __platform_driver_register+0x90/0xa0
[<ffff20000a0ce7c8>] tegra_hv_i2c_init_driver+0x18/0x20

Bug 200312168

Change-Id: I0751a478cf3aed5e41ce2a67d3afd17bbd4a3a4a
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/1489429
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

4 years agopinctrl: tegra: pwr_domain in pingroup
Suresh Mangipudi [Tue, 23 May 2017 12:11:32 +0000]
pinctrl: tegra: pwr_domain in pingroup

Include pwr_domain in pingroup structure

Change-Id: Ie7577f0a1067020191658812cb1fbd6514eaef71
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/1487922
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

4 years agoARM64: configs: tegra: make TEGRA_18X_SERROR as LKM
Joseph Lo [Tue, 23 May 2017 03:19:39 +0000]
ARM64: configs: tegra: make TEGRA_18X_SERROR as LKM

Make TEGRA_18X_SERROR as LKM.
boot.img size is reduced by 18432 bytes.

Bug 200311248

Change-Id: Ib5287eab5799034c4f5ee0c87d8196809583a7ad
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Reviewed-on: http://git-master/r/1487657
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agophy: tegra: xusb: XUSB VBUS/ID based OTG support
Allie Liu [Mon, 15 May 2017 04:27:12 +0000]
phy: tegra: xusb: XUSB VBUS/ID based OTG support

This commit adds the following APIs to support VBUS/ID based OTG:
1. set/clear id override
2. vbus power on/off
3. workqueue for otg vbus handling
4. check if phy has OTG cap

Bug 200308475

Change-Id: Id8a21173f84a4334286e75e7be8a83a8a8d96922
Signed-off-by: Allie Liu <alliel@nvidia.com>
Reviewed-on: http://git-master/r/1481614
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hans Yang <hansy@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

4 years agoextcon: gpio-states: fix cable transition states
Allie Liu [Mon, 15 May 2017 04:56:06 +0000]
extcon: gpio-states: fix cable transition states

When cable state is currently either EXTCON_USB_HOST or EXTCON_USB, any
change of cable state should only be "disconnect" state (EXTCON_NONE).
This is true because when we want to switch cable, we should disconnect
it first and switch, so the only possible state transition is like this:

(host mode) <-> (disconnect/no cable) <-> (device mode)

So fix cable transition states by overwriting the cable state in the
following case:

(host mode) --> cable detach

where originally the cable state will be set from EXTCON_USB_HOST to
EXTCON_USB (due to VBUS is still supplied), and after SW turns off VBUS
the state will finally change to EXTCON_NONE. The extra EXTCON_USB event
causes unexpected launch of USB device mode driver but actually at this
point no cable is attached, and the USB host mode driver will miss cable
detached event to turn off host mode. This has led to some other failure
such as the device mode driver tries to do USB charger detection when
actually no cable is currently connected.

Bug 200308475

Change-Id: If21860991ece52cce2a9dc7bf4d8e8dd95834450
Signed-off-by: Allie Liu <alliel@nvidia.com>
Reviewed-on: http://git-master/r/1481616
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Henry Lin <henryl@nvidia.com>
Reviewed-by: Hans Yang <hansy@nvidia.com>
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

4 years agoxhci: tegra: add id extcon support for OTG
Allie Liu [Mon, 15 May 2017 04:42:50 +0000]
xhci: tegra: add id extcon support for OTG

This commit adds code to invoke OTG role update function
and set/clear id override upon being notified by extcon
about ID pin grounded/floating events.

Bug 200308475

Change-Id: I8476695c2d0b4ff36612edd60496fc2260dd86c3
Signed-off-by: Allie Liu <alliel@nvidia.com>
Reviewed-on: http://git-master/r/1481615
Reviewed-by: Hans Yang <hansy@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Tested-by: Ashutosh Jha <ajha@nvidia.com>

4 years agoMerge 4.9.30 into android-4.9
Greg Kroah-Hartman [Thu, 25 May 2017 15:32:43 +0000]
Merge 4.9.30 into android-4.9

Changes in 4.9.30
usb: misc: legousbtower: Fix buffers on stack
usb: misc: legousbtower: Fix memory leak
USB: ene_usb6250: fix DMA to the stack
watchdog: pcwd_usb: fix NULL-deref at probe
char: lp: fix possible integer overflow in lp_setup()
USB: core: replace %p with %pK
tpm_tis_core: Choose appropriate timeout for reading burstcount
ALSA: hda: Fix cpu lockup when stopping the cmd dmas
ARM: tegra: paz00: Mark panel regulator as enabled on boot
fanotify: don't expose EOPENSTALE to userspace
tpm_tis_spi: Use single function to transfer data
tpm_tis_spi: Abort transfer when too many wait states are signaled
tpm_tis_spi: Check correct byte for wait state indicator
tpm_tis_spi: Remove limitation of transfers to MAX_SPI_FRAMESIZE bytes
tpm_tis_spi: Add small delay after last transfer
tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver
tpm: add sleep only for retry in i2c_nuvoton_write_status()
tpm_crb: check for bad response size
ASoC: cs4271: configure reset GPIO as output
mlx5: Fix mlx5_ib_map_mr_sg mr length
infiniband: call ipv6 route lookup via the stub interface
dm btree: fix for dm_btree_find_lowest_key()
dm raid: select the Kconfig option CONFIG_MD_RAID0
dm bufio: avoid a possible ABBA deadlock
dm bufio: check new buffer allocation watermark every 30 seconds
dm mpath: split and rename activate_path() to prepare for its expanded use
dm cache metadata: fail operations if fail_io mode has been established
dm bufio: make the parameter "retain_bytes" unsigned long
dm thin metadata: call precommit before saving the roots
dm space map disk: fix some book keeping in the disk space map
md: update slab_cache before releasing new stripes when stripes resizing
md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop
rtlwifi: rtl8821ae: setup 8812ae RFE according to device type
mwifiex: MAC randomization should not be persistent
mwifiex: pcie: fix cmd_buf use-after-free in remove/reset
ima: accept previously set IMA_NEW_FILE
KVM: x86: Fix load damaged SSEx MXCSR register
KVM: x86: Fix potential preemption when get the current kvmclock timestamp
KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation
x86: fix 32-bit case of __get_user_asm_u64()
regulator: rk808: Fix RK818 LDO2
regulator: tps65023: Fix inverted core enable logic.
s390/kdump: Add final note
s390/cputime: fix incorrect system time
ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device
ath9k_htc: fix NULL-deref at probe
drm/amdgpu: Make display watermark calculations more accurate
drm/amdgpu: Avoid overflows/divide-by-zero in latency_watermark calculations.
drm/amdgpu: Add missing lb_vblank_lead_lines setup to DCE-6 path.
drm/nouveau/therm: remove ineffective workarounds for alarm bugs
drm/nouveau/tmr: ack interrupt before processing alarms
drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm
drm/nouveau/tmr: avoid processing completed alarms when adding a new one
drm/nouveau/tmr: handle races with hw when updating the next alarm time
gpio: omap: return error if requested debounce time is not possible
cdc-acm: fix possible invalid access when processing notification
ohci-pci: add qemu quirk
cxl: Force context lock during EEH flow
cxl: Route eeh events to all drivers in cxl_pci_error_detected()
proc: Fix unbalanced hard link numbers
of: fix sparse warning in of_pci_range_parser_one
of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes()
of: fdt: add missing allocation-failure check
ibmvscsis: Do not send aborted task response
iio: dac: ad7303: fix channel description
IIO: bmp280-core.c: fix error in humidity calculation
IB/hfi1: Return an error on memory allocation failure
IB/hfi1: Fix a subcontext memory leak
pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes
pid_ns: Fix race between setns'ed fork() and zap_pid_ns_processes()
USB: serial: ftdi_sio: fix setting latency for unprivileged users
USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs
USB: chaoskey: fix Alea quirk on big-endian hosts
f2fs: check entire encrypted bigname when finding a dentry
fscrypt: avoid collisions when presenting long encrypted filenames
libnvdimm: fix clear length of nvdimm_forget_poison()
xhci: remove GFP_DMA flag from allocation
usb: host: xhci-plat: propagate return value of platform_get_irq()
xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton
usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
net: irda: irda-usb: fix firmware name on big-endian hosts
usbvision: fix NULL-deref at probe
mceusb: fix NULL-deref at probe
ttusb2: limit messages to buffer size
dvb-usb-dibusb-mc-common: Add MODULE_LICENSE
usb: dwc3: gadget: Prevent losing events in event cache
usb: musb: tusb6010_omap: Do not reset the other direction's packet size
usb: musb: Fix trying to suspend while active for OTG configurations
USB: iowarrior: fix info ioctl on big-endian hosts
usb: serial: option: add Telit ME910 support
USB: serial: qcserial: add more Lenovo EM74xx device IDs
USB: serial: mct_u232: fix big-endian baud-rate handling
USB: serial: io_ti: fix div-by-zero in set_termios
USB: hub: fix SS hub-descriptor handling
USB: hub: fix non-SS hub-descriptor handling
ipx: call ipxitf_put() in ioctl error path
iio: proximity: as3935: fix as3935_write
iio: hid-sensor: Store restore poll and hysteresis on S3
s5p-mfc: Fix race between interrupt routine and device functions
gspca: konica: add missing endpoint sanity check
s5p-mfc: Fix unbalanced call to clock management
dib0700: fix NULL-deref at probe
zr364xx: enforce minimum size when reading header
dvb-frontends/cxd2841er: define symbol_rate_min/max in T/C fe-ops
digitv: limit messages to buffer size
dw2102: limit messages to buffer size
cx231xx-audio: fix init error path
cx231xx-audio: fix NULL-deref at probe
cx231xx-cards: fix NULL-deref at probe
powerpc/mm: Ensure IRQs are off in switch_mm()
powerpc/eeh: Avoid use after free in eeh_handle_special_event()
powerpc/book3s/mce: Move add_taint() later in virtual mode
powerpc/pseries: Fix of_node_put() underflow during DLPAR remove
powerpc/iommu: Do not call PageTransHuge() on tail pages
powerpc/64e: Fix hang when debugging programs with relocated kernel
powerpc/tm: Fix FP and VMX register corruption
arm64: KVM: Do not use stack-protector to compile EL2 code
arm: KVM: Do not use stack-protector to compile HYP code
KVM: arm: plug potential guest hardware debug leakage
ARM: 8662/1: module: split core and init PLT sections
ARM: 8670/1: V7M: Do not corrupt vector table around v7m_invalidate_l1 call
ARM: dts: at91: sama5d3_xplained: fix ADC vref
ARM: dts: at91: sama5d3_xplained: not all ADC channels are available
ARM: dts: imx6sx-sdb: Remove OPP override
arm64: dts: hi6220: Reset the mmc hosts
arm64: xchg: hazard against entire exchange variable
arm64: ensure extension of smp_store_release value
arm64: armv8_deprecated: ensure extension of addr
arm64: uaccess: ensure extension of access_ok() addr
arm64: documentation: document tagged pointer stack constraints
staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory.
staging: rtl8192e: fix 2 byte alignment of register BSSIDR.
staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD.
staging: rtl8192e: GetTs Fix invalid TID 7 warning.
iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings
metag/uaccess: Fix access_ok()
metag/uaccess: Check access_ok in strncpy_from_user
stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms
uwb: fix device quirk on big-endian hosts
genirq: Fix chained interrupt data ordering
nvme: unmap CMB and remove sysfs file in reset path
MIPS: Loongson-3: Select MIPS_L1_CACHE_SHIFT_6
osf_wait4(): fix infoleak
um: Fix to call read_initrd after init_bootmem
tracing/kprobes: Enforce kprobes teardown after testing
PCI: hv: Allocate interrupt descriptors with GFP_ATOMIC
PCI: hv: Specify CPU_AFFINITY_ALL for MSI affinity when >= 32 CPUs
PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
PCI: Fix another sanity check bug in /proc/pci mmap
PCI: Only allow WC mmap on prefetchable resources
PCI: Freeze PME scan before suspending devices
mtd: nand: orion: fix clk handling
mtd: nand: omap2: Fix partition creation via cmdline mtdparts
mtd: nand: add ooblayout for old hamming layout
drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2
NFSv4: Fix a hang in OPEN related to server reboot
NFS: Fix use after free in write error path
NFS: Use GFP_NOIO for two allocations in writeback
nfsd: fix undefined behavior in nfsd4_layout_verify
nfsd: encoders mustn't use unitialized values in error cases
drivers: char: mem: Check for address space wraparound with mmap()
drm/i915/gvt: Disable access to stolen memory as a guest
Linux 4.9.30

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

4 years agoLinux 4.9.30
Greg Kroah-Hartman [Thu, 25 May 2017 13:45:05 +0000]
Linux 4.9.30

4 years agodrm/i915/gvt: Disable access to stolen memory as a guest
Chris Wilson [Wed, 9 Nov 2016 10:39:05 +0000]
drm/i915/gvt: Disable access to stolen memory as a guest

commit 04a68a35ce6d7b54749989f943993020f48fed62 upstream.

Explicitly disable stolen memory when running as a guest in a virtual
machine, since the memory is not mediated between clients and reserved
entirely for the host. The actual size should be reported as zero, but
like every other quirk we want to tell the user what is happening.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99028
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161109103905.17860-1-chris@chris-wilson.co.uk
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

4 years agodrivers: char: mem: Check for address space wraparound with mmap()
Julius Werner [Fri, 12 May 2017 21:42:58 +0000]
drivers: char: mem: Check for address space wraparound with mmap()

commit b299cde245b0b76c977f4291162cf668e087b408 upstream.

/dev/mem currently allows mmap() mappings that wrap around the end of
the physical address space, which should probably be illegal. It
circumvents the existing STRICT_DEVMEM permission check because the loop
immediately terminates (as the start address is already higher than the
end address). On the x86_64 architecture it will then cause a panic
(from the BUG(start >= end) in arch/x86/mm/pat.c:reserve_memtype()).

This patch adds an explicit check to make sure offset + size will not
wrap around in the physical address type.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

4 years agonfsd: encoders mustn't use unitialized values in error cases
J. Bruce Fields [Fri, 5 May 2017 20:17:57 +0000]
nfsd: encoders mustn't use unitialized values in error cases

commit f961e3f2acae94b727380c0b74e2d3954d0edf79 upstream.

In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.

This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.

GETDEVICEINFO has the same problem.

Reported-by: Ari Kauppi <Ari.Kauppi@synopsys.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

4 years agonfsd: fix undefined behavior in nfsd4_layout_verify
Ari Kauppi [Fri, 5 May 2017 20:07:55 +0000]
nfsd: fix undefined behavior in nfsd4_layout_verify

commit b550a32e60a4941994b437a8d662432a486235a5 upstream.

  UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34
  shift exponent 128 is too large for 32-bit type 'int'

Depending on compiler+architecture, this may cause the check for
layout_type to succeed for overly large values (which seems to be the
case with amd64). The large value will be later used in de-referencing
nfsd4_layout_ops for function pointers.

Reported-by: Jani Tuovila <tuovila@synopsys.com>
Signed-off-by: Ari Kauppi <ari@synopsys.com>
[colin.king@canonical.com: use LAYOUT_TYPE_MAX instead of 32]
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>