4 years agobcmdhd: add UPDATE_CHANNEL_LIST driver command
Om Prakash Singh [Mon, 28 Mar 2016 11:31:52 +0000]
bcmdhd: add UPDATE_CHANNEL_LIST driver command

add UPDATE_CHANNEL_LIST driver command to force update channel
list to cfg80211 layer.

Bug 200179093
Bug 200127847

Change-Id: Ib53d61dad84605a83628279a3d6981df582a609c
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1111539
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

4 years agoinput: touch: raydium:fix warnings during shutdown
Jordan Nien [Thu, 24 Mar 2016 03:48:33 +0000]
input: touch: raydium:fix warnings during shutdown

skip regulator_disable() if already disabled in
shutdown path.

Bug 200184433

Change-Id: Ic3217687a412f88c450cddd3337c725075fece07
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/1114775
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Pu <dpu@nvidia.com>
Reviewed-by: Eric Chuang <echuang@nvidia.com>

4 years agopipe: iovec: Fix memory corruption when retrying atomic copy as non-atomic
Ben Hutchings [Tue, 16 Jun 2015 21:11:06 +0000]
pipe: iovec: Fix memory corruption when retrying atomic copy as non-atomic

pipe_iov_copy_{from,to}_user() may be tried twice with the same iovec,
the first time atomically and the second time not.  The second attempt
needs to continue from the iovec position, pipe buffer offset and
remaining length where the first attempt failed, but currently the
pipe buffer offset and remaining length are reset.  This will corrupt
the piped data (possibly also leading to an information leak between
processes) and may also corrupt kernel memory.

This was fixed upstream by commits f0d1bec9d58d ("new helper:
copy_page_from_iter()") and 637b58c2887e ("switch pipe_read() to
copy_page_to_iter()"), but those aren't suitable for stable.  This fix
for older kernel versions was made by Seth Jennings for RHEL and I
have extracted it from their update.

CVE-2015-1805

Bug: 27275324
Change-Id: I459adb9076fcd50ff1f1c557089c4e421b036ec4
References: https://bugzilla.redhat.com/show_bug.cgi?id=1202855
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 85c34d007116f8a8aafb173966a605fb03532f45)
Reviewed-on: http://git-master/r/1114639
GVS: Gerrit_Virtual_Submit
Tested-by: Sharath Sarangpur <ssarangpur@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>

4 years agomedia: tegra: nvavp: Fix reloc offset check
Somu Sundaram [Fri, 18 Mar 2016 07:22:59 +0000]
media: tegra: nvavp: Fix reloc offset check

- Check whether command buffer data offset is 32-bit
  aligned
- Check whether relocation offset is 32-bit aligned
  and calculated offset is within command buffer size
- Check whether target offset is 32-bit aligned
  and derived address is within target buffer size

Bug 1741516

Change-Id: Ie5370bc1538c8cf9a702904fb88eb850baeb063d
Signed-off-by: Somu Sundaram <somasundaram@nvidia.com>
Reviewed-on: http://git-master/r/1113199
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Somu Sundaram <somasundarams@nvidia.com>
Reviewed-by: Jaiprkash Khemkaar <jkhemkar@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

4 years agoinput: touch: raydium: update uevent driver path.
Jordan Nien [Wed, 13 Jan 2016 09:04:42 +0000]
input: touch: raydium: update uevent driver path.

- use drvier path from misc node to have a unify
  path for touch.

Bug 200157906

Change-Id: Ie671050e3739a48fcdd97b2e18a5d14055610b8c
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/932135
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Pu <dpu@nvidia.com>
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agomedia: tegra: nvavp: Fix arbitrary kernel write
Somu Sundaram [Tue, 15 Mar 2016 13:01:57 +0000]
media: tegra: nvavp: Fix arbitrary kernel write

Add checks for command buffer offset, relocation
offset in command buffer and target offset for patching
relocation to prevent aritrary kernel write

Bug 1741516

Change-Id: Ia6183ca75f983c0ede23606be9e5d824aa5fa41d
Signed-off-by: Somu Sundaram <somasundaram@nvidia.com>
Reviewed-on: http://git-master/r/1111697
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Somu Sundaram <somasundarams@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

4 years agovideo: tegra: host: check if offset is u32 aligned
Deepak Nibade [Fri, 11 Mar 2016 08:29:20 +0000]
video: tegra: host: check if offset is u32 aligned

In nvhost_ioctl_ctrl_module_regrdwr(), we copy offset
to read/write from user space but we do not have
any check on it

So it is possible for user space to add unaligned
offset and request read/write which would crash the
system

Fix this by explicitly checking alignment of the
offset passed by user space

Bug 1739935

Change-Id: Iea2a07c60500af876b732a0e9d9d08535aa53b5c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1029405
(cherry picked from commit 422baa09a17a6a17f4e572aa5441ca174634de0d)
Reviewed-on: http://git-master/r/1032066
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agovideo: tegra: host: validate error notifier offset
Konsta Holtta [Tue, 8 Mar 2016 11:56:19 +0000]
video: tegra: host: validate error notifier offset

Make sure that the notifier object fits within the supplied buffer.

Bug 1739183

Change-Id: Ifbf46eddea86bedf0236851ea1c3f73e5f820beb
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1026409
(cherry picked from commit 4086d2137e9b51137aa335fa264d924c73dea5fc)
Reviewed-on: http://git-master/r/1030855
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agogpu: nvgpu: validate wait notification offset
Konsta Holtta [Tue, 8 Mar 2016 12:35:21 +0000]
gpu: nvgpu: validate wait notification offset

Make sure that the notification object fits within the supplied buffer.

Bug 1739182

Change-Id: Ifb66f848e3758438f37645be6f534f5b60260214
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1026431
(cherry picked from commit 2484c47f123c717030aa00253446e8756e1a0807)
Reviewed-on: http://git-master/r/1030872
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agomedia: tegra: nvavp: Fix heap overflow
Somasundaram S [Thu, 10 Mar 2016 12:03:11 +0000]
media: tegra: nvavp: Fix heap overflow

Bug 1739930

Increase NVAVP_MAX_RELOCATION_COUNT to max. possible value
and add check to return error if num_relocs in
nvavp_pushbuffer_submit_ioctl exceeds
NVAVP_MAX_RELOCATION_COUNT

Change-Id: Ief36cedd692aa53135fc6a0039b19f18609259dd
Signed-off-by: Somasundaram S <somasundaram@nvidia.com>
Reviewed-on: http://git-master/r/1030894
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Somu Sundaram <somasundarams@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

4 years agogpu: nvgpu: validate error notifier offset
Konsta Holtta [Tue, 8 Mar 2016 11:58:11 +0000]
gpu: nvgpu: validate error notifier offset

Make sure that the notifier object fits within the supplied buffer.

Bug 1739183
Bug 1739932

Change-Id: I713574ce797ffc23cec10b5114f469dbadc68f1e
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1026410
(cherry picked from commit f476b93eb19b962b8760457102448bd533efc54d)
Reviewed-on: http://git-master/r/1030856
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Tested-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agogpu: nvgpu: Protect sync by an own lock
Terje Bergstrom [Wed, 21 Oct 2015 20:14:09 +0000]
gpu: nvgpu: Protect sync by an own lock

Protect creation and deletion of sync by an own mutex. This prevents
deadlock in channel abort when abort is called from submit path.

Bug 200147887

Change-Id: I5d6308b773c1d1a6a89d4590e2e74c74d691f79d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/821127
(cherry picked from commit 4be2cc60de49d22a87986c4122accf3427e94412)
Reviewed-on: http://git-master/r/999489
(cherry picked from commit 39f4d7ad2928768e0f530ef2018233ef20548953)
Reviewed-on: http://git-master/r/1020290
GVS: Gerrit_Virtual_Submit

4 years agosensors: light: Adjust light sensor calibration
Robert Collins [Tue, 2 Feb 2016 23:17:20 +0000]
sensors: light: Adjust light sensor calibration

Calibrate to D35 reference in dark room environment.

Bug 1725551

Change-Id: I0e599e070b70be6abbf3808facda2a5b7b2a85e7
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1001919
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

4 years agoChanging endianness of buffer sent to tsec
Pranami Bhattacharya [Sat, 27 Feb 2016 04:05:33 +0000]
Changing endianness of buffer sent to tsec

