]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/log
sojka/nv-tegra/linux-3.10.git
9 years agoarm: tegra12_defconfig: set 3GB-16MB task size daily-2014.11.07.1_l4t/l4t-r21 tegra-l4t-r21.1
Zheng Liu [Mon, 6 Oct 2014 23:49:08 +0000 (16:49 -0700)]
arm: tegra12_defconfig: set 3GB-16MB task size

The previously used 3GB-24MB task size caused relocation failures when
loading kernel modules. This happened because part of the module loading
area got beyond the 32MB relocation range from kernel .text segment.
This problem is ARM32-specific and does not affect ARM64.

Bug 1489463

Change-Id: I255eb605988b3095d49f05d4d4b199bf2c796bfd
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/553996
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agoarm: tegra12_defconfig: make audio drivers inbuilt
Zheng Liu [Tue, 7 Oct 2014 18:17:49 +0000 (11:17 -0700)]
arm: tegra12_defconfig: make audio drivers inbuilt

Revert previous changes to modularize the audio drivers. The module
probe/remove paths of these drivers are untested and buggy. Make these
drivers built-in until the bugs are worked out, and schedule allows
for thorough testing.

Bug 1536426

Change-Id: Ic1698e7205b1d97461051cd1e25a513dac9649fe
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/554287
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoASoC: tegra: fix avp module remove
Shreshtha SAHU [Tue, 7 Oct 2014 10:07:45 +0000 (15:37 +0530)]
ASoC: tegra: fix avp module remove

- avp module remove should not try to release client
  if avp pcm open was never called and client was
  never allocated

- avp module remove should deregister offload ops

Bug 200043253

Change-Id: I11a6d65afab4d88aa5669553809e99fd69cfd000
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/554153
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agommc: sdhci: tegra: initialize local variable
Bibek Basu [Mon, 29 Sep 2014 07:28:00 +0000 (12:58 +0530)]
mmc: sdhci: tegra: initialize local variable

Initialize uninitialized variable
vmin_tap_hole & vmax_tap_hole

Bug 200042035

Change-Id: I5e9303f2b585423d936b289a59228028275ec5ec
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/542582
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agofirmware: enable default printing of direct loading
Bibek Basu [Mon, 29 Sep 2014 07:23:00 +0000 (12:53 +0530)]
firmware: enable default printing of direct loading

Move pr_dbg to pr_info for direct firmware loading.

Bug 200026940

Change-Id: I617fde8aac85be01857b963c0e18ae6cf22aa444
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/542581
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoarm: tegra12_defconfig: max98090 as loadable module
Shreshtha SAHU [Wed, 24 Sep 2014 15:37:42 +0000 (21:07 +0530)]
arm: tegra12_defconfig: max98090 as loadable module

Bug 1550880

Change-Id: I6278cde7643dd3b298d72c54497cb5274a5de544
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/551903
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agosoc: codecs: max98090: free_irq during module remove
Shreshtha SAHU [Wed, 24 Sep 2014 15:33:35 +0000 (21:03 +0530)]
soc: codecs: max98090: free_irq during module remove

Bug 1550880

Change-Id: I54697780893c17a1c117483fd9bf271ba31209d4
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/551902
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agosoc: tegra: max98090: laguna: fix error return paths
Shreshtha SAHU [Wed, 24 Sep 2014 15:21:29 +0000 (20:51 +0530)]
soc: tegra: max98090: laguna: fix error return paths

- Remove switch_dev_unregister and call tegra_asoc_switch_unregister
instead in error return path corresponding to tegra_asoc_switch_register.

- Skip max97236 registration for laguna erss platorm.

Issues surfaced out on making max98090 as removable KO module.

Bug 1550880

Change-Id: I6a6c0185a3980efab3592f0733bda214aac4fc81
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/551901
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoasoc: rt5639: fix missing regmap_exit during remove
Shreshtha SAHU [Mon, 29 Sep 2014 11:19:21 +0000 (16:49 +0530)]
asoc: rt5639: fix missing regmap_exit during remove

without regmap_exit in remove, next modprobe of
modprobe used to complain of
"Failed to create debugfs directory"
due to stale debugfs directory.

Bug 200038898

Change-Id: Ie6373f40b50c1307ee7d114dc0f44164c4b426eb
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/542646
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agogpu: nvgpu: Increase PBDMA timeout
Terje Bergstrom [Fri, 15 Aug 2014 07:44:51 +0000 (10:44 +0300)]
gpu: nvgpu: Increase PBDMA timeout

PBDMA timeout can cause stale data in FIFO. Default value equals 1ms.
Increase it to max.

Bug 1537636

Change-Id: I1c6c6b10abaece3a64b77b9b3ef77ff726ff67cf
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/457047
(cherry picked from commit f516652f567a44e2e1c6313dccd3dc80172a980f)
Reviewed-on: http://git-master/r/457067
(cherry picked from commit f5219cf5888502de3f6cabb2db3e8968b6d20b7c)
Reviewed-on: http://git-master/r/504534
Reviewed-by: Automatic_Commit_Validation_User
9 years agomedia: tegra_v4l2_camera: set clock rate for pll_d
Bryan Wu [Wed, 27 Aug 2014 23:31:13 +0000 (16:31 -0700)]
media: tegra_v4l2_camera: set clock rate for pll_d

Test pattern generator in VI needs PLL_D running at certain clock
rate, then CSI clock is a child of PLL_D can get the right clock
for operation.

If DC disable DSI and set PLL_D as a very low frequency and VI driver
forgets to set PLL_D rate back, test pattern generator won't work.

This patch will set PLL_D as 927M when we do test pattern generator
testing.

Bug 1515755

Change-Id: I8fd27d193a436e1057ce2bce8f8153630dc5cdce
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/489043
(cherry picked from commit e09393ad2a02309f63a3baeb567460e1e2f79cd9)
Reviewed-on: http://git-master/r/498938
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoARM: ardbeg: enable imx135 V4L2 sensor driver
Bryan Wu [Sat, 15 Feb 2014 01:22:06 +0000 (17:22 -0800)]
ARM: ardbeg: enable imx135 V4L2 sensor driver

Bug 1380143

Change-Id: I9292465b0652c5287db6bbc97a08c76c1ad48484
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/337471
(cherry picked from commit e83a8827e9888f567a5859ecac6a1041edcf0db9)
Reviewed-on: http://git-master/r/498937
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agomedia: tegra_camera: vi2: support for real sensor
Bryan Wu [Wed, 20 Nov 2013 00:59:23 +0000 (16:59 -0800)]
media: tegra_camera: vi2: support for real sensor

Add code to support RAW10 capture from real sensor like IMX135.
Add flag to skip register program from second frame.
Fix sync point operations.

Bug 1380143

Change-Id: I19bcd17ddfba0e16b4b3a34ae8a4e5a0119e85e1
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/337470
(cherry picked from commit ff1055fa436ffb5c1d57eee2e09c17578774d65f)
Reviewed-on: http://git-master/r/498936
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agomedia: soc_camera: add imx135 sensor driver
Bryan Wu [Tue, 19 Nov 2013 23:51:20 +0000 (15:51 -0800)]
media: soc_camera: add imx135 sensor driver

Sony IMX135 camera sensor can be found on Ardbeg/Laguna. This patch
introduced sensor driver for imx135 using soc_camera interface.

Bug 1380143

Change-Id: Ifa0becf1ec2d9931ebf9ea3a4e9ea3e1013a9e36
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/337469
(cherry picked from commit 94a04c2c9b614519aab6f718d60bcf1d8032aa8f)
Reviewed-on: http://git-master/r/498935
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: remove support for Deprecated GET_ID/FROM_ID ioctl's
Maneet Singh [Fri, 12 Sep 2014 03:12:33 +0000 (20:12 -0700)]
video: tegra: nvmap: remove support for Deprecated GET_ID/FROM_ID ioctl's

