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

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

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

Bug 1761317

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

4 years agoinput: touch: raydium: fix touch not working.
Jordan Nien [Tue, 22 Dec 2015 13:42:35 +0000]
input: touch: raydium: fix touch not working.

- Issue: With partner build, there is no input
  disable/enable from frameworks to put touch into
  suspend state during lp0. It lead to touch
  stop working after lp0.
- enable device suspend/resume if input disable/enable
  is not called to fix this issue.

Bug 200162806
Bug 200203946

Change-Id: If09033197cfad8bd431a49cd8db3c5197c1ccbd9
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/925955
(cherry picked from commit 2ba7b886ea927b29e33382272acf9e6ac0a1c925)
Reviewed-on: http://git-master/r/1154213
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

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

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

Bug 1725516

Change-Id: I30f91f48d8a11bb899258a5e51e3f6c551752d0a
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1133280
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoinput: touchscreen: raydium: Keep report mode across suspend/resume.
Jordan Nien [Tue, 26 Apr 2016 02:37:41 +0000]
input: touchscreen: raydium: Keep report mode across suspend/resume.

- Don't set default report mode in init stage
  and let touch daemon to handle it. This is
  to fix the report mode is changed to default
  after suspend/resume.

Bug 1757082

Change-Id: I05685b9420946c0eff6980d58658f5202640fc65
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/1132263
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Pu <dpu@nvidia.com>
Reviewed-by: Vincent Chen <zochen@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agogpu: nvgpu: Clear comptags for whole buffer
Terje Bergstrom [Thu, 18 Feb 2016 19:23:44 +0000]
gpu: nvgpu: Clear comptags for whole buffer

Clear comptags for whole buffer when nvgpu sees the buffer for the
first time.

Change-Id: I67108ce0f0def46ddda1aa9b9bb5ea22549cce13
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1013517
(cherry picked from commit 544446aacdc695dc2e27c42a0086292cd69c2eee)
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1140484
GVS: Gerrit_Virtual_Submit

4 years agogpu: nvgpu: Disable illegal comptag interrupt
Terje Bergstrom [Fri, 11 Mar 2016 15:55:30 +0000]
gpu: nvgpu: Disable illegal comptag interrupt

Illegal comptag interrupt is triggered when a page is mapped with
two different kinds with incompatible compression status. This can
be intentional, so disable the interrupt.

Change-Id: I84a212beac147991d09d2d381a9e770b1364f4d8
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1029663
(cherry picked from commit 819607a768f9fccdd0b233d58bcf88b9eee4ee19)
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1140483
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

4 years agogpu: nvgpu: Enable FB before initializing L2
Terje Bergstrom [Wed, 23 Mar 2016 19:22:49 +0000]
gpu: nvgpu: Enable FB before initializing L2

Deassert reset in L2 and FB before initializing L2. In gk20a L2 can
be off and thus writing registers results in a priv ring failure.

Change-Id: I680b8b1e77cf67a8269c6de59a15d9817301300e
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1140482
GVS: Gerrit_Virtual_Submit

4 years agovideo: tegra: host: fix out-of-bound access in case of overflow
Deepak Nibade [Mon, 25 Apr 2016 12:28:28 +0000]
video: tegra: host: fix out-of-bound access in case of overflow

In nvhost_ioctl_ctrl_module_regrdwr(), we allocate a local buffer
of size (num_offsets * block_size), and use it to store
all the values passed from/to user space

In case erroneous values are passed from user space
(e.g. num_offsets=67108864 and block_size=64), buffer size
passed to kmalloc() overflows and is instead set as 64

And in that case, we end up accessing out-of-bounds values
from local buffer "vals"

To prevent this, allocate buffer "vals" of only one block size
and then copy it from/to user space in loop (i.e. copy the values
for each offset)

Remove variable "p1" and rename variable "remaining" as
"count" as it makes more sense

Add and use new API validate_max_size() to validate size of
register read/write. This API will check if requested read/write
block size is less than the memory resource size of device

kmalloc() might fail for any size > 4KB, hence fall back to
use vmalloc() if kmalloc() fails
Use kvfree() to free buffer allcoated with above

Bug 1739935

Change-Id: I2582e3bf7db6f47293838a4f14c260188f1564f5
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1131916
(cherry picked from commit 58c9472407093c1975b07079b487914371de88ad)
Reviewed-on: http://git-master/r/1141019
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoapbdma: improve position reporting
Sumit Bhattacharya [Thu, 21 Jan 2016 10:51:36 +0000]
apbdma: improve position reporting