This change addresses the stuttering issue when games are played on tablet device in console/mirror mode.
Initially the hwcomposer does an HDCP poll every 5 seconds.
This poll does SRM validation and vprime verification in TSEC.
Now the check is done on kernel side during HDCP authentication.
This avoids calls to TSEC every 5 seconds.
The receiver KSV list is passed to TSEC in the correct endianness order.
The checks are then performed in TSEC.
Bug 200177360

Change-Id: I0121d91c4cb6265ae2689a6aa4ace5247c5381d3
Signed-off-by: Pranami Bhattacharya <pranamib@nvidia.com>
Reviewed-on: http://git-master/r/1021033
Reviewed-by: Mitch Luban <mluban@nvidia.com>

4 years agommc: sdio: avoid suspend/resume claim host wait
Bitan Biswas [Wed, 6 Jan 2016 09:09:56 +0000]
mmc: sdio: avoid suspend/resume claim host wait

Using mmc_try_claim_host call instead of
mmc_claim_host in mmc_sdio_resume to bypass
DPM timeout due to already claimed host.
 - If mmc host is already claimed,
   mmc_sdio_resume is still being executed
   without the mmc_claim_host and
   mmc_release_host calls.

This is a short term change to avoid the
DPM device timeout error.

bug 1710498
bug 200177382

Change-Id: I593c3c285626837cb22a82904a00a93d7477369d
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/929424
(cherry picked from commit 1fd661920965a83a41af8d0c467e8cdab6402347)
Reviewed-on: http://git-master/r/1022001
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agotegra: dc: hdcp: Moving V' verification to kernel
Pranami Bhattacharya [Tue, 9 Feb 2016 00:02:53 +0000]
tegra: dc: hdcp: Moving V' verification to kernel

Bug 1718973

Change-Id: I5e23eb22d6dd0b0440d051ecef339dad5267730a
Signed-off-by: Pranami Bhattacharya <pranamib@nvidia.com>
Reviewed-on: http://git-master/r/1009723
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sharath Sarangpur <ssarangpur@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

4 years agoiio: imu: nvi: v.305 fix coverity
Erik Lilliebjerg [Sun, 21 Feb 2016 04:29:24 +0000]
iio: imu: nvi: v.305 fix coverity

- Fix negative index in debug print.
- Fix DMP IRQ wake for significant motion.
- Fix auxiliary batch period initialization.

Coverity ID: 20452

Bug 1416640
Bug 200116059
Bug 200154126

Change-Id: If288c5676bc52dbb707b097b2ebdc07ff44febc2
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1014976
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>

4 years agoiio: magnetometer: fix hal NULL ptr
Erik Lilliebjerg [Tue, 9 Feb 2016 15:01:39 +0000]
iio: magnetometer: fix hal NULL ptr

- Fix HAL NULL pointer by setting default HAL pointer even when device isn't
  found.

Bug 1727708

Change-Id: I368744922c5b1750118c1375a36ec0479e97ccde
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1010125
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>

4 years agoiio: common: NVS light module v.103
Erik Lilliebjerg [Thu, 4 Feb 2016 10:28:50 +0000]
iio: common: NVS light module v.103

- Add ability to change dynamic resolution table index limits at runtime.
- Add ability to have individual thresholds per entry in the dynamic resolution
  table and the ability to change these thresholds at runtime as well as in the
  device tree.
- Add ability to have absolute HW value thresholds per entry in the dynamic
  resolution table that determines when to switch to the next table entry.  And
  these can be changed at runtime as well as be set in the device tree.
- Add the ability, as a WAR, to cap the maximum lux value.
- Fix dynamic resolution lux calculation.
- Fix threshold high calculation.
- Add above new features to cm3217 and cm3218x drivers.
- Add forced ARA to cm3218x driver as WAR for POR random registers.

Bug 1725551
Bug 200171152

Change-Id: Ide9fa9b3748338b8858d576b795bd77a9c136e54
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1008983
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>

4 years agoARM: config: tegra124: disable Marvell wifi driver
Michael Hsu [Thu, 11 Feb 2016 01:17:38 +0000]
ARM: config: tegra124: disable Marvell wifi driver

Disable unused wifi driver.

Bug 1725516

Change-Id: Ifac354c2ed927abd1830eb1c8cde5365fa5565f1
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/1010671
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Tested-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agoARM: t124: disable wlan default gpio
Laxman Dewangan [Wed, 10 Feb 2016 06:37:27 +0000]
ARM: t124: disable wlan default gpio

As wlan is disabled, disable the required node
to set gpio on default state for wlan.

bug 1725516

Change-Id: I44cba3475e12d6ae7c3ed0cad9d645d65806e7b5
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1010300
GVS: Gerrit_Virtual_Submit

4 years agoRevert "arch: arm: tegra: Fix wifi power up"
Rajath Shetty [Thu, 11 Feb 2016 01:29:09 +0000]
Revert "arch: arm: tegra: Fix wifi power up"

This reverts commit a1ca17ab038c0387c70ab0a3b29def6e1316cb1a.

Bug 1725516
Signed-off-by: Rajath Shetty <rshetty@nvidia.com>
Change-Id: Ia1e0eaddeefef2c1ade3b126027da637d53f203f
Reviewed-on: http://git-master/r/1010676
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Tested-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agoRevert "net: wireless: bcmdhd_88: wait for power rails to stabilize"
Rajath Shetty [Thu, 11 Feb 2016 01:28:12 +0000]
Revert "net: wireless: bcmdhd_88: wait for power rails to stabilize"

This reverts commit ca9e076fca1efe7d984806814972b36d5fcb9a50.

Bug 1725516
Signed-off-by: Rajath Shetty <rshetty@nvidia.com>
Change-Id: Ia4a37358761f54708f660041925e92b592254bf8
Reviewed-on: http://git-master/r/1010675
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Tested-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agoRevert "net: wireless: bcmdhd_88: increase wifi turn off delay"
Rajath Shetty [Thu, 11 Feb 2016 01:26:57 +0000]
Revert "net: wireless: bcmdhd_88: increase wifi turn off delay"

This reverts commit 8e4babedaa7462424e36cfa51eda8bf49fe952ce.
Bug 1725516

Signed-off-by: Rajath Shetty <rshetty@nvidia.com>
Change-Id: I60f1a327d70faf15029e721c27d3808948206f31
Reviewed-on: http://git-master/r/1010674
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Tested-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agoarch: arm: tegra: Fix wifi power up
Michael Hsu [Wed, 3 Feb 2016 08:14:08 +0000]
arch: arm: tegra: Fix wifi power up

Sometimes wifi chip get in bad hardware state.
Pulse the wifi chip power gpio to put it in known state.

Bug 1725516

Change-Id: I5891f8772690bd9249962314e70a8ee68c818c58
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/1002853
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Tested-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agonet: wireless: bcmdhd_88: wait for power rails to stabilize
Michael Hsu [Sat, 6 Feb 2016 04:08:43 +0000]
net: wireless: bcmdhd_88: wait for power rails to stabilize

Wait for power rails to stabilize before prepowering wifi chip,
otherwise wifi chip might prepower into a bad nonresponsive state.

Bug 1725516

Change-Id: I8821bcab0ec91b17f06ed731fc8c00577747aa79
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/1009164
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Tested-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agonet: wireless: bcmdhd_88: increase wifi turn off delay
Michael Hsu [Tue, 9 Feb 2016 01:04:37 +0000]
net: wireless: bcmdhd_88: increase wifi turn off delay

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

Bug 1725516

Change-Id: I3bed35092b9710128aae2a08bbeaae6c459f4be8
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/1009753
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Tested-by: Gaurav Singh <gauravsingh@nvidia.com>

4 years agoiio: imu: NVI v.304 DMP implementation
Erik Lilliebjerg [Mon, 1 Feb 2016 17:00:22 +0000]
iio: imu: NVI v.304 DMP implementation

- MPU6515:
  - Implement DMP.
  - Add Significant Motion sensor.
  - Add Quaternion sensor (fixes gravity)
  - Move compass to DMP driven for improved rate accuracy.
- ICM:
  - Fix auxiliary timing.
  - Add separate timing per sensor.
  - Add auxiliary data (compass) to its own FIFO.
  - Add separate FIFOs per ICM sensor.
- Both:
  - Improve suspend/resume time.

Bug 200162691
Bug 200159288
Bug 200130656
Bug 1699137

Change-Id: Icc9bcac30d19fd575969445350223914bfb9cb46
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1000952
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>