Remove support and add warning message for deprecated IOCTL's -
NVMAP_IOC_FROM_ID and NVMAP_IOC_GET_ID. These ioctl calls
are deprecated by corresponding FD ioctl calls.

Bug 1553082

Change-Id: I3cd531422293f19496687f346692fa91ebe58a40
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/498045
(cherry picked from commit 420dce0a99231453ebbd091f110d0de816e4885e)
Reviewed-on: http://git-master/r/538987
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: fix use-after-free race condition
Maneet Singh [Fri, 12 Sep 2014 03:12:33 +0000 (20:12 -0700)]
video: tegra: nvmap: fix use-after-free race condition

Incremented nvmap_handle ref count in utility function
nvmap_get_id_from_dmabuf_fd() before the function release reference
to dma buffer. This is required to avoid race conditions in nvmap
code where nvmap_handle returned by this function could be freed
concurrently while the caller is still using it.

As a side effect of above change, every caller of this utility
function must decrement nvmap_handle ref count after using the
returned nvmap_handle.

Bug 1553082

Change-Id: Iffc2e5819f8b493d5ed95a9d0c422ccd52438965
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/498135
(cherry picked from commit afddea745cc4f4a824be501ecbbb50f55e7e6f04)
Reviewed-on: http://git-master/r/538986
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: cleanup redundant functions
Maneet Singh [Fri, 12 Sep 2014 00:53:42 +0000 (17:53 -0700)]
video: tegra: nvmap: cleanup redundant functions

Removed redundant function unmarshal_user_id() and replaced it with
unmarshal_user_handle() which it internally calls without any other
changes.

Bug 1553082

Change-Id: I7d998966c593f11a3322b0503ef11311fc1ae5e7
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/498103
(cherry picked from commit 4880b6c2bdf5b10e4a71b5b79e7878343b9e7e3b)
Reviewed-on: http://git-master/r/538985
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoARM: tegra12: add clock preinit code for U-Boot
Bryan Wu [Fri, 4 Apr 2014 20:52:26 +0000 (13:52 -0700)]
ARM: tegra12: add clock preinit code for U-Boot

U-Boot doesn't setup clock as NVTBoot or fastboot, so clocks need to
be preinit before our normal clock init.

Bug 1482099

Change-Id: I5ad8dc7e61f1ad4864410a808c41298a91c7198f
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/408427
(cherry picked from commit 6682ca58527e47fe6db40855d2deba48a6d321d3)
Reviewed-on: http://git-master/r/500873
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoARM: tegra12: config: enable clock preinit code
Bryan Wu [Wed, 16 Apr 2014 22:56:36 +0000 (15:56 -0700)]
ARM: tegra12: config: enable clock preinit code

Enable clock preinit code by default for U-Boot.

Bug 1482099

Change-Id: I72fa1e9b45f580813846c7506efec5a03347efcd
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/408428
(cherry picked from commit 8f2ff20c410a8b7a25e4132e6a194117e4f74361)
Reviewed-on: http://git-master/r/500874
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: host: gk20a: reduce gr delays
Prashant Malani [Wed, 2 Oct 2013 21:23:59 +0000 (14:23 -0700)]
video: tegra: host: gk20a: reduce gr delays

The delay value used in gr usleep_range calls is
too high. We can start at a much lower value.

Bug 200032452

Change-Id: I7d196d0e3be0a5cd84e8c4dad537fae043da6274
Signed-off-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-on: http://git-master/r/335234
(cherry picked from commit 49bb8436a534496c70e6238d3bc20ed280d5b654)
Reviewed-on: http://git-master/r/504632
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoedp: sysedp : CPU/GPU priority depends on fGPU
Matt Longnecker [Tue, 19 Aug 2014 00:00:01 +0000 (17:00 -0700)]
edp: sysedp : CPU/GPU priority depends on fGPU

Provide sysedp_dynamic_capping with the instantaneous GPU frequency
when notifying it of the GPU load. Modify the gpu/cpu priority
decision logic to choose CPU priority until GPU frequency gets "near"
the CPU-priority-limited-GPU-fmax. Introduce the priority_bias debugfs
parameter to facilitate tuning of "near". priority_bias takes a value
from 0 to 100.

Change-Id: I57df17d50cd8077a512b5932f4a304ca5e6992aa
Signed-off-by: Matt Longnecker <mlongnecker@nvidia.com>
Reviewed-on: http://git-master/r/481720
(cherry picked from commit b2ac745a45e273e849d7b190913ee97092fdebc2)
Reviewed-on: http://git-master/r/498901
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoasoc: rt56xx: fix missing device_remove_file
Shreshtha SAHU [Wed, 17 Sep 2014 10:28:09 +0000 (15:58 +0530)]
asoc: rt56xx: fix missing device_remove_file

added missing device_remove_file during device remove
this resulted failure in modprobe of module

Bug 200038187
Bug 200037087

Change-Id: Ibbe8cf92162144d438f5b563bf6d2b9787acc04e
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/499745
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agovideo: tegra: dc: Avoid FRAME_END_INT conflict
Daniel Solomon [Fri, 15 Aug 2014 00:50:15 +0000 (17:50 -0700)]
video: tegra: dc: Avoid FRAME_END_INT conflict

Allowing for dc->lock to be acquired by the
caller in function tegra_dc_config_frame_end_intr
can result in FRAME_END_INT mask register being
overwritten if the lock is actually acquired by
another thread.

Refactor the critical section into its own function
and allow callers to call either function. Also
Change the name of tegra_dc_wait_for_frame_end
to indicate that it should be called with dc->lock
locked.

Bug 1534724

Change-Id: I87b1fc529f29f707a1bdadf18efa6bb19d6966b3
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/456988
(cherry picked from commit ec9b7f555b9648e3aee0cd9781a92b14178a3344)
Reviewed-on: http://git-master/r/496581
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jong Kim <jongk@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agovideo: tegra: dc: Fix and refactor FRAME_END_INT
Daniel Solomon [Tue, 5 Aug 2014 21:48:42 +0000 (14:48 -0700)]
video: tegra: dc: Fix and refactor FRAME_END_INT

- Fix a conflict with other DC interrupt masks
  when the DSI driver waits on FRAME_END_INT
- Move generic FRAME_END_INT mask/unmask and
  wait-for functions to dc.c

Bug 1534724

Change-Id: I40e26ada2f0494782979e32c1a22906361b214b5
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/451186
(cherry picked from commit 24a39c49f63eea704003ee27296f1f70d46bcbd0)
Reviewed-on: http://git-master/r/496580
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jong Kim <jongk@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoata: Skip ahci dump call if probe is not ivoked
Preetham Chandru R [Tue, 12 Aug 2014 14:31:09 +0000 (20:01 +0530)]
ata: Skip ahci dump call if probe is not ivoked

Skip ahci dump call if probe is not ivoked and even if
CONFIG_TEGRA_SATA_IDLE_POWERGATE is not defined

Bug 200010376

Change-Id: I4ec5f6643b3bc0dbbebbd65b6085d9ea2353eac1
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/455571
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkata Jagadish <vjagadish@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoarm: tegra12: jetson-tk1: add debounce to power key
Bibek Basu [Tue, 16 Sep 2014 12:10:22 +0000 (17:40 +0530)]
arm: tegra12: jetson-tk1: add debounce to power key

Continuous press & release of power key during resume
cause power key to generate continious interrupt
leading to hang of device. So add debounce time

Bug 200037478

Change-Id: Ia3081700af3291813450dda7205f842f511e63db
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/499296
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoarm: tegra: Ram repair for slow cluster
Bibek Basu [Tue, 2 Sep 2014 10:18:09 +0000 (15:48 +0530)]
arm: tegra: Ram repair for slow cluster

Do ram repair for slow cluster also during
boot

Bug 1528461

Change-Id: I71ed7891aaff48f0b87438ad029b22ced9be0f04
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/494787
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoASoC: Tegra: Fix double regulator disable
Shreshtha SAHU [Mon, 15 Sep 2014 11:32:35 +0000 (17:02 +0530)]
ASoC: Tegra: Fix double regulator disable