Return accurate dma position in device_tx_status()
callback.

Bug 200137565

Change-Id: Ida5b46fb3b33564d0210cf7a52991f64849a0f4a
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-on: http://git-master/r/1113217
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>

4 years agopipe: Fix buffer offset after partially failed read
Ben Hutchings [Sat, 13 Feb 2016 02:34:52 +0000]
pipe: Fix buffer offset after partially failed read

Quoting the RHEL advisory:

> It was found that the fix for CVE-2015-1805 incorrectly kept buffer
> offset and buffer length in sync on a failed atomic read, potentially
> resulting in a pipe buffer state corruption. A local, unprivileged user
> could use this flaw to crash the system or leak kernel memory to user
> space. (CVE-2016-0774, Moderate)

The same flawed fix was applied to stable branches from 2.6.32.y to
3.14.y inclusive, and I was able to reproduce the issue on 3.2.y.
We need to give pipe_iov_copy_to_user() a separate offset variable
and only update the buffer offset if it succeeds.

Bug 1744232
Bug 200188096

Change-Id: I988802f38acf40c7671fa0978880928b02d29b56
References: https://rhn.redhat.com/errata/RHSA-2016-0103.html
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit feae3ca2e5e1a8f44aa6290255d3d9709985d0b2)
Reviewed-on: http://git-master/r/1130746
(cherry picked from commit 6d69c98d0c296c328aca1c1501c4d7230f3d578f)
Reviewed-on: http://git-master/r/1133067
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Todd Poynter <tpoynter@nvidia.com>
Reviewed-by: David Dastous St Hilaire <ddastoussthi@nvidia.com>
Tested-by: David Dastous St Hilaire <ddastoussthi@nvidia.com>
(cherry picked from commit cf799042b793d425486c93cad842963c6ea9781c)
Reviewed-on: http://git-master/r/1140379
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agocamera: tegra: Fix security vulnerability issue
Frank Chen [Fri, 25 Mar 2016 05:37:18 +0000]
camera: tegra: Fix security vulnerability issue

Deprecate outdated UPDATE_GPIO function in camera.pcl
driver. This function is not used by any code anymore
and is a security vulnerability since it is trying to
access user mode pointer directly.

Bug 1745102

Change-Id: I4e7e5f9c186f980dcadfe52ec4284102255f19cf
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1115302
(cherry picked from commit 2e5c355c904a19d71456a04c70f3fb4fc7d918b0)
Reviewed-on: http://git-master/r/1139725
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agocamera: tegra: Fix security vulnerability issue
Frank Chen [Mon, 21 Mar 2016 17:40:45 +0000]
camera: tegra: Fix security vulnerability issue

We need to validate power on/off function size passed
in from user mode in order to avoid integer overflow
or out of memory failures.

Bug 1745100

Change-Id: Idddd848f7dc1e864559ad219f9204325128484e5
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1113818
(cherry picked from commit 5c7cb33118d1f966f22d56b156e5be298191838a)
Reviewed-on: http://git-master/r/1139724
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agomm: use mutex only during CMA page replacement
Krishna Reddy [Tue, 19 Apr 2016 20:47:12 +0000]
mm: use mutex only during CMA page replacement

Limit the mutex to CMA page replacement only.
This would avoid unnecessary mutex contentions in
__get_user_pages() call.

Change-Id: Ia8e2e84c2827a8ac1496e6cc95bb8a8d2dcce005
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/1129399
Tested-by: Sumit Bhattacharya <sumitb@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

4 years agort5639: Reduced delay in set bias standby
Asha T [Mon, 14 Mar 2016 09:27:03 +0000]
rt5639: Reduced delay in set bias standby

Helps in reducing cold ouptput latency
to go below 100ms

Bug 200180104

Change-Id: I468afa9b7444e5dfc3128833a0b4c8537163ebf0
Signed-off-by: Asha T <atalambedu@nvidia.com>
Reviewed-on: http://git-master/r/1030772
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
GVS: Gerrit_Virtual_Submit

4 years agoRevert "Revert "bcmdhd_88: add UPDATE_CHANNEL_LIST driver command""
Om Prakash Singh [Mon, 2 May 2016 06:58:27 +0000]
Revert "Revert "bcmdhd_88: add UPDATE_CHANNEL_LIST driver command""

This reverts commit 2250b327aa873de399aef1f6c002a5e4dfad9d64.

Bug 200179093
Bug 200127847