4 years agopm: allow building without suspend support
Antti P Miettinen [Fri, 22 Jan 2016 13:59:36 +0000]
pm: allow building without suspend support

Bug 1723199

Change-Id: I3daa33a11d813a680fd3319c0223ec5bdb394b00
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Reviewed-on: http://git-master/r/937393
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>

4 years agodts: cm3217: reduce event report delay time
wahsu [Fri, 29 Jan 2016 03:12:03 +0000]
dts: cm3217: reduce event report delay time

End user want display backlight change more quickly when environment changed.
For the highest resolution sampling in cm3217, it takes 3 seconds to sample the
event. Reduce the resolution to sample the data around 0.8 seconds.

bug 200163121

Change-Id: I77a4c8bb8a8fc52beaabf889905fe4c75dcc1fce
Signed-off-by: wahsu <wahsu@nvidia.com>
Reviewed-on: http://git-master/r/999751
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agovideo: tegra: host: Update serialize flags
Arto Merilainen [Fri, 15 Jan 2016 10:41:37 +0000]
video: tegra: host: Update serialize flags

Currently some of the units using RESOURCE_PER_CHANNEL_INSTANCE
policy do not have .serialize flag set. As a result our recovery
cannot identify which channel is using the engine at the point
when failure occurs.

This patch enables serialization to ensure that the modules get
reset properly after failure.

Bug 1717101

Change-Id: Iee1a6c8919bb6a3c6bff3b3e2b613b62d030b16d
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/933140
(cherry picked from commit fec1e971b6307c46a443934f51b3e98627ba5cf1)
Reviewed-on: http://git-master/r/936834
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoUPSTREAM: KEYS: Fix keyring ref leak in join_session_keyring()
Yevgeny Pats [Tue, 19 Jan 2016 22:09:04 +0000]
UPSTREAM: KEYS: Fix keyring ref leak in join_session_keyring()

(cherry pick from commit 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2)

This fixes CVE-2016-0728.

If a thread is asked to join as a session keyring the keyring that's already
set as its session, we leak a keyring reference.

This can be tested with the following program:

#include <stddef.h>
#include <stdio.h>
#include <sys/types.h>
#include <keyutils.h>

int main(int argc, const char *argv[])
{
int i = 0;
key_serial_t serial;

serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
"leaked-keyring");
if (serial < 0) {
perror("keyctl");
return -1;
}

if (keyctl(KEYCTL_SETPERM, serial,
   KEY_POS_ALL | KEY_USR_ALL) < 0) {
perror("keyctl");
return -1;
}

for (i = 0; i < 100; i++) {
serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
"leaked-keyring");
if (serial < 0) {
perror("keyctl");
return -1;
}
}

return 0;
}

If, after the program has run, there something like the following line in
/proc/keys:

3f3d898f I--Q---   100 perm 3f3f0000     0     0 keyring   leaked-keyring: empty

with a usage count of 100 * the number of times the program has been run,
then the kernel is malfunctioning.  If leaked-keyring has zero usages or
has been garbage collected, then the problem is fixed.

Bug 1720836

Reported-by: Yevgeny Pats <yevgeny@perception-point.io>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Change-Id: I10177a58a7b3178eda95017557edaa7298594d06
(cherry picked from commit 9fc5f368bb89b65b591c4f800dfbcc7432e49de5)
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Reviewed-on: http://git-master/r/935543
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ishan Mittal <imittal@nvidia.com>
Reviewed-on: http://git-master/r/936092
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agovideo: tegra: hdmi: add fallback audio config
Prafull Suryawanshi [Tue, 12 Jan 2016 07:02:25 +0000]
video: tegra: hdmi: add fallback audio config

bug 1703528

For some freq, there pclk is not present in
audio tables. This change adds fallback logic and
calculates cts value for audio related information.
This further used for programming audio regs.

Change-Id: Ia0c6e50ade854f93be958554c7906ef2a3df8a72
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/931526
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
(cherry picked from commit 50822f31e997d45f6b703d1c88a7733df259880a)
Reviewed-on: http://git-master/r/935721
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agobcmdhd_88: do not use IN->US country code mapping
Om Prakash Singh [Wed, 20 Jan 2016 10:32:42 +0000]
bcmdhd_88: do not use IN->US country code mapping

need to handle IN->US country code mapping based on build type.
remove IN->US country code mapping from translate_custom_table
and handle it in wpa_supplicant_lib

Bug 200167668

Change-Id: I0eaa33f8285093426a1284c240a51b5fbddc5260
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/934458
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoiio: light: CM3218x: Enable auto-detect light sensor.
Robert Collins [Wed, 13 Jan 2016 21:07:03 +0000]
iio: light: CM3218x: Enable auto-detect light sensor.

* When light sensor is selected as cm32181, it is hard-coded
  to assume it exists.  No auto-detection is performed.
  This causes a continuous stream of NACKs when the sensor
  module is removed.
* Enable auto-detect with cm3218x.  This should force the
  probe function to auto-detect the part and not install
  if it doesn't exist.  This should prevent the NACKs in
  the case of the sensor module not present.

Bug 1719118

Signed-off-by: Robert Collins <rcollins@nvidia.com>
Change-Id: Ie6c3e296336f8d0b2620a867adca32a3a462cbaf
Reviewed-on: http://git-master/r/932342
(cherry picked from commit 557bb2335ccf13f9cecf60bd382554b11d3ac54e)
Reviewed-on: http://git-master/r/933316

4 years agogpu: nvgpu: Control comptagline assignment from kernel
Terje Bergstrom [Thu, 17 Dec 2015 18:12:21 +0000]
gpu: nvgpu: Control comptagline assignment from kernel

On Maxwell comptaglines are assigned per 128k, but preferred big page
size for graphics is 64k. Bit 16 of GPU VA is used for determining
which half of comptagline is used.

This creates problems if user space wants to map a page multiple times
and to arbitrary GPU VA. In one mapping the page might be mapped to
lower half of 128k comptagline, and in another mapping the page might
be mapped to upper half.

Turn on mode where MSB of comptagline in PTE is used instead of bit 16
for determining the comptagline lower/upper half selection.

Bug 1704834

Change-Id: If87e8f6ac0fc9c5624e80fa1ba2ceeb02781355b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/924373
(cherry picked from commit e05803201fd2097e7185dac4554b9237965e5bc8)
Reviewed-on: http://git-master/r/933336
GVS: Gerrit_Virtual_Submit

4 years agogpu: nvgpu: Add comptag offset to part mappings
Terje Bergstrom [Tue, 24 Nov 2015 23:17:40 +0000]
gpu: nvgpu: Add comptag offset to part mappings

Add offset to comptags when mapping partial buffers.

Bug 1704834

Change-Id: I3405b465bb1373bcc79eb5ecbd93dd1b866abfb4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/922045
(cherry picked from commit 19b6e48ce0536b6716fd4e680bacefff0efec383)
Reviewed-on: http://git-master/r/933335
GVS: Gerrit_Virtual_Submit

4 years agonet: wireless: bcmdhd_88: Fix Android Bug 25306181
Michael Hsu [Sat, 9 Jan 2016 00:16:08 +0000]
net: wireless: bcmdhd_88: Fix Android Bug 25306181

Original patch source: https://android.googlesource.com/kernel/msm

Original patch commit message:
> commit 3fffc78f70dc101add8b82af878d53457713d005
> Author: Patrick Tjin <pattjin@google.com>
> Date:   Wed Dec 9 15:24:05 2015 -0800
>
>     net: wireless: bcmdhd: check packet length for event messages
>
>     Check the datalen field is less than the size of
>     packet received from the network.
>
>     Bug: 25306181
>
>     Signed-off-by: Patrick Tjin <pattjin@google.com>
>     Change-Id: I3b021d88a95bd7d4e6e0d745d2527d73487bcadc
>     (cherry picked from commit 10b850b7e82873a14068d24dac4fc2080d46ff76)

Bug 1716690

Change-Id: Ib7c75be9f8c3b8cb7b94690abb8e983a9b9145e5
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Reviewed-on: http://git-master/r/931624
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Tested-by: Om Prakash Singh <omp@nvidia.com>

4 years agonet: wireless: bcmdhd_88: Fix Android Bug 25662233
Michael Hsu [Fri, 8 Jan 2016 23:16:47 +0000]
net: wireless: bcmdhd_88: Fix Android Bug 25662233