digital_reg was disabled second time instead of codec_reg

Bug 200036995

Change-Id: I8e9b3aeafa613a5a58063b88ee81bf3d0aaf4e43
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/498837
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agousb: xhci: tegra: remove PCIe dependency
Haribabu Narayanan [Tue, 17 Jun 2014 00:58:10 +0000 (17:58 -0700)]
usb: xhci: tegra: remove PCIe dependency

PCIe powergating dependency is now handled internally in the powergating module
for t12x/t13x. This patch removes PCIe related powergating calls from XHCI
driver for tegra.

Bug 1451279
Bug 1524744
Bug 200027067

Change-Id: I0752cd745f218266e1636cc7c40a6c29dee3b3d4
Reviewed-on: http://git-master/r/424036
(cherry picked from commit 91e2bd6728ca1969615081c70be6b2f21acd43d5)
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/498662
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoarm: tegra: power: add pcie dependency to xusb ops
Haribabu Narayanan [Tue, 17 Jun 2014 00:57:46 +0000 (17:57 -0700)]
arm: tegra: power: add pcie dependency to xusb ops

Due to a HW bug 1320346 in t12x/t13x, PCIE needs to be unpowergated when XUSB
is to be accessed.  Currently PCIE powergating ops need to be invoked from XUSB
driver since powergating module doesn't internally handle this dependency.

This patch implements this dependency within the powergating module so that
xhci-tegra driver can stay chip-agnostic.

Bug 1451279
Bug 1524744
Bug 200027067

Change-Id: I57da2645c9bde1c98b73a906f2ff5e407a3a8380
Reviewed-on: http://git-master/r/424035
(cherry picked from commit ff373b04f297ee653c58a86c6642325037f5d10e)
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/498661
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agousb: xhci: tegra: remove conditional powergating
Haribabu Narayanan [Tue, 3 Jun 2014 02:28:42 +0000 (19:28 -0700)]
usb: xhci: tegra: remove conditional powergating

The powergate module now maintains reference count for PCIE.  Remove conditional
checks in XHCI driver before invoking powergating APIs.

Bug 1451279
Bug 1455032
Bug 200027067

Change-Id: I186270dc86fba78a8c321ba5923382e642b14b60
Reviewed-on: http://git-master/r/418061
(cherry picked from commit b0f746945fccf025e2ab1764c0cc35eb1bc780b3)
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/498660
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoarm: tegra: power: add reference counters for pcie
Haribabu Narayanan [Tue, 3 Jun 2014 01:39:57 +0000 (18:39 -0700)]
arm: tegra: power: add reference counters for pcie

Due to HW Bug 1320346, both XUSB and PCIE modules need to control powergating
on PCIE block.  Implement reference counter mechanism so that powergating is
done only when neither of these two drivers are active.

Bug 1451279
Bug 1455032
Bug 200027067

Change-Id: I6866ba0fb47433e211360b722abbb1b2c1a05c35
Reviewed-on: http://git-master/r/418060
(cherry picked from commit 70be55b824632252be36f6ee0d495d4c0f4e507c)
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/498659
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoarm: tegra12: dtb: rearrange pmc registration
Bibek Basu [Fri, 12 Sep 2014 08:52:00 +0000 (14:22 +0530)]
arm: tegra12: dtb: rearrange pmc registration

PMC should be suspended as soon as interrupt-
controller bus is suspended so that no wake signal
is entertained in between leading to abnormal
system behaviour

Bug 200036432

Change-Id: I4de7462a8c0588f8cecde270a97c39040748a4b6
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/498280
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoARM: tegra: move pinmux dt node before gpio mode
Laxman Dewangan [Wed, 21 May 2014 09:25:27 +0000 (14:55 +0530)]
ARM: tegra: move pinmux dt node before gpio mode

Move the pimx DT node before gpio node to make sure that
pinmux get registered before the gpio.

Bug 200033491

Change-Id: I55d5a5c1a1570c16d8332ba224e0ed9a1f7c257c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/412630
(cherry picked from commit 463019f3158b58906f5b4c81463e5b0b1067576f)
Reviewed-on: http://git-master/r/498813
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
9 years agopinctrl: tegra: fix pinconfig_group_set
Bibek Basu [Tue, 9 Sep 2014 09:18:12 +0000 (14:48 +0530)]
pinctrl: tegra: fix pinconfig_group_set

Prepare config using param parameter to generate the right
value for pinmux register

Bug 200033491

Change-Id: I973cc449e8cf89cb3b6f5b5da1021d21d193b47d
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/496827
(cherry picked from commit 418c027e40353a4b99fe7fcfbc0743de7e07d15c)
Reviewed-on: http://git-master/r/498329
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agopinctrl: tegra: set tristate =1 and input =0 for unused pins
Laxman Dewangan [Thu, 29 May 2014 12:24:41 +0000 (17:54 +0530)]
pinctrl: tegra: set tristate =1 and input =0 for unused pins

Set the tristate bit to 1 and e_input to 0 for unused pins
to set it on low power and avoid conflict with any other pins.

Bug 200033491

Change-Id: If83f6129dbf6c6fe28a7a7c596e5a3858a894914
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/416649
(cherry picked from commit 7e81b36f87cffdc5d473a39735877a1432ac3151)
Reviewed-on: http://git-master/r/498328
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agopinctrl: tegra: configure pins for gpio direction
Laxman Dewangan [Fri, 12 Sep 2014 09:42:43 +0000 (15:12 +0530)]
pinctrl: tegra: configure pins for gpio direction

If pin is configured on gpio mode and set for input direction
then set e_input = 1 and if pin is set for output direction
then set tristate = 0 for that pin.

Bug 200033491

Change-Id: Ibcae17ad8bf4e45f0c74eb68d3bf975078fb67d6
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/416650
(cherry picked from commit 3dbac8e8382be0766e221c3f47f6254538b17030)
Reviewed-on: http://git-master/r/498327
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agogpio: tegra: call pinctrl dirctions apis on direction input/output
Laxman Dewangan [Wed, 21 May 2014 14:09:35 +0000 (19:39 +0530)]
gpio: tegra: call pinctrl dirctions apis on direction input/output

Set the pins in different direction based on client request from gpio.
This will help to non-tristate the pin on gpio output mode or enable
input on gpio input mode without any explicit condition.

Bug 200033491

Change-Id: I074451e344bfd8465aceb39c1091809da4f58f58
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit c520a6048a942b5870f560979045c74659c8fe76)
Reviewed-on: http://git-master/r/#/c/415991/
Reviewed-on: http://git-master/r/498326
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agogpio: tegra: Enable pinctrl_request_gpio
shravanid [Fri, 2 May 2014 11:16:27 +0000 (16:46 +0530)]
gpio: tegra: Enable pinctrl_request_gpio

Call pinctrl_request_gpio when gpio is requested
by tegra_gpio_request

Bug 200033491

Change-Id: I0e0a129adf51775edaa5887b11188f0ed1776e0e
Signed-off-by: shravanid <shravanid@nvidia.com>
Reviewed-on: http://git-master/r/404352
(cherry picked from commit 7ba0a34569bff25730406a4c54967e4e2c470cbc)
Reviewed-on: http://git-master/r/498325
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoArm: config: tegra12: Enable interactive governor
Rajkumar Kasirajan [Tue, 26 Aug 2014 06:18:35 +0000 (14:18 +0800)]
Arm: config: tegra12: Enable interactive governor

The interactive governor provides better performance than
ondemand governor. Enable it to improve the performance.

Bug 1359622

Change-Id: Ibc51285531ce2ef0d20fc668e240ef59db1322b1
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
(cherry picked from commit 42ad40e52df0423d1622b1aa9835033c1c8ef890)
Reviewed-on: http://git-master/r/#/c/488018/
Reviewed-on: http://git-master/r/488030
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agoarm64: configs: tegra13: enable Tegra Profiler
Igor Nabirushkin [Fri, 1 Aug 2014 20:21:58 +0000 (00:21 +0400)]
arm64: configs: tegra13: enable Tegra Profiler