Change-Id: Ia0f8b001d2ceacb5a1e9521527fbe4456245cd5b
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1139539
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoRevert "Revert "bcmdhd: add UPDATE_CHANNEL_LIST driver command""
Om Prakash Singh [Mon, 2 May 2016 06:57:44 +0000]
Revert "Revert "bcmdhd: add UPDATE_CHANNEL_LIST driver command""

This reverts commit be89d21bce8357468babe06df6f7fc21c499b901.

Bug 200179093
Bug 200127847

Change-Id: I2d4c40cf82fb46303fe6ed655876a169406dd13f
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1139538
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agoRevert "video: tegra: Don't allocate double buffered fb"
Pankaj Kumar [Mon, 21 Dec 2015 12:50:09 +0000]
Revert "video: tegra: Don't allocate double buffered fb"

This reverts commit 2bc194cac57ca30ff4c1ffc1d41df32a9e967824.

Bug 200150661

Change-Id: I9283bfe60a1fef29f4604a9b7ffbef7511f44751
Signed-off-by: Pankaj Kumar <pankumar@nvidia.com>
Reviewed-on: http://git-master/r/925527
(cherry picked from commit 14519fc9371255145e82afd49f0dcb9719b9e4d3)
Reviewed-on: http://git-master/r/1123430
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
Reviewed-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Eric Chuang <echuang@nvidia.com>

4 years agogpu: nvgpu: bitmap allocator for comptags
Konsta Holtta [Tue, 1 Dec 2015 09:55:27 +0000]
gpu: nvgpu: bitmap allocator for comptags

Restore comptags to be bitmap-allocated, like they were before we had
the buddy allocator.

The new buddy allocator introduced by
e99aa2485f8992eabe3556f3ebcb57bdc8ad91ff (originally
6ab2e0c49cb79ca68d2f83f1d4610783d2eaa79b) is fine for the big VAs, but
unsuitable for the small compbit store.

This commit reverts partially the combination of the above commit and
also one after it, 86fc7ec9a05999bea8de320840b962db3ee11410, that fixed
a bug which is not present when using a bitmap. With a bitmap allocator,
pruning the extra allocation necessary for user-mapped mode is possible,
so that is also restored.

The original generic bitmap allocator is not restored; instead, a
comptag-only allocator is introduced.

Bug 200145635

Change-Id: I87f3a911826a801124cfd21e44857dfab1c3f378
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/837180
(cherry picked from commit 5a504aeb54f3e89e6561932971158a397157b3f2)
Reviewed-on: http://git-master/r/842798
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
(cherry picked from commit 65f2e3ed5daf6d33f903dac42d08504945b1d5f4)
Reviewed-on: http://git-master/r/1130875
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>

4 years agotegra12_dvfs: implemented find_gpu_fmax_at_vmin
Mubushir Rahman [Thu, 4 Feb 2016 23:04:04 +0000]
tegra12_dvfs: implemented find_gpu_fmax_at_vmin

Bug 1739780

Change-Id: I6022a0ad75aef714dd653476f7acb349f6128553
Signed-off-by: Mubushir Rahman <mubushirr@nvidia.com>
Reviewed-on: http://git-master/r/1008646
Reviewed-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-by: Anders Kugler <akugler@nvidia.com>
Tested-by: Anders Kugler <akugler@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

4 years agoRevert "bcmdhd_88: add UPDATE_CHANNEL_LIST driver command"
Todd Poynter [Fri, 8 Apr 2016 15:03:08 +0000]
Revert "bcmdhd_88: add UPDATE_CHANNEL_LIST driver command"

DNI - just removing from our 67.30+ rel-24-sb-r1 base.  Will pick these up in rel-24-shield-r1.

Bug 200179093
Bug 200127847

This reverts commit 07026105159443408332f12db251c568fe16dc55.

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

4 years agoRevert "bcmdhd: add UPDATE_CHANNEL_LIST driver command"
Todd Poynter [Fri, 8 Apr 2016 15:02:36 +0000]
Revert "bcmdhd: add UPDATE_CHANNEL_LIST driver command"

DNI - just removing from our 67.30+ rel-24-sb-r1 base.  Will pick these up in rel-24-shield-r1.

Bug 200179093
Bug 200127847

This reverts commit e76eebb4e2067c76a57189e57bcc8268e3feaf62.

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

4 years agobcmdhd_88: add UPDATE_CHANNEL_LIST driver command
Om Prakash Singh [Mon, 28 Mar 2016 11:27:06 +0000]
bcmdhd_88: 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: I1df43d56af9f5c2009cd981dd60f2e2166d42198
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/1111538
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

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>