Apply slightly modified version of the following patch.  (Original
patch did not handle 0 length WPS_ID_DEVICE_NAME correctly, so it was
modified to fix 0 length condition.)

Original patch source: https://android.googlesource.com/kernel/msm

Original patch commit message:
> commit 68cdc8df1cb6622980b791ce03e99c255c9888af
> Author: dataanddreams <dataanddreams@gmail.com>
> Date:   Mon Nov 30 17:08:54 2015 -0500
>
>     bcmdhd: Add checks for stack buffer overflows
>
>     These two checks prevent exploitable buffer overflows in two scenarios.
>     1. Long WPS_ID_DEVICE_NAME in WPS info elements
>     2. Invalid SSID determined in certain scan results
>
>     Bug: 25662233
>     Change-Id: Ifb2887737aa6218079745f27d59b5f1364b3892e

Bug 1716690

Change-Id: Ib7e549a6ce2a12be96e2a683762affa594e83056
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/930678
Reviewed-on: http://git-master/r/931623
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Tested-by: Om Prakash Singh <omp@nvidia.com>

4 years agowatchdog: tegra: add pm_notifier function for tegra watchdog
Ian Chang [Thu, 14 Jan 2016 03:21:54 +0000]
watchdog: tegra: add pm_notifier function for tegra watchdog

End user report the following crash

 [407991.176369] PM: suspend exit 2016-01-02 05:43:00.059263422 UTC
 [407991.176575] android_work: did not send uevent (0 0   (null))
 [407991.276753] PM: suspend entry 2016-01-02 05:43:00.159654256 UTC
 [407991.276894] PM: Syncing filesystems ... done.
 [407991.304120] tegra_wdt_reset_enable: WDT Recovery Enabled
 [407991.306339] Tegra cpufreq suspend: setting frequency to 204000 kHz
 [407991.307949] tegra_dvfs: suspended
 [407991.308007] tegra_soctherm: suspended
 [407991.308052] Freezing user space processes ... (elapsed 0.028
 seconds) done.
 [407991.336660] Freezing remaining freezable tasks ...
 [408011.327176]Dump for CPU0:
 [408011.327307] pid: 0  comm: swapper/0
 [408011.330851]  r0 c0fc5ee0  r1 00000000  r2 00000000  r3 00001154
 [408011.336831]  r4 00001154  r5 000021ba  r6 89f18374  r7 000021ba
 [408011.342811]  r8 c365f810  r9 00000000 r10 00000000 r11 c365d3ec

Here is the corner case we found.

-> Wathdogd feed wdt driver.
    (wait 10 seconds)
-> Kernel start to suspend
-> Wathdogd try to feed again but it is stopped by kernel
-> Kernel freeze remaining tasks with 20 sec
-> FIQ is triggered with 30 seconds expiration!

To fix this corner case, we add pm_notifier callback function
of PM_USERSPACE_FROZEN stage to feed watcdog again.

bug 200165740

Change-Id: I5399e8920559ea6544dec03c227683ff946c01c3
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/932485
Reviewed-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit

4 years agovideo: tegra: hdmi: add new pclk to audio config
Vaibhav Shinde [Mon, 11 Jan 2016 09:47:39 +0000]
video: tegra: hdmi: add new pclk to audio config

Bug 1717920

It is found that with few monitors, the pclk calculation
changes. Inside audio config table, these values not
present. So adding support from them.

Change-Id: I8ef00d94b1f0a9a4712fb33edc2af7fc67e387b9
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-on: http://git-master/r/930995
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agonet: wireless: bcmdhd: Fix Android Bug 25306181
Michael Hsu [Sat, 9 Jan 2016 00:16:08 +0000]
net: wireless: bcmdhd: Fix Android Bug 25306181

Original patch source: https://android.googlesource.com/kernel/msm

Original patch commit message:
> commit 3fffc78f70dc101add8b82af878d53457713d005
> Author: Patrick Tjin <pattjin@google.com>
> Date:   Wed Dec 9 15:24:05 2015 -0800
>
>     net: wireless: bcmdhd: check packet length for event messages
>
>     Check the datalen field is less than the size of
>     packet received from the network.
>
>     Bug: 25306181
>
>     Signed-off-by: Patrick Tjin <pattjin@google.com>
>     Change-Id: I3b021d88a95bd7d4e6e0d745d2527d73487bcadc
>     (cherry picked from commit 10b850b7e82873a14068d24dac4fc2080d46ff76)

Bug 1716690

Change-Id: Ic83eb29fe95ad0c1b50bdd8bcc39982575671e2d
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/930698
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agonet: wireless: bcmdhd: Fix Android Bug 25662233
Michael Hsu [Fri, 8 Jan 2016 23:16:47 +0000]
net: wireless: bcmdhd: Fix Android Bug 25662233

Apply slightly modified version of the following patch.  (Original
patch did not handle 0 length WPS_ID_DEVICE_NAME correctly, so it was
modified to fix 0 length condition.)

Original patch source: https://android.googlesource.com/kernel/msm

Original patch commit message:
> commit 68cdc8df1cb6622980b791ce03e99c255c9888af
> Author: dataanddreams <dataanddreams@gmail.com>
> Date:   Mon Nov 30 17:08:54 2015 -0500
>
>     bcmdhd: Add checks for stack buffer overflows
>
>     These two checks prevent exploitable buffer overflows in two scenarios.
>     1. Long WPS_ID_DEVICE_NAME in WPS info elements
>     2. Invalid SSID determined in certain scan results
>
>     Bug: 25662233
>     Change-Id: Ifb2887737aa6218079745f27d59b5f1364b3892e

Bug 1716690

Change-Id: Ib6bedd8c20185d38a16fb144b6b8ab4393de038f
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/930678
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agocpuquiet: do not allow CPU0 offline
Ian Chang [Wed, 30 Dec 2015 12:48:59 +0000]
cpuquiet: do not allow CPU0 offline

CPU0 should be always online. This change make sure
all of govenors would not set CPU0 offline.

bug 200151158

Change-Id: I1ae45b503a3be83ba0cec14c154eee9c691d3933
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/930054
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Eric Chuang <echuang@nvidia.com>

4 years agoARM: tegra: sdhci: disable dtb support for wifi
Om Prakash Singh [Thu, 7 Jan 2016 09:24:52 +0000]
ARM: tegra: sdhci: disable dtb support for wifi

Bug 1716041

Change-Id: I91010d9fdf3f97a6b25a083187d14a113eb26a80
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/928644
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

4 years agoarm: dts: t124: disable dtb support for wifi
Om Prakash Singh [Thu, 7 Jan 2016 09:22:46 +0000]
arm: dts: t124: disable dtb support for wifi

Bug 1716041

Change-Id: I7003d5d32d3d88e26e2df367bfa56c95b9a5ea87
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/929938
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

4 years agoShrink ashmem directly through shmem_fallocate
Tobias Lindskog [Mon, 9 Feb 2015 07:10:39 +0000]
Shrink ashmem directly through shmem_fallocate

When ashmem_shrink is called from direct reclaim on a user thread, a
call to do_fallocate will check for permissions against the security
policy of that user thread.  It can thus fail by chance if called on a
thread that isn't permitted to modify the relevant ashmem areas.

Because we know that we have a shmem file underneath, call the shmem
implementation of fallocate directly instead of going through the
user-space interface for fallocate.

FIX=DMS06243560
Area: Kernel/Linux Kernel

Bug: 21951515
Bug 1715409
Bug 1715411

Change-Id: Ie98fff18a2bdeb535cd24d4fbdd13677e12681a7
Signed-off-by: Jeff Vander Stoep <jeffv@google.com>
(cherry picked from commit 2ecc7f173a30ee7df10240d6944108252a5f5b7d)
Reviewed-on: http://git-master/r/928549
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit be4c76ce3892e0c44865b2651bf692cdf46ffa7c)
Signed-off-by: Pankaj Kumar <pankumar@nvidia.com>
Reviewed-on: http://git-master/r/929563
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoRevert "input: touchscreen: raydium: add v67.3 for ST8."
Jordan Nien [Wed, 6 Jan 2016 10:15:19 +0000]
Revert "input: touchscreen: raydium: add v67.3 for ST8."

This reverts commit a8038c5982f539134bc3f4fe615bfabf80de3735.