Enable Tegra Profiler for L4T.

Bug 1540280

Change-Id: I13f22d512c1e42d4ad91c03ed7825a8bdbbf2e93
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/450456
(cherry picked from commit 395d3b5d3fad1ac49b06d3b78004cbfce660c504)
Reviewed-on: http://git-master/r/481969
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoarm: configs: vcm30t124: enable Tegra Profiler
Igor Nabirushkin [Mon, 14 Jul 2014 08:37:25 +0000 (12:37 +0400)]
arm: configs: vcm30t124: enable Tegra Profiler

Enable Tegra Profiler for vcm30t124 board.

Bug 1540280

Change-Id: I75263020677b0dd7f210bbdc72a775a05370ef81
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/437635
(cherry picked from commit f0cd768a1d49bcadc0ced238b0ce24272219cd2f)
Reviewed-on: http://git-master/r/481972
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoarm: configs: tegra12: enable Tegra Profiler
Igor Nabirushkin [Fri, 1 Aug 2014 18:41:12 +0000 (22:41 +0400)]
arm: configs: tegra12: enable Tegra Profiler

Enable Tegra Profiler for L4T.

Bug 1540280

Change-Id: I700401a44e91370f3e811999b0017ac6ef2ff28a
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/453861
(cherry picked from commit 25cfc076fc7b4133d4d3027c9530723325b8fa3d)
Reviewed-on: http://git-master/r/481968
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agoarm: tegra12: initialize pll_a_out0
Bibek Basu [Fri, 5 Sep 2014 10:56:38 +0000 (16:26 +0530)]
arm: tegra12: initialize pll_a_out0

Before initializing i2s clock we need to intialize
its parent clocks pll_a_out0

Bug 200027051

Change-Id: I9fa42e82bbf3c7742a57ffc698c31e6ca1d94bd5
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/496028
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bryan Wu <pengw@nvidia.com>
Tested-by: Bryan Wu <pengw@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agotegra: fb: Notify fbcon DC is unavailable
Pankaj Dabade [Fri, 5 Sep 2014 10:55:59 +0000 (16:25 +0530)]
tegra: fb: Notify fbcon DC is unavailable

In the absence of hotplug, monitor data and mode database is removed
and DC is switched off. However, fbcon is unaware.
This patch adds the change to fb_info state to suspend while updating
monitor specs. This state will denote that the hardware is unavailable.
Info will be restored to state running once modelist is available.

Bug 200031817

Change-Id: I0d4a51fdaa383d9201ab299d602fb3cc9ed93f52
Signed-off-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-on: http://git-master/r/496027
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoarm: tegra12_defconfig: add Realtek wifi modules
Mike Thompson [Fri, 5 Sep 2014 19:35:41 +0000 (12:35 -0700)]
arm: tegra12_defconfig: add Realtek wifi modules

Adding kernel support for Realtek USB and minipci wifi modules.

Bug 1512036

Change-Id: I44f52b5d2c0e55e56d0a53273f7c045d38ff485f
Signed-off-by: Mike Thompson <mikthompson@nvidia.com>
Reviewed-on: http://git-master/r/496144
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoarm: tegra12_defconfig: modularize kernel bits
Zheng Liu [Wed, 3 Sep 2014 00:08:51 +0000 (17:08 -0700)]
arm: tegra12_defconfig: modularize kernel bits

Modularize some components to shrink the kernel. The target is
a .text section <=8MB in order to ensure successful relocations
from the 22MB module loading segment.

This gets us to about 10MB which may suffice for now.

Bug 1536426

Change-Id: Ib3f91eef4dfc4d1e3c9620020a326f3f53f0491e
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/494898
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Allen Martin <amartin@nvidia.com>
9 years agoarm: tegra12_defconfig: renormalize the defconfig
Zheng Liu [Tue, 2 Sep 2014 21:51:33 +0000 (14:51 -0700)]
arm: tegra12_defconfig: renormalize the defconfig

No actual configuration changes. Config items have shifted around,
causing confusion when making actuall configuration changes.
This defconfig is generated with the following process under the
kernel directory:
make tegra12_defconfig
make oldconfig
make savedefconfig
cp defconfig arch/arm/configs/tegra12_defconfig

Change-Id: Ic0c197cf6bad4cb4ddd7742215fab8a1e8d30a50
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/494897
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Allen Martin <amartin@nvidia.com>
9 years agotegra: sound: export symbols for module access
Zheng Liu [Fri, 29 Aug 2014 22:07:50 +0000 (15:07 -0700)]
tegra: sound: export symbols for module access

Export symbols so the sound driver can be built as a module.

Bug 1536426

Change-Id: I86fa8800df1988f630b4e45d4cbf1733c039c837
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/494120
GVS: Gerrit_Virtual_Submit
Reviewed-by: Allen Martin <amartin@nvidia.com>
9 years agoarm: tegra: export symbol for module access
Zheng Liu [Fri, 29 Aug 2014 22:03:24 +0000 (15:03 -0700)]
arm: tegra: export symbol for module access

Export tegra_get_board_info to allow sound driver to be
built as a module.

Bug 1536426

Change-Id: Id125cce6fbef1a70c438bec2eabadf5fdc698272
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/494119
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Allen Martin <amartin@nvidia.com>
9 years agopwm: Add sysfs interface
H Hartley Sweeten [Tue, 11 Jun 2013 17:38:59 +0000 (10:38 -0700)]
pwm: Add sysfs interface