Change-Id: I66054bc8dfbbd1d9d763b95efacb0accec9e5245
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/929453
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoRevert "ARM: config: tegra12: enable raydium v67.3 driver for ST8."
Jordan Nien [Wed, 6 Jan 2016 10:14:48 +0000]
Revert "ARM: config: tegra12: enable raydium v67.3 driver for ST8."

This reverts commit 519204aa5595fa6478b797eb322d76b75cb50f18.

Change-Id: I2b6a5a7af9e131dceec875e48c065330cbc4f97c
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/929452
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoregulator: palmas: use late_shutdown instead of shutdown
Venkat Reddy Talla [Mon, 4 Jan 2016 15:53:41 +0000]
regulator: palmas: use late_shutdown instead of shutdown

Using late_shutdown to shutdown palmas regulator driver after
other regulator client driver shutdown called in order to shutdown
regulator client drivers with out regulator fail errors.

Bug 200159457

Change-Id: I35f15d7fa3089ca450666f672c34f7e07dffcfc5
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/928899
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoiio: common: nvs: Fix one-shot batch
Erik Lilliebjerg [Mon, 4 Jan 2016 03:36:19 +0000]
iio: common: nvs: Fix one-shot batch

- Remove batch attributes from one-shot sensors.
- Add ability to call core functions with NULL parameters, basically just
  moving the validity checks to common code.

Bug 200130656

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

4 years agomisc: palmas: reduce system voltage monitor frequency
Somdutta Roy [Sat, 2 Jan 2016 23:54:02 +0000]
misc: palmas: reduce system voltage monitor frequency

palmas_ldousb_in_sel_work periodically checks the system
voltage every 100 ms, increasing this to 1 second to
increase cpu idle time

Bug 1716167

Change-Id: I16a901272e5fb6b086698fa8f971467bc14767db
Signed-off-by: Somdutta Roy <somduttar@nvidia.com>
Reviewed-on: http://git-master/r/929331
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoARM: config: tegra12: enable raydium v67.3 driver for ST8.
Jordan Nien [Thu, 17 Dec 2015 15:37:51 +0000]
ARM: config: tegra12: enable raydium v67.3 driver for ST8.

Bug 200162862

Change-Id: Id612a956d558e66f4398cfead38a0737a7e4aef8
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/924274
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoinput: touchscreen: raydium: add v67.3 for ST8.
Jordan Nien [Thu, 17 Dec 2015 15:30:50 +0000]
input: touchscreen: raydium: add v67.3 for ST8.

- Copy raydium touch driver from rel-st8-l-shieldtablet8
- MakeFile and Kconfig change for Build

Bug 200162862

Change-Id: I94ff460b5ab2cb62229706b98efe7a7ce66da6d3
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/924273
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Pu <dpu@nvidia.com>
Reviewed-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoarm: tn8: change cpu suspend frequency
Ian Chang [Thu, 22 Oct 2015 02:19:25 +0000]
arm: tn8: change cpu suspend frequency

change cpu suspend frequency from 204000khz
to 1044000khz.

bug 200160071

Change-Id: I5979c2388aaa9678f6522951aa669f8850286dc4
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/921673
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoarm: tegra: sync pmc registers
Vaibhav Shinde [Tue, 11 Aug 2015 09:02:19 +0000]
arm: tegra: sync pmc registers

Read of PMC_SCRATCH38 between the write and the DSB

Bug 1597008

Change-Id: I8869da696c55d9acb652f514a32b3c5ba8528bff
Signed-off-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-on: http://git-master/r/781653
(cherry picked from commit 82a42161652010cc10e876704bd961d3d923da01)
Reviewed-on: http://git-master/r/922893
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoRevert "platform: tegra: Ensure driver init prior to use"
eddichang [Thu, 24 Dec 2015 06:58:11 +0000]
Revert "platform: tegra: Ensure driver init prior to use"

This reverts commit 890e7fb164fcfa4c22eee7fc7216b2aa67008fa9.

Change-Id: I0e89b6a211f90c21b4d9c7b45da36fd58a1469af
Signed-off-by: eddichang <eddichang@nvidia.com>
Reviewed-on: http://git-master/r/926719
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoARM: config: t124: change WiFi firmware and nvram path
Om Prakash Singh [Tue, 22 Dec 2015 15:25:49 +0000]
ARM: config: t124: change WiFi firmware and nvram path

change firmware and nvram file path as Android-L release

Bug 1714345
Change-Id: I6c91c009e6f5e8d1c4264899913f6a87691877ad
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/925966
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kasturi Raghavender <kraghavender@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoplatform: tegra: Ensure driver init prior to use
Sai Gurrappadi [Wed, 9 Dec 2015 17:49:19 +0000]
platform: tegra: Ensure driver init prior to use

The cpufreq platform driver has to finish initialization before it can
call into cpufreq core. To that end, use a flag to indicate when the
driver has finished initializing. This new flag is then used to bail
out of any calls that happen prior to driver init.

Bug 200159525

Change-Id: I32e26830f09a720a58b5c43de969b639dd33f020
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/921882
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Vaibhav Shinde <vashinde@nvidia.com>
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agopower: extcon-xlate: logging cable names for debug
Venkat Reddy Talla [Thu, 12 Mar 2015 08:47:18 +0000]
power: extcon-xlate: logging cable names for debug

Add debug prints to log cable names to debug scenarios where
cable is inserted but extcon xlate driver fail to detect cable
type, set last cable in state to 0 when all the connected cables
detached from device.

Bug 1571110

Change-Id: I436c1e52f351e53788bc67b6feedf439bc3d2ee7
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/716730
(cherry picked from commit 78d8733fb37a559ae4414e6b23f7103b0dd43a3e)
Reviewed-on: http://git-master/r/839248
(cherry picked from commit b3637a09de5ef260fdd0771863615d22d4e69efb)
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/921375
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoRevert "Revert "net: wireless: bcmdhd / bcmdhd_88: initialize scan policy work""
Dhiren Parmar [Mon, 14 Dec 2015 12:04:53 +0000]
Revert "Revert "net: wireless: bcmdhd / bcmdhd_88: initialize scan policy work""

This reverts commit 4ef47e154697d2226668d9c81d0f64b150a3aac6.

Change-Id: Id20b898e63a48e9a7ebd78245c009319941e76fa
Signed-off-by: Dhiren Parmar <dparmar@nvidia.com>
Reviewed-on: http://git-master/r/922502

4 years agoRevert "net: wireless: bcmdhd / bcmdhd_88: initialize scan policy work"
Dhiren Parmar [Sun, 13 Dec 2015 04:45:59 +0000]
Revert "net: wireless: bcmdhd / bcmdhd_88: initialize scan policy work"

This reverts commit 875046d523b3db710f3a70c2c0875b60c35c6d4e.

Change-Id: I2359593f03b27b8a96ee58a0ddcecffe5d077ed0
Signed-off-by: Dhiren Parmar <dparmar@nvidia.com>
Reviewed-on: http://git-master/r/922256

4 years agonet: wireless: bcmdhd / bcmdhd_88: initialize scan policy work
Michael Hsu [Tue, 8 Dec 2015 03:24:32 +0000]
net: wireless: bcmdhd / bcmdhd_88: initialize scan policy work

When wifi is turned on, initialize scan policy work(s) in case
prior shutdown did not clean up properly.

bcmdhd_88 driver requires extra TEGRA_SCAN_DONE() macro calls
because it does not use a common scan cleanup function like
the bcmdhd driver.

Bug 200159210

Change-Id: Ia1d5fb93f75bed8c03f2e5d825952d1c6af4a2d6
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: http://git-master/r/921577
Tested-by: Nagaraj Annaiah <nannaiah@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agodrivers: video: tegra: Fix HDMI_EXT VIC
Aly Hirani [Thu, 10 Dec 2015 20:31:50 +0000]
drivers: video: tegra: Fix HDMI_EXT VIC

Strip out all the flags, except for interlaced

Change-Id: I6e416fe5e53bc667874f93b1fac100392d995eea
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/921703
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agovideo: tegra: dc: correct typo to parse property
Prafull Suryawanshi [Wed, 9 Dec 2015 09:21:13 +0000]
video: tegra: dc: correct typo to parse property

It was typo mistake to add ! in front of of_find_property()
which caused boardinfo as null caused issue in dsi pad register
write. This change fixes it and now boardinfo read correct.

bug 1708374

Change-Id: I1a92089ddccc1eb2c365dd7d20dda8f0eccb2b71
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/843440
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

4 years agovideo: tegra: hdmi: fix cea vic code search
Ivan Raul Guadarrama [Tue, 8 Dec 2015 13:08:54 +0000]
video: tegra: hdmi: fix cea vic code search

Remove custom flags from the vmode field to allow
the correct comparison against embedded list.

Bug 200157629

Change-Id: I7ac2a97cbd259bc792122f723825a0ef1b697ff1
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-on: http://git-master/r/842959
GVS: Gerrit_Virtual_Submit
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
Reviewed-by: Tuomas Kulve <tkulve@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoiio: proximity: SAR v.21
Erik Lilliebjerg [Wed, 2 Dec 2015 01:07:13 +0000]
iio: proximity: SAR v.21

- Add device tree byte streams for external state low and high.
  When an external entity writes a status state to the SAR driver's external
  function sar_external_status, the corresponding DT byte stream is executed
  depending on the value written (0 or 1).
- Update documentation that explains this.

Bug 200137195

Change-Id: Ie1e3dd606f764d9cafa1b6bc170f46e86206a5f6
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/840111
(cherry picked from commit 2f647cb0af8352d63ae24a5ad7d5b86a28df94d9)
Reviewed-on: http://git-master/r/842600
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>

4 years agobcmdhd: set correct bw for p2p connection
Bibhay Ranjan [Thu, 3 Dec 2015 13:04:19 +0000]
bcmdhd: set correct bw for p2p connection

if the bw sent from the upper layers does
not match with the bw of the AP connection,
p2p connection happens on MCC always. With
this fix, the bw of the p2p connection is
set as AP's bw.

Bug 1694567

Change-Id: I5f9c73bc51e360e2b3e5e7cf6443d1de4434a136
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/842877
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agopagemap: do not leak physical addresses to non-privileged userspace
Kirill A. Shutemov [Mon, 7 Dec 2015 23:24:08 +0000]
pagemap: do not leak physical addresses to non-privileged userspace

[ Upstream commit ab676b7d6fbf4b294bf198fb27ade5b0e865c7ce ]

As pointed by recent post[1] on exploiting DRAM physical imperfection,
/proc/PID/pagemap exposes sensitive information which can be used to do
attacks.

This disallows anybody without CAP_SYS_ADMIN to read the pagemap.

[1] http://googleprojectzero.blogspot.com/2015/03/exploiting-dram-rowhammer-bug-to-gain.html

[ Eventually we might want to do anything more finegrained, but for now
  this is the simple model.   - Linus ]

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mark Seaborn <mseaborn@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Change-Id: I85acefa5c77fcd26d4fde436c37870d41bb8062e
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/842827
Reviewed-by: Eric Chuang <echuang@nvidia.com>
Tested-by: Eric Chuang <echuang@nvidia.com>

4 years agonvi: udpate period time when aux device is enabled
wahsu [Mon, 7 Dec 2015 11:31:57 +0000]
nvi: udpate period time when aux device is enabled

bug 200158162

Change-Id: Ie684d6da30ac26ebb54488e25163f3852343267c
Signed-off-by: wahsu <wahsu@nvidia.com>
Reviewed-on: http://git-master/r/842270
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>

4 years agogpu: nvgpu: create sync_fence only if needed
Deepak Nibade [Wed, 7 Oct 2015 10:50:07 +0000]
gpu: nvgpu: create sync_fence only if needed

Currently, we create sync_fence (from nvhost_sync_create_fence())
for every submit
But not all submits request for a sync_fence.

Also, nvhost_sync_create_fence() API takes about 1/3rd of the total
submit path.

Hence to optimize, we can allocate sync_fence
only when user explicitly asks for it using
(NVGPU_SUBMIT_GPFIFO_FLAGS_FENCE_GET &&
NVGPU_SUBMIT_GPFIFO_FLAGS_SYNC_FENCE)

Also, in CDE path from gk20a_prepare_compressible_read(),
we reuse existing fence stored in "state" and that can
result into not returning sync_fence_fd when user asked
for it
Hence, force allocation of sync_fence when job submission
comes from CDE path

Bug 200141116

Change-Id: Ia921701bf0e2432d6b8a5e8b7d91160e7f52db1e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/841584
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoirqchip: tegra: set FIQ shadows offset
Ian Chang [Wed, 25 Nov 2015 08:41:16 +0000]
irqchip: tegra: set FIQ shadows offset

Set FIQ shadows offset to fix kernel
warnning.

bug 200117915

Change-Id: I3c27df9183d46f6ff8c4a3cc784089b34f6035c8
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/837727
(cherry picked from commit 51745686d15a2273c1920f464021c0e91e2a3cb1)
Reviewed-on: http://git-master/r/841400
Reviewed-by: Robert Shih <rshih@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

4 years agogpu: nvgpu: move check_gp_put() and update_gp_get() to worker
Deepak Nibade [Mon, 30 Nov 2015 10:39:48 +0000]
gpu: nvgpu: move check_gp_put() and update_gp_get() to worker

We currently call check_gp_put() and update_gp_get()
in submit path and this takes about 5uS for both checks
check_gp_put() - 3.5 uS
update_gp_get() - 1.5 uS

But this book keeping can be moved to gk20a_channel_update()
to save some submit time

Note that check_gp_put() needs to be done inside submit
lock

Bug 200141116

Change-Id: I276400111be0421eb673695e2f2899ff52e344b4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/839232
(cherry picked from commit 289617e8bf01bde9aab45dfa3a1c6a1241e6eb78)
Reviewed-on: http://git-master/r/841583
Tested-by: Nikhil Joshi <nikhilj@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agogpu: nvgpu: rework private command buffer free path
Deepak Nibade [Wed, 4 Nov 2015 08:36:37 +0000]
gpu: nvgpu: rework private command buffer free path

We currently allocate private command buffers (wait_cmd
and incr_cmd) before submitting the job but we never
free them explicitly.
When private command queue of the channel is full, we
then try to recycle/remove free command buffers.
But this recycling happens during submit path, and
hence that particular submit path takes much longer

Rework this as below :
- add reference of command buffers to job structure
- when job completes, free the command buffers
  explicitly
- remove the code to recycle buffers since it should
  not be needed now

Note that command buffers need to be freed in order of
their allocation. Ensure this with error print before
freeing the command buffer entry

Bug 200141116
Bug 1698667

Change-Id: Id4b69429d7ad966307e0d122a71ad55076684307
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/827638
(cherry picked from commit c6cefd69b71c9b70d6df5343b13dfcfb3fa99598)
Reviewed-on: http://git-master/r/835818
Reviewed-on: http://git-master/r/841452
Tested-by: Nikhil Joshi <nikhilj@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agogpu: nvgpu: support skipping buffer refcounting in submit
Deepak Nibade [Thu, 29 Oct 2015 09:50:50 +0000]
gpu: nvgpu: support skipping buffer refcounting in submit

In job submission path, we always take refcount on all
the mapped buffers to safeguard against case where user
space releases the buffer early

But in case user space itself is doing proper buffer
management, kernel need not take refcounts on all the
buffers - which is also a overhead in submit path

Hence, provide a new submit flag
NVGPU_SUBMIT_GPFIFO_FLAGS_SKIP_BUFFER_REFCOUNTING to
optionally skip taking refcounts on all the buffers

Also, if we do not take refcounts, then no need to drop
any refcounts in gk20a_channel_update() as well

Bug 1698667
Bug 200141116

Change-Id: I81bb7a03240300b691c70bcec04ea1badd5934f4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/824718
(cherry picked from commit 8c8978fa303ec4e6db0233becdbdcbad4a248173)
Reviewed-on: http://git-master/r/833327
Reviewed-on: http://git-master/r/841451
Tested-by: Nikhil Joshi <nikhilj@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agogpu: nvgpu: set aggressive_sync_destroy at runtime
Deepak Nibade [Fri, 23 Oct 2015 10:11:21 +0000]
gpu: nvgpu: set aggressive_sync_destroy at runtime

We currently set "aggressive_destroy" flag to destroy
sync object statically and for each sync object

Move this flag to per-platform structure so that it
can be set per-platform for all the sync objects

Also, set the default value of this flag as "false"
and set it to "true" once we have more than 64
channels in use

Bug 200141116