Add a simple sysfs interface to the generic PWM framework.

  /sys/class/pwm/
  `-- pwmchipN/           for each PWM chip
      |-- export          (w/o) ask the kernel to export a PWM channel
      |-- npwm            (r/o) number of PWM channels in this PWM chip
      |-- pwmX/           for each exported PWM channel
      |   |-- duty_cycle  (r/w) duty cycle (in nanoseconds)
      |   |-- enable      (r/w) enable/disable PWM
      |   |-- period      (r/w) period (in nanoseconds)
      |   `-- polarity    (r/w) polarity of PWM (normal/inversed)
      `-- unexport        (w/o) return a PWM channel to the kernel

Based on work by Lars Poeschel.

Bug  200028381

Change-Id: I0c9c6ad2ca7173e6fc3fbe1d3cd3963cde00539a
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Lars Poeschel <poeschel@lemonage.de>
Cc: Ryan Mallon <rmallon@gmail.com>
Cc: Rob Landley <rob@landley.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
(cherry picked from commit 76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d)
Reviewed-on: http://git-master/r/455068
(cherry picked from commit b1824bc0325f84ea04dab7d6d4f7c887c80b1982)
Reviewed-on: http://git-master/r/488690
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agotegra: dc: dont synchronize irq from irq thread
Bibek Basu [Mon, 4 Aug 2014 07:27:21 +0000 (12:57 +0530)]
tegra: dc: dont synchronize irq from irq thread

Synchronizing IRQ from irq thread context will never return
because the thread will sleep forever.And thats the reason
for DPM timeout and kernel crash when suspend hook also
tries to do so.
[  204.471652] tegradc tegradc.1: **** DPM device timeout ****
[  204.484865] [<c07a58a8>] (__schedule+0x3b4/0x6e0) from [<c00ccf94>] (synchronize_irq+0xac/0xe4)
[  204.501399] [<c00ccf94>] (synchronize_irq+0xac/0xe4) from [<c0341628>] (tegra_dc_suspend+0xcc/0x15c)
[  204.518507] [<c0341628>] (tegra_dc_suspend+0xcc/0x15c) from [<c03da574>] (platform_pm_suspend+0x58/0x64)
[  204.536166] [<c03da574>] (platform_pm_suspend+0x58/0x64) from [<c0032c00>] (tegra_pd_suspend_dev+0x34/0x9c)
[  204.554226] [<c0032c00>] (tegra_pd_suspend_dev+0x34/0x9c) from [<c03e5384>] (pm_genpd_default_suspend+0x24/0x30)
[  204.572942] [<c03e5384>] (pm_genpd_default_suspend+0x24/0x30) from [<c03e5864>] (pm_genpd_suspend+0x58/0xa4)
[  204.591515] [<c03e5864>] (pm_genpd_suspend+0x58/0xa4) from [<c03dfb30>] (dpm_run_callback+0x34/0x54)
[  204.609552] [<c03dfb30>] (dpm_run_callback+0x34/0x54) from [<c03dffe4>] (__device_suspend+0x16c/0x380)

Bug 1486344

Change-Id: Ie512262fdfef90dc199f1f39ebffb540b909f3e2
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/450815
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: track handle's mapped memory
Maneet Singh [Wed, 23 Jul 2014 00:28:04 +0000 (17:28 -0700)]
video: tegra: nvmap: track handle's mapped memory

Added new file "maps" for nvmap heaps. In addition to data given by
existing "allocations" file, this also shows the client's virtual
mappings and total amount of handle physical memory that is actually
mapped to a client's virtual address space.

This change will help in tracking nvmap memory usage of processes.

Bug 1529015

Change-Id: I85b5c221c7a7475cbc3585b130fda6a282756662
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/448503
(cherry picked from commit 1f632679174cea962406980c8201d63c163635ee)
Reviewed-on: http://git-master/r/448580
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
9 years agodma:coherent: manage resizable memory with single device
Krishna Reddy [Fri, 22 Aug 2014 08:55:48 +0000 (01:55 -0700)]
dma:coherent: manage resizable memory with single device

This is necessary to avoid unusable memory between device nodes.

Bug 1517584

Change-Id: I37ac104fa5e512758a4df299424fa0456f368bb6
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/486855
(cherry picked from commit 5c76b9162730826191c71fcf082d3457e5496bc0)
Reviewed-on: http://git-master/r/488266
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agocpufreq: ondemand: Remove redundant return statement
Stratos Karafotis [Thu, 31 Oct 2013 18:27:36 +0000 (20:27 +0200)]
cpufreq: ondemand: Remove redundant return statement

After commit dfa5bb622555 (cpufreq: ondemand: Change the calculation
of target frequency), this return statement is no longer needed.

Bug 1359622

Change-Id: I277187f3e5cbbc205524d678f95a36d65e6c8ff8
Reported-by: Henrik Nilsson <Karl.Henrik.Nilsson@gmail.com>
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 880eef041655b35f9aa488726ea3c4303a4f2204)
Reviewed-on: http://git-master/r/482372
Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agocpufreq: governors: Remove duplicate check of target freq in supported range
Stratos Karafotis [Mon, 26 Aug 2013 18:37:28 +0000 (21:37 +0300)]
cpufreq: governors: Remove duplicate check of target freq in supported range

Function __cpufreq_driver_target() checks if target_freq is within
policy->min and policy->max range. generic_powersave_bias_target() also
checks if target_freq is valid via a cpufreq_frequency_table_target()
call. So, drop the unnecessary duplicate check in *_check_cpu().

Bug 1359622

Change-Id: I2057504a85cc773f98497285cf9e62e5a15c09ea
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 934dac1ea072bd8adff8d6a6abba561731e093cf)
Reviewed-on: http://git-master/r/482371
Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agocpufreq: Clean up header files included in the core
Viresh Kumar [Tue, 6 Aug 2013 17:23:03 +0000 (22:53 +0530)]
cpufreq: Clean up header files included in the core

This patch addresses the following issues in the header files in the
cpufreq core:
 - Include headers in ascending order, so that we don't add same
   many times by mistake.
 - <asm/> must be included after <linux/>, so that they override
   whatever they need to.
 - Remove unnecessary includes.
 - Don't include files already included by cpufreq.h or
   cpufreq_governor.h.

Bug 1359622

[rjw: Changelog]
Change-Id: I3d69d7243b982cd2e32abfdfb9dd750843a07629
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 5ff0a268037d344f86df690ccb994d8bc015d2d9)
Reviewed-on: http://git-master/r/482370
Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agocpufreq: ondemand: Change the calculation of target frequency
Stratos Karafotis [Wed, 5 Jun 2013 16:01:25 +0000 (19:01 +0300)]
cpufreq: ondemand: Change the calculation of target frequency

The ondemand governor calculates load in terms of frequency and
increases it only if load_freq is greater than up_threshold
multiplied by the current or average frequency.  This appears to
produce oscillations of frequency between min and max because,
for example, a relatively small load can easily saturate minimum
frequency and lead the CPU to the max.  Then, it will decrease
back to the min due to small load_freq.

Change the calculation method of load and target frequency on the
basis of the following two observations:

 - Load computation should not depend on the current or average
   measured frequency.  For example, absolute load of 80% at 100MHz
   is not necessarily equivalent to 8% at 1000MHz in the next
   sampling interval.

 - It should be possible to increase the target frequency to any
   value present in the frequency table proportional to the absolute
   load, rather than to the max only, so that:

   Target frequency = C * load

   where we take C = policy->cpuinfo.max_freq / 100.

Tested on Intel i7-3770 CPU @ 3.40GHz and on Quad core 1500MHz Krait.
Phoronix benchmark of Linux Kernel Compilation 3.1 test shows an
increase ~1.5% in performance. cpufreq_stats (time_in_state) shows
that middle frequencies are used more, with this patch.  Highest
and lowest frequencies were used less by ~9%.

[rjw: We have run multiple other tests on kernels with this
 change applied and in the vast majority of cases it turns out
 that the resulting performance improvement also leads to reduced
 consumption of energy.  The change is additionally justified by
 the overall simplification of the code in question.]

Bug 1359622

Change-Id: Ibcbee5afef154c47e3ae45e133f3a0435d2a4fec
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit dfa5bb622555d9da0df21b50f46ebdeef390041b)
Reviewed-on: http://git-master/r/482369
Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoarm: tegra12: initialize pll_a before being used
Bibek Basu [Tue, 12 Aug 2014 09:08:57 +0000 (14:38 +0530)]
arm: tegra12: initialize pll_a before being used

i2s clock tries to lock pll_a during clock init without
initializing pll_a in kernel. Patch fixes that by initializing pll_a

Bug 200027051

Change-Id: Ia4ba705ea1bb57e4d462854c24551ee3d3af4718
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/455472
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agogpu: nvgpu: Never use KEPLER_C sync point increment
Terje Bergstrom [Wed, 20 Aug 2014 12:57:19 +0000 (15:57 +0300)]
gpu: nvgpu: Never use KEPLER_C sync point increment

Bug 1497928

Change-Id: Ic3a2923ae73792e87145b6211e45e5ace3651ddc
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/482492
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Tested-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoarm: tegra13: Jetson-TK1: update check for memtype
Bibek Basu [Wed, 13 Aug 2014 05:34:27 +0000 (11:04 +0530)]
arm: tegra13: Jetson-TK1: update check for memtype

If memtype from boardid eeprom is 1, then only load
emc dvfs for 4GB

Bug 1541809

Change-Id: I82b7b40b738308504cf9c88be0fc02d067d22d21
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/455952
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Mike Thompson <mikthompson@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agomedia: platform: tegra: support 64 bit user code
Charlie Huang [Fri, 11 Jul 2014 23:19:32 +0000 (16:19 -0700)]
media: platform: tegra: support 64 bit user code

Since the user space code may works in either 32 or 64 bit mode,
attentions should be taken while passing pointers from user space to
the kernel. In this case, the p_value of struct nvc_param and
power_on/power_off of struct virtual_device received from the user
space should be handled properly.

The solution is to create a set of 32 bit version of structures
nvc_param and virtual_device along with some dedicated 32 bit mode
ioctl commands, then in the ioctl functions, the 32 bit user mode
access will be handled separately.

bug 1518359

Change-Id: I4cbbeeaef446ab962aaa1f92251ce1fd9d5723aa
Signed-off-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-on: http://git-master/r/437390
(cherry picked from commit 3fdbc210fc9f33d0f89af079a89bdb1f41e73ecb)
Reviewed-on: http://git-master/r/482230
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
9 years agoarm: tegra: soctherm: revert reprogram suppression
Diwakar Tundlam [Wed, 6 Aug 2014 02:14:28 +0000 (19:14 -0700)]
arm: tegra: soctherm: revert reprogram suppression

Suppressing reprogramming HW registers saves very little but can
potentially result in suppressing all HW interrupts from soctherm.

Bug 1536511

Change-Id: I57a78f7955089c60dde89e81ed8d88d9f408f364
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/453269
(cherry picked from commit d4428beada43ba8849eb98ec1e42e13e60fe5c4b)
Reviewed-on: http://git-master/r/456766
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

9 years agofbcon: Converting benign message to debug print
Pankaj Dabade [Thu, 14 Aug 2014 06:50:39 +0000 (12:20 +0530)]
fbcon: Converting benign message to debug print

Making message "Display is GTF capable" as a debug print.

Bug 1541801

Change-Id: Ic926057e2ac4f6fc0b85488f642c5cc0c74bda2b
Signed-off-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-on: http://git-master/r/457056
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agovideo: tegra: nvmap: clean cache during page allocations into page pool
Krishna Reddy [Tue, 5 Aug 2014 21:43:37 +0000 (14:43 -0700)]
video: tegra: nvmap: clean cache during page allocations into page pool

Clean cache during page allocations into page pool to
avoid cache clean overhead at the time of allocation.
Increase page pool refill size to 1MB from 512KB.

Bug 1539190

Change-Id: I046289f5e4b52986f477890663bbc7b2cda76c25
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/453197
(cherry picked from commit 39b0d737566adca113baac1de61f6550634da4ea)
Reviewed-on: http://git-master/r/456780
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: adf: replace nvmap_alloc_dmabuf with v4l2 API
Krishna Reddy [Fri, 1 Aug 2014 21:33:42 +0000 (14:33 -0700)]
video: tegra: adf: replace nvmap_alloc_dmabuf with v4l2 API

Replace deprecated nvmap_alloc_dmabuf with V4L2 videobuf2 contig dma API.

Bug 1540346

Change-Id: I06dd4a64a5a548d29443a0dfb8e4ccdeee62644c
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/450681
(cherry picked from commit 9fa74918f508958b99d0314581683969454f9eb3)
Reviewed-on: http://git-master/r/456779
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: adf: fix incorrect dependency on DMA_SHARED_BUFFER
Krishna Reddy [Mon, 4 Aug 2014 20:42:21 +0000 (13:42 -0700)]
video: adf: fix incorrect dependency on DMA_SHARED_BUFFER

ADF should select DMA_SHARED_BUFFER instead of depending on it.

Bug 1540346

Change-Id: I6e9e83df1e30834d072a86b525f80461e1b13e62
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/451063
(cherry picked from commit 2b9e7d3bda3ad1bd4259d85b533d95ff57ea6c47)
Reviewed-on: http://git-master/r/456778
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agousb: phy: tegra: increase the timeout for phy clk
Preetham Chandru R [Mon, 21 Apr 2014 11:34:12 +0000 (17:04 +0530)]
usb: phy: tegra: increase the timeout for phy clk

Increase the timeout for phy clk to stabilize

Bug 1485579

Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Change-Id: Ic73436dd5b74f327707b0c36ef0323d6decd9c67
Reviewed-on: http://git-master/r/408597
(cherry picked from commit 921b5ba58fc4e9427824d16bd3648055ca11b37c)
Reviewed-on: http://git-master/r/455528
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agousb: gadget: mtp : Handle ioctl MTP_SEND_EVENT_32
Rohith Seelaboyina [Mon, 4 Aug 2014 09:17:56 +0000 (14:47 +0530)]
usb: gadget: mtp : Handle ioctl MTP_SEND_EVENT_32

MTP_SEND_EVENT_32 is defined for 64bit kernel.
This changes properly fixes handling of 32-64 bit
ioctl call for mtp_send_event.

Bug 200016543

Change-Id: Ife559ecb31d10fdfe17d34c8a132cbaf04b09082
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/450869
(cherry picked from commit baf0ecf975bafbe3031b81e3c1899e011c8e0a21)
Reviewed-on: http://git-master/r/454868
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agovideo: tegra: nvmap: track handle's vma list
Maneet Singh [Tue, 22 Jul 2014 23:33:23 +0000 (16:33 -0700)]
video: tegra: nvmap: track handle's vma list

Patch includes following nvmap changes:
 - added "pid" field in nvmap_vma_list so now looking at handle's vma list,
   we can say which vma belongs to which process.
 - sorted handle's vma list in ascending order of handle offsets.

Bug 1529015

Change-Id: Ide548e2d97bab8072461c11c9b8865ab4aa01989
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/448493
(cherry picked from commit 37132fa461d23552b805e32d268acd14b27588c3)
Reviewed-on: http://git-master/r/448576
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: remove carveout commit accounting
Krishna Reddy [Fri, 20 Jun 2014 21:40:52 +0000 (14:40 -0700)]
video: tegra: nvmap: remove carveout commit accounting

Remove obsolete carveout commit accounting.

Bug 1529015

Change-Id: If7e25ca2ef43c036558c9c9ead5f67ee8eef6b42
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/426734
(cherry picked from commit c1ddad1b13332386857f9f2964aa8968094e7e8c)
Reviewed-on: http://git-master/r/448554
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: unify debug stats code
Krishna Reddy [Fri, 20 Jun 2014 21:33:55 +0000 (14:33 -0700)]
video: tegra: nvmap: unify debug stats code

Unify debug stats code for iovmm and carveouts.

Bug 1529015

Change-Id: Ief800587870845ed6f566cb7afb2c91000d177ca
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/426733
(cherry picked from commit 0c0f7e5a9ef459d7940cc66af0a00321bb54d389)
Reviewed-on: http://git-master/r/448536
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: don't count shared memory in full
Krishna Reddy [Thu, 19 Jun 2014 23:10:23 +0000 (16:10 -0700)]
video: tegra: nvmap: don't count shared memory in full

Don't count shared memory in full in iovmm stats.
Add SHARE field to allocations info to show how many
processes are sharing the handle.
Update few comments in the code.
Remove unnecessary iovm_commit accounting.

Bug 1529015

Change-Id: I49650bf081d652dedc7139f639aae6da06965ecd
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/426274
(cherry picked from commit 92d47c10fbf7a315d4c953bafb71ee23032b7f65)
Reviewed-on: http://git-master/r/448533
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: set handle dmabuf to NULL early
Krishna Reddy [Tue, 17 Jun 2014 19:30:16 +0000 (12:30 -0700)]
video: tegra: nvmap: set handle dmabuf to NULL early

This can allow catching handle dmabuf usage during its free.

Bug 1529015

Change-Id: Ie20c7b860ca5194a190ff7005302bf50602d16ed
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/424329
(cherry picked from commit 10e648c2e2f9760c97ce55a1091d9e7097d2504d)
Reviewed-on: http://git-master/r/448530
Tested-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: nvmap: add handle share count to debug stats
Krishna Reddy [Fri, 20 Jun 2014 00:34:01 +0000 (17:34 -0700)]
video: tegra: nvmap: add handle share count to debug stats

handle share count provides info on how many processes are sharing
the handle. IOW, how many processes are holding a ref on handle.
Update the comments for umap/kmap_count.

Bug 1529015

Change-Id: I9f543ebf51842dad6ecd3bfeb7480496c98963be
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/426302
(cherry picked from commit 244c41508be0705cc232942b9403e17611f63e45)
Reviewed-on: http://git-master/r/448521
Tested-by: Maneet Maneet Singh <mmaneetsingh@nvidia.com>
9 years agoARM: tegra: dtb: add DT support for SATA
Preetham Chandru R [Mon, 28 Jul 2014 10:56:52 +0000 (16:26 +0530)]
ARM: tegra: dtb: add DT support for SATA

Bug 200010474

Change-Id: I7c7090c96c9ab5ac5cd3bfd280a3723cfe123ed1
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/441115
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agokernel: make controls access read only
Rahool Paliwal [Thu, 24 Jul 2014 15:54:30 +0000 (21:24 +0530)]
kernel: make controls access read only

This makes controls HDA Decode Capability, HDA Maximum PCM Channels
for HDA and AVP DMA channel id for Tegra Soc read only.

Bug 200023797

Change-Id: I3271470354b02f3d1b3aab8fa3963ad19d281f41
Signed-off-by: Rahool Paliwal <rpaliwal@nvidia.com>
Reviewed-on: http://git-master/r/441855
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
9 years agopcie: tegra: dynamic link speed & clock setting
Bibek Basu [Mon, 7 Jul 2014 10:38:59 +0000 (16:08 +0530)]
pcie: tegra: dynamic link speed & clock setting

Based on the capability of card, we should dynamically
set the mselect, pciex clock and link speed selection.
Clocks will be set to support the highest capable card
This patch:
1. enable the clocks to minimal value during boot
2. Based on card capability, it boosts the clocks
3. And train the link

Bug 1483608

Change-Id: Iaf90f9b06846f8e23e4f60d1670a1db9ec562257
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/437560
(cherry picked from commit ada2f21676de75332ad906fa2386a74f9d58f94a)
Reviewed-on: http://git-master/r/448072
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agogpu: nvgpu: fix error handling for mutex_acquire()
Deepak Nibade [Mon, 28 Jul 2014 12:47:07 +0000 (18:17 +0530)]
gpu: nvgpu: fix error handling for mutex_acquire()

Currently if pmu_mutex_acquire() fails, we disable ELPG
and move ahead. But it is not clear why it is required
to disable ELPG in case where we fail to acquire mutex.

Hence skip disabling ELPG if mutex_acquire() fails

Bug 1533644

Change-Id: I7e8e99a701d0ba071eb31ac17582b04072ee55eb
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/448131
(cherry picked from commit 789c256dd74e2b2b0481e25b2af1b2202ea6f582)
Reviewed-on: http://git-master/r/450268
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoarm: tegra: config: enable bluetooth support
Zheng Liu [Mon, 21 Jul 2014 20:47:44 +0000 (13:47 -0700)]
arm: tegra: config: enable bluetooth support

Enable bluetooth core driver, protocols and HCI BT USB
driver support for t124 and t132.

Bug 200014428

Change-Id: Icd06f0326a75481a93d9805cbec1cfcd28c1131d
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/440501
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agoARM: tegra: dvfs: Don't protect dvfs data in early reasume
Alex Frid [Wed, 16 Jul 2014 01:28:15 +0000 (18:28 -0700)]
ARM: tegra: dvfs: Don't protect dvfs data in early reasume

Don't protect dvfs data with mutex in late suspend/early resume.
DVFS operations are suspended at that time, but during syscore resume
it may be necessary to update DVFS data to changes happened while the
system was in suspend (in praticular memory configuration was changed
by boot-rom on suspend wake).

Change-Id: I8df278dc2e58e5ea1508d187afe0b8f4d8ccbe22
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/438903
(cherry picked from commit 9008a4ad3ee979445b42bc52b8d1619da82badbb)
Reviewed-on: http://git-master/r/440505
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Tested-by: Gaurav Sarode <gsarode@nvidia.com>
9 years agoARM: tegra: clock:Fix Sleeping while atomic in LP0
Gaurav Sarode [Wed, 16 Jul 2014 19:58:40 +0000 (12:58 -0700)]
ARM: tegra: clock:Fix Sleeping while atomic in LP0

After enabling CONFIG_DEBUG_ATOMIC_SLEEP,during LP0 we see warning
regarding sleep in atomic region for clk_enable and clk_disable.
To fix this, we need to use clk_enable_locked and clk_disable_locked
instead.These functions do not acquire locks.

Bug 1534913

Change-Id: I7ca661a8030308107c3467d9d524c79b6ec374e8
Signed-off-by: Gaurav Sarode <gsarode@nvidia.com>
Reviewed-on: http://git-master/r/438904
(cherry picked from commit 908ff199970a093a022f4434afc1689ba979bfed)
Reviewed-on: http://git-master/r/440467
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoarm64: kernel: check mode for get_user in undefinstr
Peng Du [Wed, 23 Jul 2014 18:40:33 +0000 (11:40 -0700)]
arm64: kernel: check mode for get_user in undefinstr

get_user() should be called only for user_mode undef instruction.

Bug 1536343

Change-Id: Ia654783de0cf72abac6847ac9630236f9f0d6ebb
Signed-off-by: Peng Du <pdu@nvidia.com>
Reviewed-on: http://git-master/r/441348
(cherry picked from commit 518317f3e09c794e14de49f1afe47a93f92787ab)
Reviewed-on: http://git-master/r/448179
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
9 years agogpu: nvgpu: return error from mutex_acquire() if pmu not initialized
Deepak Nibade [Thu, 17 Jul 2014 12:39:13 +0000 (18:09 +0530)]
gpu: nvgpu: return error from mutex_acquire() if pmu not initialized

In pmu_mutex_acquire(), we return zero (success) if
pmu->initialized is not set

Since mutex_acquire() was successful, we then call
pmu_mutex_release()

If now pmu->initialized is set in some other thread
then we proceed to validate the mutex owner and
end up causing below warning :

pmu_mutex_release: requester 0x00000000 NOT match owner 0x00000008

Hence to fix this return error from mutex_acquire()
and mutex_release() if pmu->initialized is not yet set
and in that case we proceed to call elpg enable/disable

Bug 1533644
Bug 200017082

Change-Id: Ifbb9e6a8e13f6478a13e3f9d98ced11792cc881f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/439333
(cherry picked from commit 50497d4031103df1067f14ce4c1e14b15713efb9)
Reviewed-on: http://git-master/r/440747
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoARM: tegra: dtb: reduce SD0 voltage
Zheng Liu [Wed, 9 Jul 2014 21:08:24 +0000 (14:08 -0700)]
ARM: tegra: dtb: reduce SD0 voltage

Fix a kernel panic seen on t132ref caused by
find_vdd_map_entry() returning 0.

bug 1522642

Change-Id: Ib132b9feeb85a7b7bacfa7aeceb646aa89d54ece
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/440520
GVS: Gerrit_Virtual_Submit
Tested-by: Mike Thompson <mikthompson@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoarm: tegra: pm375: dtb support for t132 pm375
Zheng Liu [Mon, 16 Jun 2014 22:58:53 +0000 (15:58 -0700)]
arm: tegra: pm375: dtb support for t132 pm375

Add dtb support for t132 pm375.

bug 1522642

Change-Id: If0f769bceaf6edcd8fe5d2fbd067a2ed3a81cca2
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/440519
GVS: Gerrit_Virtual_Submit
Tested-by: Mike Thompson <mikthompson@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agoarm: tegra: pm375: machine support for t132 pm375
Zheng Liu [Mon, 16 Jun 2014 22:46:29 +0000 (15:46 -0700)]
arm: tegra: pm375: machine support for t132 pm375

Add machine support for t132 pm375.

bug 1522642

Change-Id: I842150ecccb722a93b7b80b3c87dcf1ceb13e7b5
Signed-off-by: Zheng Liu <zhliu@nvidia.com>
Reviewed-on: http://git-master/r/440518
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Mike Thompson <mikthompson@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
9 years agovideo: tegra: dc: remove low latency cursor support
Jon Mayo [Tue, 29 Apr 2014 19:47:21 +0000 (12:47 -0700)]
video: tegra: dc: remove low latency cursor support

There is no difference in latency.

Bug 1333484

Change-Id: I8c1acb14d62df51cac535b2b78df0070744a5b66
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/436700
(cherry picked from commit 6eff7bd5a3a858e92c1088c102b21e86e12bf35b)
Reviewed-on: http://git-master/r/439915
Tested-by: Jong Kim <jongk@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: dc: track cursor state
Jon Mayo [Thu, 19 Jun 2014 18:44:54 +0000 (11:44 -0700)]
video: tegra: dc: track cursor state

save and restore cursor state for suspend and resume.

Bug 1486452
Bug 200006001

Change-Id: If5db728a0bca436f0c12ec3de56c4fec9b3d3328
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/436316
(cherry picked from commit bec916df2e450d763a912be37b783450aaf5b862)
Reviewed-on: http://git-master/r/439914
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Jong Kim <jongk@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: dc: move cursor into core driver
Jon Mayo [Wed, 18 Jun 2014 23:01:10 +0000 (16:01 -0700)]
video: tegra: dc: move cursor into core driver

Move cursor routines into the core driver, provide a small abstraction
layer to update the cursor.

Change-Id: Idfa1c6b313806de6a5d34f9f05592574f5829933
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/436315
(cherry picked from commit 14e65ae70661462aa50f424a04a65a7c0efd9ff9)
Reviewed-on: http://git-master/r/439913
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Jong Kim <jongk@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
9 years agovideo: tegra: dc: reset dc in probe
Vineel Kumar Reddy Kovvuri [Tue, 15 Jul 2014 04:08:48 +0000 (09:38 +0530)]
video: tegra: dc: reset dc in probe

Reset dc in probe. This fixes norrin display(edp) not working
in kernel because of inconsistent dc state set by bootloader.

Bug 200013637
Bug 1500654

Change-Id: Ic6bc2c40b6942a4d4d9a98ad2c984896bbb0d9be
Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com>
Reviewed-on: http://git-master/r/437553
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
9 years agosound: tegra: ahub: add clock settings for T124
Bryan Wu [Wed, 16 Apr 2014 22:35:20 +0000 (15:35 -0700)]
sound: tegra: ahub: add clock settings for T124

Several additional audio clocks need to be initialized before
accessing any audio register, otherwise system will just hard hang.

Probably fastboot bootloader initialize these clocks, which actually
should be handled in driver. We found this issue for U-Boot bringup.

Bug 1482099

Change-Id: Ia7a7c0115bc92a4e98e6f337cf8efc7b2f7a72a0
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/408429
(cherry picked from commit 2929886db14e9d2ac0e75b282126397970fbf9c9)
Reviewed-on: http://git-master/r/427929
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Karan Jhavar <kjhavar@nvidia.com>
9 years agoARM: tegra: config: enable performance governor
Preetham Chandru R [Thu, 10 Jul 2014 09:33:51 +0000 (15:03 +0530)]
ARM: tegra: config: enable performance governor

During boot, the CPU governor is getting set
to performance for a faster boot up and hence this
needs to be enabled.

Bug 1532473
Bug 1519610

Change-Id: Idf9ba9d30be1e09d9b9fc4245b96a43a56f2d799
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/436578
(cherry-picked from commit 876a19a97f0d85d270bef970a3815c039b4631fe)
Reviewed-on: http://git-master/r/437978
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agoARM: ardbeg: enable throttle only with compatible machines
Roger Hsieh [Mon, 7 Jul 2014 07:42:39 +0000 (15:42 +0800)]
ARM: ardbeg: enable throttle only with compatible machines

Mostly we enabled different machines in defconfig. The calls in
the board file should ensure it's executing with the compatible
machines, or race condition will be happened.

Bug 1510190

Change-Id: Ia9689fa60c1a6f104a5807bea2b88bd0146249d0
Signed-off-by: Roger Hsieh <rhsieh@nvidia.com>
Reviewed-on: http://git-master/r/435037
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
9 years agomisc: Change info print as debug message
Pankaj Dabade [Mon, 7 Jul 2014 05:52:43 +0000 (11:22 +0530)]
misc: Change info print as debug message

Updating the message severity to debug.

Bug 200007132
Bug 1283757

Change-Id: Ide4a7cc5b205939e561f96e9e6205e082440e515
Signed-off-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-on: http://git-master/r/435015
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agoiio: meter: ina230: power on if current_threshold defined
Roger Hsieh [Fri, 4 Jul 2014 05:29:49 +0000 (13:29 +0800)]
iio: meter: ina230: power on if current_threshold defined

Power it on after initializatin in case current_threshold
is defined in device tree, or power it down.

Bug 200012361

Change-Id: Ic1b463af1812bf47b01ce04dc7714fb7965629e0
Signed-off-by: Roger Hsieh <rhsieh@nvidia.com>
Reviewed-on: http://git-master/r/434620
Reviewed-by: Timo Alho <talho@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
9 years agousb: gadget: tegra: handle the case when host reboots
Rakesh Bodla [Tue, 1 Jul 2014 12:38:36 +0000 (18:08 +0530)]
usb: gadget: tegra: handle the case when host reboots

Some hosts during booting first supply vbus and then
send setup packets after x seconds. In this case we detect
as non-standard. Handle this case by setting to SDP.

Also adding condition to avoid unnecessary icon
notifications.

Bug 200017121

Change-Id: I1f0d9a2e2725a0cd3a4324f5208764ee2e4978cf
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/433179
(cherry picked from commit 1073c32cebc1314e4d3be7967d707a743ded05ea)
Reviewed-on: http://git-master/r/436033
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agousb: phy: tegra: QC2 speed up charger recogniion
Philip Rakity [Wed, 4 Jun 2014 11:37:30 +0000 (12:37 +0100)]
usb: phy: tegra: QC2 speed up charger recogniion

The QC2 Wall Charger needs to be reset only when
we boot or reboot the system.  This is because
the wall charger will have already defaulted to a DCP.
Since the internal logic in the Wall Charger will not
see D+/D- programmed during the time available.

If we just plug in the charger then it will be recognised
in time so no reset is necessary.  Removes 1.5s of delay.

bug 1424733
Reviewed-on: http://git-master/r/433790
(cherry picked from commit b1a51cad99e8ec7e309aa33a786bdc41bc61f6db)
Change-Id: I2b6f698e75f29163e9de4dac3f1b2ef1fb0ec6cc
Signed-off-by: Philip Rakity <prakity@nvidia.com>
Reviewed-on: http://git-master/r/435646
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agodevfreq: Account only powered time in trans_stat
Arto Merilainen [Mon, 7 Jul 2014 12:50:21 +0000 (15:50 +0300)]
devfreq: Account only powered time in trans_stat

This patch modifies devfreq to account only the time a device is
powered in trans_stat. In addition, this patch also fixes a race
in trans_stat maintenance in cases where the node is readed at
the same time the transition table is being updated by frequency
re-estimation.

Change-Id: I6e4341317b6dda88d69028c9f67785400e5a7a65
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/435174
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
Reviewed-by: Samuel Russell <samuelr@nvidia.com>
Tested-by: Samuel Russell <samuelr@nvidia.com>
Reviewed-by: Ilan Aelion <iaelion@nvidia.com>
9 years agotegra: dtb: sysedp: enable sysedp only on P1761 with battery
Timo Alho [Mon, 7 Jul 2014 05:44:56 +0000 (08:44 +0300)]
tegra: dtb: sysedp: enable sysedp only on P1761 with battery

Previously, sysedp was attempted to enabled on non-battery versions of
P1761. This caused sysedp_batmon_calc to fail with -EFAULT during
probing as battery power supply was not available.

Bug 200018196

Change-Id: I0abb9cde8d597febed3e24d0bf3a29386e06db57
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: http://git-master/r/434985
GVS: Gerrit_Virtual_Submit
Reviewed-by: Steve Rogers <srogers@nvidia.com>
Tested-by: Steve Rogers <srogers@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>