Change-Id: I1bc271df4f468a4087a06a27c7289ee0ec3ef29c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/822041
(cherry picked from commit 98741e7e88066648f4f14490c76b61dbff745103)
Reviewed-on: http://git-master/r/835817
Reviewed-on: http://git-master/r/841450
Tested-by: Nikhil Joshi <nikhilj@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agogpu: nvgpu: remove temporary gpfifo allocation in submit path
Deepak Nibade [Mon, 26 Oct 2015 13:17:55 +0000]
gpu: nvgpu: remove temporary gpfifo allocation in submit path

In GPU job submit path gk20a_ioctl_channel_submit_gpfifo(),
we currently allocate a temporary gpfifo, copy user space
gpfifo content into this temporary buffer, and then copy
temp buffer content into channel's gpfifo.

Allocation/copy/free of temporary buffer adds additional
overhead

Rewrite this sequence such that gk20a_submit_channel_gpfifo()
can receive either a pre-filled gpfifo or pointer to
user provided args.
And then we can direclty copy the user provided gpfifo
into the channel's gpfifo

Also, if command buffer tracing is enabled, we still need
to copy user provided gpfifo into temporaty buffer for reading
But that should not cause overhead in real world use case

Bug 200141116

Change-Id: I7166c9271da2694059da9853ab8839e98457b941
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/823386
(cherry picked from commit 3e0702db006c262dd8737a567b8e06f7ff005e2c)
Reviewed-on: http://git-master/r/835816
Reviewed-on: http://git-master/r/841449
Tested-by: Nikhil Joshi <nikhilj@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agothermal: soctherm: use zone_enable for DT case
Santosh Katvate [Wed, 2 Dec 2015 09:45:34 +0000]
thermal: soctherm: use zone_enable for DT case

therm->tz is populated only in non-DT case.
So Use zone_enable to decide if thermal zone is disabled in DT case.

Bug 200157257

Change-Id: I5fd679fe7c4aad76231c82bd8cc7d94c3971cff4
Signed-off-by: Santosh Katvate <skatvate@nvidia.com>
Reviewed-on: http://git-master/r/841581
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agodma:tegra: avoid int overflow for transferred cnt
Christopher Freeman [Tue, 6 May 2014 20:13:58 +0000]
dma:tegra: avoid int overflow for transferred cnt

bytes_transferred will overflow during long audio playbacks.  Since the
driver only ever consults this value modulo bytes_requested, store the value
modulo bytes_requested to prevent overflow.

BUG=chrome-os-partner:28376
TEST=Video/audio playback for >4 hours

Bug 200157067

Change-Id: I67ec972a6abcda0944728592c6c6ff319ea2486b
Reviewed-on: https://chromium-review.googlesource.com/198540
(cherry picked from commit a7ca1e2b0d1bbfa8ea480ac30fee73b85039881e)
Signed-off-by: Christopher Freeman <cfreeman@nvidia.com>
Signed-off-by: Diwakar Paliwal <dpaliwal@nvidia.com>
Reviewed-on: http://git-master/r/841405
Reviewed-by: Niranjan Wartikar <nwartikar@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoARM: tegra: hawkeye:added touch_clk_sel gpio
David Pu [Fri, 20 Nov 2015 19:54:33 +0000]
ARM: tegra: hawkeye:added touch_clk_sel gpio

added touch_clk_sel gpio which need to be explictly pull low/high
to select touch clock(external or internal clock)

Bug 1706267

Change-Id: I1b70bdddbc362a7a2eb2dd42d5c3087cc3fbf2f3
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/836030
(cherry picked from commit 95ee5c90c15565bb55e57ceadb5229ca49fed339)
Reviewed-on: http://git-master/r/840230
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>

4 years agoinput: touch: sharp:add touch_clk_sel control.
David Pu [Fri, 20 Nov 2015 19:57:00 +0000]
input: touch: sharp:add touch_clk_sel control.

touch_clk_sel GPIO need to be configured correctly no matter active
stylus feature is enabled or not.

Bug 1706267

Change-Id: I5381a60b4e86e1562804eed08bb7165b58eb6921
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/836029
(cherry picked from commit 778a4f14fb4980b2a17f59375a34ca9124a0a787)
Reviewed-on: http://git-master/r/840229
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agoRevert "Revert "input: touch: sharp: turn off TOUCH_CLK by default.""
David Pu [Mon, 23 Nov 2015 06:29:28 +0000]
Revert "Revert "input: touch: sharp: turn off TOUCH_CLK by default.""

This reverts commit aea857137f1733436bde5f4b0a9a6b0552e16adc.

Bug 1706267

Change-Id: I1628c717030cdc05fdc235f4aaf22591c1966108
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/836392
(cherry picked from commit e7e977f3bdc9c0d06e73fda8d07447221ddffc36)
Reviewed-on: http://git-master/r/840228
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agoinput: touch: sharp:fix unbalanced irq disable.
David Pu [Tue, 17 Nov 2015 23:12:34 +0000]
input: touch: sharp:fix unbalanced irq disable.

it is not multi-process safe when accessing touch driver sysfs
/sys/class/misc/touch/wakeup_enable and
/sys/class/input/input0/enabled at same time.
it leads to wakeup_enable flag inconsistent state during changing
waekup_enable and enabled node at sametime. In such case disable_irq
would be called twice and it will never comes back to balanced
state(changing between irq depth between -1 and 0 instead of 0 and 1).

This change keeps irq always enabled after touch input is enabled.
Also move enable/disable irq wake to system suspend/resume routine to
keep it always balanced.

Bug 1709007
Bug 1702947

Change-Id: I732909ebffc139cce6ed92b2388284dbf817c7e2
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/834216
(cherry picked from commit 6b85505fba68ceaf061fcc7a951e16d19339c00e)
Reviewed-on: http://git-master/r/837259
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

4 years agoneigh: Better handling of transition to NUD_PROBE state
Erik Kline [Wed, 2 Dec 2015 10:01:20 +0000]
neigh: Better handling of transition to NUD_PROBE state

[1] When entering NUD_PROBE state via neigh_update(), perhaps received
from userspace, correctly (re)initialize the probes count to zero.

This is useful for forcing revalidation of a neighbor (for example
if the host is attempting to do DNA [IPv4 4436, IPv6 6059]).

[2] Notify listeners when a neighbor goes into NUD_PROBE state.

By sending notifications on entry to NUD_PROBE state listeners get
more timely warnings of imminent connectivity issues.

The current notifications on entry to NUD_STALE have somewhat
limited usefulness: NUD_STALE is a perfectly normal state, as is
NUD_DELAY, whereas notifications on entry to NUD_FAILURE come after
a neighbor reachability problem has been confirmed (typically after
three probes).

Bug 200154120

Change-Id: I3ee05ab3489173824d38a4b3790bcf0840e0dc40
Signed-off-by: Erik Kline <ek@google.com>
Acked-By: Lorenzo Colitti <lorenzo@google.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: kraghavender <kraghavender@nvidia.com>
Reviewed-on: http://git-master/r/840347
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Om Prakash Singh <omp@nvidia.com>
Tested-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agodrivers: video: tegra: Add 1000/1001 for HDMI_EXT
Aly Hirani [Mon, 30 Nov 2015 02:37:15 +0000]
drivers: video: tegra: Add 1000/1001 for HDMI_EXT

Previous changed limited 1000/1001 modes to only CEA SVD. A problem
raised by this was with the modes that were read from the HDMI EXT
blocks. They supported 1000/1001 as well.

This change marks the HDMI EXT modes as such and modifies the 1000/1001
code to consider these modes too.

Bug 200156983

Change-Id: I0c774fb75efac6f51b51f75b1badeeb47e90b66c
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/839054
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

4 years agoST8: DTS: disable ltr proxmity device
wahsu [Sun, 29 Nov 2015 06:03:24 +0000]
ST8: DTS: disable ltr proxmity device

Proximity is not used in data only and wifi sku on ST8 device.

Bug 200148651

Change-Id: I01f2d5f960ccdf1dacbb92fe802426a9839fd1dd
Signed-off-by: wahsu <wahsu@nvidia.com>
Reviewed-on: http://git-master/r/839015
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Eric Chuang <echuang@nvidia.com>

4 years agoarm: dt: p1761: Correct name-format of a DT entry
Petlozu Pravareshwar [Mon, 23 Nov 2015 12:20:41 +0000]
arm: dt: p1761: Correct name-format of a DT entry

Correct name-format of a ehci DT entry.

Bug 200153623

Change-Id: Ie1ef144a4aeca2a2999a389a99d22380f870dc02
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: http://git-master/r/837741
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

4 years agousb: phy: Correct usb device speed information
Petlozu Pravareshwar [Mon, 23 Nov 2015 12:17:46 +0000]
usb: phy: Correct usb device speed information

When turn_off_vbus_on_lp0 is set, we disconnect
VBUS before going to LP0 and re-enable it after
LP0 wakeup.

Present code assumes device speed info after LP0
is same as before LP0 which is not true if there
is a swapping of devices when system is in LP0.
Hence set speed as UNKNOWN in such condition.

Bug 200153623

change-Id: I129b88ecc8ad743a0a65341dcb0a7b6001f24ff8
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: http://git-master/r/837740
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

4 years agovideo: tegra: dc: update VIC identification
Naveen Kumar S [Thu, 26 Nov 2015 09:55:39 +0000]
video: tegra: dc: update VIC identification

Adding few more checks to help VIC identification.
Comparing 1001/1000 value of pixclock to take care of
pclk rounding-off issue. Also, comparing mode->flag value
helps in choosing the CEA mode with matching aspect ratio.

bug 200148145
bug 200145631
bug 1689283

Change-Id: Ia80ba4dd3337772b24b74ee355a1032d59b31d9d
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/838452
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
GVS: Gerrit_Virtual_Submit

4 years agodrivers: video: tegra: dc: Fix VIC for a few modes
Naveen Kumar S [Fri, 20 Nov 2015 14:15:10 +0000]
drivers: video: tegra: dc: Fix VIC for a few modes

This change fixes the VIC not being set correctly on a few modes. For
1000/1001 modes, the pixclock is now reverted back to the mode
corresponding to the CEA modedb before it is compared.

Since the refresh in the mode database is also not trustable, it
compares the modes from the CEA modedb with a +/- 1 offset

Bug 200148145
Bug 200145631
Bug 1689283

Change-Id: I3742b4d090c26d6c1fc3e2f4af44fd1389079d1a
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/837681
Reviewed-by: Tao Xie <txie@nvidia.com>
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
Tested-by: Manish Tuteja <mtuteja@nvidia.com>

4 years agodrivers: video: tegra: Mark 1000/1001 for SVD only
Aly Hirani [Mon, 23 Nov 2015 20:16:50 +0000]
drivers: video: tegra: Mark 1000/1001 for SVD only

As per the CEA spec, only the modes coming from the CEA SVD are capable
of the dual frame rate (that is 60 Hz also supporting 59.94, etc). This
uses the previous change to look at modes that are marked as CEA and
creates a 1000/1001 mode only for those.

bug 1689283

Change-Id: Iba55d8f7ca9b06af7baa3f9e12822130f0f3337c
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
(cherry picked from commit 427bd89b96c96ca3450693f69f71500acaa22d95)
Reviewed-on: http://git-master/r/836961
Reviewed-by: Soumenkumar Dey <sdey@nvidia.com>
Tested-by: Soumenkumar Dey <sdey@nvidia.com>
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>

4 years agovideo: fbmon: identify cea vic modes
Ivan Raul Guadarrama [Wed, 18 Nov 2015 18:19:49 +0000]
video: fbmon: identify cea vic modes

Add the FB_VMODE_IS_DETAILED flag to identify detailed modes.
Add the FB_VMODE_IS_CEA flag and correctly identify
detailed timings which are also valid CEA modes.

Bug 1691633
bug 1689283

Change-Id: I04a1b6e6c6c725fb8d1e467994f071b9855f56a0
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
(cherry picked from commit ddce3ef0a203b490c5b471b7d379254534c2ceac)
Reviewed-on: http://git-master/r/836952
Reviewed-by: Soumenkumar Dey <sdey@nvidia.com>
Tested-by: Soumenkumar Dey <sdey@nvidia.com>
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>

4 years agostaging: ozwpan: Make oz_pd_stop atomic
Spencer Sutterlin [Tue, 17 Nov 2015 02:50:02 +0000]
staging: ozwpan: Make oz_pd_stop atomic

Change responsibility of holding g_polling_lock to caller of
oz_services_stop()

Bug 200151967

Change-Id: I3a1d5d12d1c03153a62555c3ccd4121e90671afa
Signed-off-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Reviewed-on: http://git-master/r/833613
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit 7d3b6be98e84526eef2d731e544d58f1d6f309dd)
Reviewed-on: http://git-master/r/837862
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoTEMP: stop_machine: serialize disable IRQ sequence
Prafull Suryawanshi [Mon, 2 Nov 2015 09:09:02 +0000]
TEMP: stop_machine: serialize disable IRQ sequence

bug 200044022

On T124 platforms, we hit a hang on cpu_down(cpu=3) where
CPU3 gets stuck waiting on the gic irq_controller_lock in
gic_eoi_irq. The other CPUs have already entered the
DISABLE_IRQ stop machine state at this point.
This therefore causes the watchdog to timeout and the
system to reset. Given that we have the stopper thread
scheduled (preemption disabled), the 'hang scenario' most
likely manifests itself due to some sort of issue in
the irq context. Sequentially entering the DISABLE_IRQ
state from CPU3->CPU0 seem to somehow prevent this hang.

This change is only meant to be a temporary workaround
to improve system stability and is by no means a fix
of any sort. To that end, it is wrapped in a CONFIG
option that is turned off by default.

Change-Id: Ic50ecd5a6d429706e4f68bcd133707fae4e692ce
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/836921
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agovideo: tegra: dc: moved KSV reads before V'
Sharath Sarangpur [Mon, 23 Nov 2015 23:04:41 +0000]
video: tegra: dc: moved KSV reads before V'

Moved KSV reads before reading V'

bug 200144160

Change-Id: If74570c2e37e6d9df5aada1a055d104ebe65449e
Signed-off-by: Sharath Sarangpur <ssarangpur@nvidia.com>
Reviewed-on: http://git-master/r/837486
Reviewed-by: Mitch Luban <mluban@nvidia.com>

4 years agoRevert "arm64: t210: change post soc core time"
Todd Poynter [Mon, 16 Nov 2015 20:07:20 +0000]
Revert "arm64: t210: change post soc core time"

Bug 1675404
Bug 200154032

This reverts commit 82282fddfd05de8181a43764617e35674d1b5ed1.

Change-Id: I1c8cda9ea6e1e18458e1cf856534ac0e621f0061
Signed-off-by: Todd Poynter <tpoynter@nvidia.com>
Reviewed-on: http://git-master/r/837208
Reviewed-by: Automatic_Commit_Validation_User

4 years agoRevert "ARM64: tegra210: hawkeye: set FPS timing to 5120us"
Todd Poynter [Mon, 16 Nov 2015 20:06:53 +0000]
Revert "ARM64: tegra210: hawkeye: set FPS timing to 5120us"

Bug 1675404
Bug 200154032

This reverts commit b852d0d200d6f44b707b353bf92bd57c54aa2f8e.

Change-Id: I5b02f7c97cb69241fd42f7ef4fde7c1019f3cf31
Signed-off-by: Todd Poynter <tpoynter@nvidia.com>
Reviewed-on: http://git-master/r/837207

4 years agoRevert "input: touch: sharp: turn off TOUCH_CLK by default."
David Pu [Fri, 20 Nov 2015 19:49:21 +0000]
Revert "input: touch: sharp: turn off TOUCH_CLK by default."

This reverts commit 11208e8d20f890ddf72bf81e8f609e26019c83e2.

it causes bug 1706267. reverting it.
original Bug 1704518

Change-Id: I96dc461b265ea2cc56ae483fb5448e9d16e4d199
Signed-off-by: David Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/836025
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agoarm: tegra12: Enable hid/Jarvis support
Rene Houle [Thu, 29 Oct 2015 01:22:29 +0000]
arm: tegra12: Enable hid/Jarvis support

Bug 1695822

Change-Id: I553dcaf025c69039e0f215066f435f256c1fa972

Signed-off-by: Rene Houle <rhoule@nvidia.com>
Change-Id: If38241713db95202cfda086177d8e56c59bfd8dd
Reviewed-on: http://git-master/r/824432
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

4 years agoarch: arm: boot: dts: remove cy8c for Darcy
Martin Gao [Thu, 19 Nov 2015 03:00:16 +0000]
arch: arm: boot: dts: remove cy8c for Darcy

- Darcy uses pwm based led, and therefore no long needs this.

Change-Id: I3c2d10922da6dbe55c4ee98213b5066abbc885a1
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/834937
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Daniel Fu <danifu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>