2 years agodvfs: tegra: Validate CLDVFS register address tegra-l4t-r24.2
Alex Frid [Thu, 30 Jun 2016 01:21:46 +0000]
dvfs: tegra: Validate CLDVFS register address

Bug 1783583

Change-Id: I8b0e865db02c00f741dafb473d4bd39c5075f23f
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/1201538
(cherry picked from commit 453a77c5cd9a1316307458203365f9eb5bda62de)
Reviewed-on: http://git-master/r/1201706
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>

2 years agogpu: nvgpu: gk20a: Use spin_lock for jobs_lock
Bharat Nihalani [Tue, 9 Aug 2016 13:00:12 +0000]
gpu: nvgpu: gk20a: Use spin_lock for jobs_lock

This is done to boost performance of the GPU submit time, which
is critical for compute use-cases.

Bug 200215465

Change-Id: Ic4884ee4eac910b92b84a47fdc1b2e9f26b2f1f0
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1199860
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1201496
GVS: Gerrit_Virtual_Submit

2 years agogpu: nvgpu: initialize local variable
Deepak Nibade [Thu, 4 Aug 2016 14:12:38 +0000]
gpu: nvgpu: initialize local variable

Initialize character array buf in gk20a_channel_ioctl() to zero
Keeping it uninitialized can result in leaking kernel stack
info to user space since we pass this buffer to UMD

Bug 1793398

Change-Id: Iffd654dbaca3b4e3c8fd2ac270d0febd01c165b8
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1195862
(cherry picked from commit 118809f4bd07af20df2b6c012828834695a5fccf)
Reviewed-on: http://git-master/r/1201487
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agommc: sdhci: Support polling mode.
Anubhav Jain [Wed, 3 Aug 2016 09:37:43 +0000]
mmc: sdhci: Support polling mode.

-Added support to parse the broken-cd property
using sdhci_tegra_dt_parse_pdata function.

-Removed the mmc_of_parse function call from probe,
which was added as a part of Bug 1765751

Bug 200224838

Change-Id: I30a875ecb0b0802e40215893d12bbebdb6797733
Signed-off-by: Anubhav Jain <anubhavj@nvidia.com>
Reviewed-on: http://git-master/r/1196753
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agodts: add new l4t dtb for liimx185 base jetson-tx1
esen chen [Fri, 5 Aug 2016 04:53:26 +0000]
dts: add new l4t dtb for liimx185 base jetson-tx1

New dtb for jetson-tx1-liimx185 l4t
 tegra210-jetson-cv-camera-li-mipi-adpt-a01-devkit.dtb

Bug 1793358

Change-Id: Id91e728f4718b34d44577258678af5b15eae3628
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1197957
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agoserial: tegra: correct error handling sequence to avoid system hang
Shardar Shariff Md [Tue, 2 Aug 2016 13:35:26 +0000]
serial: tegra: correct error handling sequence to avoid system hang

- Correct the error handling sequence to avoid FIFO errors
i.e handle break error first followed by other errors as
handling break error will clear other errors
- Handle break error by fifo flush as per IAS
- serial: tegra: keep rx irq disabled if there are spurious
errors and then tty buffer is exhausted and re-enable the
interrupts after 500msec.

Bug 1785924

Change-Id: I68c8322e0ff6808ebd0d38141853f88900b912b2
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/1195970
(cherry picked from commit 16317988c222e831346902e28bfce5375bea3df2)
Reviewed-on: http://git-master/r/1198554
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agodrivers: camera: Fix power on function calls
Frank Chen [Tue, 2 Aug 2016 22:09:01 +0000]
drivers: camera: Fix power on function calls

Since sensor and forcuser has the same V4L2 group id,
when device s_power callback is called, the power_on
function of sensor and foucser will both be called,
even though only one of them needs to be powered on.

Switched to subdev s_power call to power on either
sensor or focuser, instead of both of them.

Bug 1792264

Change-Id: Iacae6ab92ec931cced28073589e82109b037a840
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1196342
(cherry picked from commit d67aaad60ae73c78950a403c86851ac7f81aef61)
Reviewed-on: http://git-master/r/1197577
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Tested-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>

2 years agoRevert "Revert "Revert "ARM64: tegra210: move Host1x to separate asid"""
Rajkumar Kasirajan [Wed, 3 Aug 2016 08:09:49 +0000]
Revert "Revert "Revert "ARM64: tegra210: move Host1x to separate asid"""

This reverts commit 514b257108d4f9f87c444ee8e4755d3a6a5de224.

Moving host1x to separate address space makes bpmp unstable during
lp0 suspend and resume.

Bug 200223606

Change-Id: Ia028e505d0ad1b5190b0a60fa13d026d9571dde7
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
(cherry picked from commit b3420f478296ecd1ee21553cec869b80a66e7b45)
Reviewed-on: http://git-master/r/1196637
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

2 years agoFix error code to correct pointer type
Joe Korty [Wed, 25 May 2016 12:10:46 +0000]
Fix error code to correct pointer type

To return an errno code inside a pointer,
the error code must first be converted to
the correct pointer type.

drivers/media/v4l2-core/v4l2-of.c:
In function 'v4l2_of_alloc_parse_endpoint':
drivers/media/v4l2-core/v4l2-of.c:227:10: warning:
return makes pointer from integer without
a cast [-Wint-conversion]
return -ENOMEM;

drivers/media/v4l2-core/v4l2-of.c:254:9: warning:
return makes pointer from integer without
a cast [-Wint-conversion]
return rval;

Bug 200187768

Change-Id: I757fe1f51559a0d0cda7463fd5541fac20e3a92e
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163930
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoUse correct format specifier
Joe Korty [Wed, 25 May 2016 07:04:24 +0000]
Use correct format specifier

Use %zd, not %d, to display size_t arguments

drivers/media/platform/tegra/imx091.c:2826:35:
warning: format '%d' expects argument of type 'int',
but argument 5 has type 'long unsigned int' [-Wformat=]

Bug 200187768

Change-Id: I2591203af81f5c3f64b55e8e722fdbc5a59c8de4
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163906
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoRemove unused variable
Joe Korty [Tue, 24 May 2016 10:42:50 +0000]
Remove unused variable

drivers/thermal/pwm_fan.c: In function 'pwm_fan_resume':
drivers/thermal/pwm_fan.c:1053:6:
warning: unused variable 'err' [-Wunused-variable]

Bug 200187768

Change-Id: I6fcfa249ab536d47b6b91029aedf4b2f57eda1cc
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163893
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm64: tegra21: emc: Make sure the DLL always has a clock
Alex Waterman [Mon, 23 May 2016 20:58:15 +0000]
arm64: tegra21: emc: Make sure the DLL always has a clock

Ensure the DLL always has a clock. If it does not then the DLL will
not be able to swap to a new clock source. That is to say the DLL
requires both the old and new clock source to be active when its
source is changed.

Bug 1655375

Change-Id: I796725b95628d7ea6753d7986af74324e9c1489b
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1152001
(cherry picked from commit e0a23c1f4a99a88b09faedd82dbdba64fc138bec)
Reviewed-on: http://git-master/r/1185062
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

2 years agodtsi: sensors: Remove restrictions to run sensors at full speed
Robert Collins [Mon, 18 Jul 2016 22:23:46 +0000]
dtsi: sensors: Remove restrictions to run sensors at full speed

- Remove frequency restrictions on gyro, accel, compass, barometer.
- Remove barometer_disabled, if currently disabled.

Bug 200191681
Bug 200201316

Change-Id: If75f10034a4c14ebb4010ed4ae3a511e0bd2ade6
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1185061
GVS: Gerrit_Virtual_Submit
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

2 years agoiio: imu: nvi v.336 Add DMP AUX support
Erik Lilliebjerg [Mon, 18 Jul 2016 04:48:59 +0000]
iio: imu: nvi v.336 Add DMP AUX support

- Add DMP support for devices on the auxiliary ports behind the MPU/ICM.  Due
  to the differences between the MPU and ICM DMPs, the auxiliary port API was
  extended that allowed the DMP dependencies to be removed from the auxiliary
  device's external drivers.
- Updated the pressure calculations for the BMP280 driver to the latest BMP280
  specification.

Bug 200191681
Bug 200201316
Bug 200195822

Change-Id: Id4338b11094f8ef00df214c14649b7bc951a6891
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1185055
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

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

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

Bug 1768847

Change-Id: I324ff9c191902ee24f2d3e008c26246e4617c176
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1177152
(cherry picked from commit 81e14c78944d1af451d2b6078e02a056cb8f6cdd)
Reviewed-on: http://git-master/r/1185054
GVS: Gerrit_Virtual_Submit
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

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

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

Bug 1768847

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

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

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

Bug 1768847

Change-Id: I42601e9d2f5b7f1bc18c312919ed4ee14a90b3d4
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1176261
(cherry picked from commit c747d0e003ea1a607090deaf12aa98118d0e6627)
Reviewed-on: http://git-master/r/1185052
GVS: Gerrit_Virtual_Submit
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>

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

Check if num_syncpt_incrs are not more than number of
syncpoints available

Bug 1781393

Change-Id: Iee5070c87c8db0d6c30eb55ca03ec27c7de379ee
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1184846
(cherry picked from commit d85d48ec37173633d8efbc394b2508c710a0cda1)
Reviewed-on: http://git-master/r/1191971
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agoRevert "gpu: nvgpu: enable semaphore acquire timeout"
Shreshtha SAHU [Wed, 27 Jul 2016 05:21:03 +0000]
Revert "gpu: nvgpu: enable semaphore acquire timeout"

This reverts commit a4b13ca7e202a7fca576a4ba7f09b73a92bf81a2.

cudaEventSynchronize is failing due to this.

Bug 200219720
Bug 1636800

Change-Id: Id557ed30a2db2f289f8f546a5d4454ceb179caf0
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1191361
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agodrivers: camera: Fix bytesperline derivation
Bhanu Murthy V [Tue, 26 Jul 2016 22:10:08 +0000]
drivers: camera: Fix bytesperline derivation

Fix bytesperline calculation based on the
corresponding format derived with the code sent
from userspace.

Bug 200214096

Change-Id: Ic2ea7bf986e31b9177d1124142dfb115b935c24d
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1191066
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Gigon Bae <gbae@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Gigon Bae <gbae@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoiio: imu: nvi v.333 ICM DMP FW v.2
Erik Lilliebjerg [Wed, 29 Jun 2016 01:57:07 +0000]
iio: imu: nvi v.333 ICM DMP FW v.2

- Implement Invensense ICM DMP FW v.2 that fixes sensor data timing gaps.

Bug 1768847

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

2 years agoiio: imu: nvi v.330 MPL520 support
Erik Lilliebjerg [Tue, 7 Jun 2016 02:19:47 +0000]
iio: imu: nvi v.330 MPL520 support

- Add sensor dependency for wake interrupt.
- Sensor mounting matrix is now globally based.

Bug 1768847

Change-Id: I24c0db40ed7ef4ff75da5b629276ee950673eb1f
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/1159846
(cherry picked from commit 3a3706e3c23a2cfe50cb82581bb71223b7085a10)
Reviewed-on: http://git-master/r/1185050
GVS: Gerrit_Virtual_Submit
Tested-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

2 years agoiio: imu: nvi v.329 Fix ICM DMP period
Erik Lilliebjerg [Sun, 29 May 2016 12:16:55 +0000]
iio: imu: nvi v.329 Fix ICM DMP period

- Fix batch period calls that were getting dropped if the ICM DMP was enabled.

Bug 200199302

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

2 years agodriver: media: i2c: update imx185 driver
esen chen [Wed, 27 Jul 2016 02:27:43 +0000]
driver: media: i2c: update imx185 driver

Bug 200168141

DEPENDS ON: <http://git-master/r/1191198>

Change-Id: If8f93ab60dc2d5508c7403daadccde7762f87780
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1191244
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

2 years agoarm64: dts: update imx185 dt
esen chen [Wed, 27 Jul 2016 02:03:33 +0000]
arm64: dts: update imx185 dt

Adding support for new sensor mode type
Remove WDR sensor mode
Enable these modes:
 12bit 30fps
 10bit 30fps
 12bit 60fps
 10bit 60fps

Bug 200168141

DEPENDS ON: <http://git-master/r/1191244>

Change-Id: If87fb9e2ee673d4b3dfdc71fabbd725aed193c3c
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1191198
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agogpu: nvgpu: cancel job clean up before aborting channel
Deepak Nibade [Fri, 1 Jul 2016 07:05:27 +0000]
gpu: nvgpu: cancel job clean up before aborting channel

It is possible that when we abort the channel, we have
job clean up worker running, which could race with abort
and sometimes result in below panic

[  245.483566] Unable to handle kernel paging request at virtual address
800000000
...
[  245.548991] PC is at gk20a_channel_abort_clean_up+0xb8/0x140
[  245.554683] LR is at gk20a_channel_abort_clean_up+0xac/0x140
...
[  247.301860] [<ffffffc000479390>]
gk20a_channel_abort_clean_up+0xb8/0x140
[  247.312853] [<ffffffc0004794d4>] gk20a_channel_abort+0xbc/0xc8
[  247.322970] [<ffffffc0004794f8>] gk20a_disable_channel+0x18/0x30
[  247.333267] [<ffffffc000479628>] gk20a_free_channel+0x118/0x584
[  247.343473] [<ffffffc000479aa0>] gk20a_channel_close+0xc/0x14
[  247.353479] [<ffffffc000479b80>] gk20a_channel_release+0xd8/0x104

Fix this by cancelling the job clean up worker before aborting
the channel

Bug 1777281
Bug 200209467

Change-Id: Ic24c7c03b27cfb5cd164a52efdb1e2813a41a10a
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1174416
(cherry picked from commit 1002f40a3bb54db6e40be77b836437ccb2f3aa96)
Reviewed-on: http://git-master/r/1190946
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agovideo: tegra: host: fix integer overflow
Deepak Nibade [Mon, 27 Jun 2016 08:43:26 +0000]
video: tegra: host: fix integer overflow

Below addition on 32 bit architecture machines could
cause integer overflow since we will assign overflowed
value to "num_unpins"
s64 num_unpins = num_cmdbufs + num_relocs

Fix this and other calculations by explicitly typecasting
variables to u64 first

Bug 1781393

Change-Id: Ib7d9c0be4ac61dc404512b4bb0331aa20a6978bc
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1171748
(cherry picked from commit 8f00b96c137b9c4cb43a8dbe2e153fae49524113)
Reviewed-on: http://git-master/r/1190752
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agovideo: tegra: host: fix possible overflow with num_syncpt_incrs
Deepak Nibade [Mon, 27 Jun 2016 08:33:15 +0000]
video: tegra: host: fix possible overflow with num_syncpt_incrs

We allocate below without checking if num_syncpt_incrs
is valid or not
struct nvhost_ctrl_sync_fence_info pts[num_syncpt_incrs];

If UMD passes a negative value in num_syncpt_incrs, then
it is possible to corrupt the stack

Hence, first check if num_syncpt_incrs is valid (i.e.
not negative)
And then allocate the array dynamically using kzalloc
instead of allocating it on stack

Bug 1781393

Change-Id: I5389fd271149b457f63831a41c104c9814299ddf
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1171747
(cherry picked from commit 07fb347b4060a888b19df3524f36fcf7974a79d1)
Reviewed-on: http://git-master/r/1190751
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agodriver: media: tegra: add sensor mode cid
esen chen [Tue, 26 Jul 2016 04:54:46 +0000]
driver: media: tegra: add sensor mode cid

Add V4L2_CID_SENSOR_MODE_ID to help sensor modes setting
Using use_sensor_mode_id in dt enable PCL to set mode id

Bug 200168141

Change-Id: I6d90fcbcb709e9e5d8cc8fe2bbd906005f8d4e70
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1190587
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoiio: imu: Invensense: Update 5.3.0.K-52 to latest tool chain.
Robert Collins [Thu, 23 Jun 2016 20:47:56 +0000]
iio: imu: Invensense:  Update 5.3.0.K-52 to latest tool chain.

Bug 1767467

Change-Id: I6056ae308cbd07ab5434d3b9da2a528e53df118b
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1177674
(cherry picked from commit a115bce5238023dfff706cade1036eeae28c83c3)
Reviewed-on: http://git-master/r/1189579
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agoiio: imu: Invensense: Update to official 5.3.0.K-52 code base.
Robert Collins [Thu, 23 Jun 2016 20:25:51 +0000]
iio: imu: Invensense:  Update to official 5.3.0.K-52 code base.

Bug 1767467

Change-Id: If4b18b80eb30e252d0649ff760ce2bf7d02d4268
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1177673
(cherry picked from commit a400dd588884892eed50f7af2426829265e8b573)
Reviewed-on: http://git-master/r/1189578
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agoiio: imu: Invensense: Update to official 5.3.0 code base.
Robert Collins [Tue, 24 May 2016 17:00:17 +0000]
iio: imu: Invensense:  Update to official 5.3.0 code base.

Bug 1767467

Change-Id: I49c74bfc13871d2004b534ba93824094abc0d82e
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/1151329
(cherry picked from commit 78a76b4ae3de465a26e66a661e979fe339091ec9)
Reviewed-on: http://git-master/r/1189577
Reviewed-by: Akhilesh Khumbum <akhumbum@nvidia.com>
Reviewed-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Tested-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agomisc: tegra-profiler: Fix armv7 PMU setup.
Alexey Kravets [Thu, 29 Oct 2015 08:08:10 +0000]
misc: tegra-profiler: Fix armv7 PMU setup.

Bug 1694191
Bug 200142156

Change-Id: I72c21c15a4c29a1b91b0dd798e9294ac341cc395
Signed-off-by: Alexey Kravets <akravets@nvidia.com>
Reviewed-on: http://git-master/r/824698
(cherry picked from commit e97a74e0dbeaabaa82d3d7d759096f530961761d)
Reviewed-on: http://git-master/r/1176876
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1189519
GVS: Gerrit_Virtual_Submit
Tested-by: Anatoly Nikiforov <anikiforov@nvidia.com>

2 years agodriver: media: i2c: Update IMX185 driver
Frank Chen [Tue, 12 Jul 2016 21:31:02 +0000]
driver: media: i2c: Update IMX185 driver

Switch to new driver model which takes raw
Gain/Frame Rate/Exposure from PCL and do all
the necessary calculation to get the final
register settings.

Bug 1789332
Bug CHWI-246

Change-Id: I27bfcb6d6d1263dfe95e5f463fdd9ed57330b235
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1181636
Reviewed-by: Esen Chen <esenc@nvidia.com>
Tested-by: Esen Chen <esenc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoarm64: dts: Update IMX185 DT settings
Frank Chen [Sun, 17 Jul 2016 22:03:07 +0000]
arm64: dts: Update IMX185 DT settings

1. Move UseDecibelGain flag from mode setting to
   global settins
2. Update gain decibel range
3. Update FPS range

Bug 1789332
Bug CHWI-246

Change-Id: Iba3cfcc44f0606fc3dc691b1f6981b59302fb5fb
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1183842
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agomisc: tegra-profiler: enable multiprocess support
Arul Sekar [Tue, 10 May 2016 18:21:24 +0000]
misc: tegra-profiler: enable multiprocess support

- support multi process profiling requests from user
- uses trace_all_tasks parameter
- skip kernel swapper (pid == 0) tasks

Bug 1764640

Change-Id: I1f0e2d4432d095b1e6e4db0781be9ce355bf23ed
Signed-off-by: Arul Sekar <aruls@nvidia.com>
(cherry picked from commit f0799d139c2d32ce44efd4b544fca20fed7c08af)
Reviewed-on: http://git-master/r/1161158
Tested-by: Anatoly Nikiforov <anikiforov@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit 6ff5f51d2604b5a443f898b2f7c1a2cac34edc10)
Reviewed-on: http://git-master/r/1175198

2 years agomisc: tegra-profiler: support multiple PMUs
Alexey Kravets [Wed, 7 Oct 2015 11:47:24 +0000]
misc: tegra-profiler: support multiple PMUs

Support multiple PMUs in tegra profiler module.
Allow per-CPU capabilities query and per-CPU PMU setup.

Bug 1694191
Bug 200142156

(cherry picked from commit 3f18b6372263fb76aebfc66a5bbe76c44c4a5daa)
Change-Id: I10e1779aa76814b1615610f1acdb700875349607
Signed-off-by: Alexey Kravets <akravets@nvidia.com>
Reviewed-on: http://git-master/r/819795
(cherry picked from commit 7bf627d61f4b724c22d02aef609fd60507a2b593)
Reviewed-on: http://git-master/r/824265
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1175197
Tested-by: Anatoly Nikiforov <anikiforov@nvidia.com>

2 years agoi2c: tegra: fix unknown interrupt issue after ARB lost
Shardar Shariff Md [Mon, 9 Nov 2015 05:50:03 +0000]
i2c: tegra: fix unknown interrupt issue after ARB lost

For i2c transaction with repeat start (We post 7W [header + data
for Write followed by read in FIFO]) and unmask required interrupts.
But HW starts processing if there are atleast 3W in FIFO and during
this time if ARB lost error occurs then current data in FIFO is cleared
and chance of posting remaining data after FIFO is cleared. Now
SW handles the ARB lost error as interrupts are enabled later after
posting all packets and after clearing the ARB lost interrupt the
packet mode is disabled(Normal mode), which causes the Normal mode
interrupt(Unknown interrupt in case of packet mode) due to stale
data in fifo.

- To fix this, enable (unmask) error interrupt before posting the
packets into FIFO and clear the packet mode disable before clearing
ARB lost error also for other errors(NACK/FIFO overflow).

- Dont issue bus clear for ARB lost error if bus is operating in
multimaster mode.

Bug 200151590
Bug 200151064

Change-Id: I20d19a25aee400dd0a6517bdcaf87e2c84b0770a
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/842348
(cherry picked from commit 7c8f33dec55fc63286acb35bee3f175f2f989189)
Reviewed-on: http://git-master/r/1190656
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

2 years agoi2c: tegra: override slcg for Master core logic
Shardar Shariff Md [Tue, 3 Nov 2015 21:09:10 +0000]
i2c: tegra: override slcg for Master core logic

- override(disable) 2nd-level clock for I2C master
core logic i.e keeping 2nd-level clock always ON
when bus is operating in multi-master mode.

Bug 200146630

Change-Id: I04840c2a0453ecbf5c10a9ea0e0f3d0523c5071a
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/842347
(cherry picked from commit 115380a0fff228cb606e135e703d87c297070835)
Reviewed-on: http://git-master/r/1190655
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

2 years agoarch: arm64: boot: dts: T210 camera devnames
Bhanu Murthy V [Mon, 18 Jul 2016 22:49:34 +0000]
arch: arm64: boot: dts: T210 camera devnames

Add devnames instead of devnodes to improve
flexibility in binding userspace and kernel drivers.

Bug 1758789
Bug 200219854

Change-Id: I680a5a968e1c5dc32783470dfcc881b791491934
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1151351
(cherry picked from commit 457c67e29e7a5892bb6ace057059e803470fd83d)
Reviewed-on: http://git-master/r/1183082
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agodriver: media: tegra: Update tegra camera_common
Frank Chen [Sat, 16 Jul 2016 00:33:08 +0000]
driver: media: tegra: Update tegra camera_common

1. Undefine standard V4L2 GAIN/Exposure CIDs and
switch to our own custom CIDs.

2. Add helper function to read mode specific info
from device tree.

Jira: CHWI-246

Bug 200168141

DEPENDS ON: <http://git-master/r/1176440>

Change-Id: I7bfd69a030031f8b450472ee9124cf08a030b1a9
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1183834
Reviewed-by: Esen Chen <esenc@nvidia.com>
Tested-by: Esen Chen <esenc@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agogpu: nvgpu: suppress prints in submit path
Deepak Nibade [Tue, 24 May 2016 08:21:26 +0000]
gpu: nvgpu: suppress prints in submit path

When we run out of gpfifo space or private command buffer
space, we have error spew like below :
__gk20a_channel_syncpt_incr: not enough priv cmd buffer space
gk20a_submit_channel_gpfifo: fail

Dumping these prints to UART cause increase in submit
latencies

But on these failures, we return -ENOSPC to UMD and then
UMD retries the submit, hence it might be unnecessary to dump
these prints

Hence, remove the error prints of insufficient space
and use gk20a_dbg_fn() instead of gk20a_err() to print failure
in gk20a_submit_channel_gpfifo()

Bug 200202653

Change-Id: I49efd7c6c554dd4fbfa4e66d196eb352e69f92c6
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1152378
(cherry picked from commit dc7af18bf8056c213165d4cd1c55ea0fba9f1341)
Reviewed-on: http://git-master/r/1190065
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agothermal: Avoid scheduling work during poweroff
Rohit Vaswani [Wed, 20 Jul 2016 02:01:17 +0000]
thermal: Avoid scheduling work during poweroff

During a critical thermal trip, orderly_poweroff is called.
However, if the userspace is slow to react to poweroff (systemd),
and the thermal zone is configured with polling mode because of
either polling_delay or passive_delay, thermal_core may end up
in calling orderly_poweroff multiple times.
This eventually slows the userspace even more by
scheduling overwhelming number of threads in the system.

Relevant dump_stack spew during the shutdown process:
 dump_backtrace+0x0/0xf4
 show_stack+0x14/0x1c
 dump_stack+0x20/0x28
 handle_critical_trips+0x80/0xa0
 handle_thermal_trip+0x40/0x64
 thermal_zone_device_update+0xf0/0x110
 thermal_zone_device_check+0x10/0x18
 process_one_work+0x274/0x430
 worker_thread+0x184/0x294
 kthread+0xc0/0xc8

We should not try to spawn-off more threads once we have
decided to shutdown i.e. we should disable polling mode
once it is known that a critical trip is going to result
in a poweroff. This patch does that by setting the polling
and passive delay to zero which cancels the repeated work
and allows userspace to shutdown.

Change-Id: Ia8714c288f9a332dc8ea7a3ffc7156fc6095ed9e
Signed-off-by: Rohit Vaswani <rvaswani@nvidia.com>
Reviewed-on: http://git-master/r/1183768
Reviewed-by: Navneet Kumar <navneetk@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Wen Yi <wyi@nvidia.com>
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agodrivers: camera: Fix v4l2 driver compliance
Bhanu Murthy V [Tue, 19 Jul 2016 01:00:42 +0000]
drivers: camera: Fix v4l2 driver compliance

Fix s/g/query dv timings compliance, report not
supported if the sub device on CSI does not support
the timing fops.
Fix s/g crop fops for sub devices which does not
support cropping.
Fix subdev used in s/g param fops.

Bug 1675242
Bug 200214096

Change-Id: If262ca8038694ffb05273a99268b86984b1532c1
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1183150
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agodts: plugin-manager: Fix ov5693 csi port index
Frank Chen [Wed, 20 Jul 2016 21:54:22 +0000]
dts: plugin-manager: Fix ov5693 csi port index

Correct csi port index for ov5693 sensor. Incorrect
index will cause dpd and mfi failures.

Bug 200220580

Change-Id: Ie9de7e02db739c45dba0ffba56f0070623b1a024
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1184514
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit

2 years agoarm64: dts: Add new dts file for Darcy with new memory
Daniel Fu [Wed, 8 Jun 2016 13:18:19 +0000]
arm64: dts: Add new dts file for Darcy with new memory

Bug 200203997

Change-Id: I17bfe732dd71c7d59a5ef70665c8dd07f9f86546
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/1161188
(cherry picked from commit 790caf00c2ef2e025ed8651c0aec5c8e4539a545)
Reviewed-on: http://git-master/r/1183414
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

2 years agodrivers: camera: Ignore resolution errors for CSI
Bhanu Murthy V [Thu, 14 Jul 2016 17:01:06 +0000]
drivers: camera: Ignore resolution errors for CSI

Ignore only frame height or width short/long errors
from CSI. Resolution mismatch can occur the actual lines
can be inclusive of embedded data lines which application
ignores anyway. Report failure only when the pixel parser
or CIL status is wrong.

Bug 1708456

Change-Id: I96fda6b6802e1497de2d5ca074c416d3b6ea5e40
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1181511
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agodrivers: camera: support maxframerate property
Bhanu Murthy V [Thu, 7 Jul 2016 01:24:09 +0000]
drivers: camera: support maxframerate property

Add check for maxframerate to distinguish different
mode tables needed by sensor for optimal use.

Bug 1769654

Change-Id: If8db48af46df984e440fff3472f0ea93145d5a01
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176484
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agoarm64: dts: imx274: enable multiple sensor modes
Josh Kuo [Thu, 7 Jul 2016 08:23:26 +0000]
arm64: dts: imx274: enable multiple sensor modes

enable multiple sensor modes for imx274.

support 4k@60fps, 4k@30fps and 1080p@60fps

Bug 1769654

Change-Id: Id25bc8279f273add5df1d76e0b5ff7de19224462
Signed-off-by: Josh Kuo <joshk@nvidia.com>
Reviewed-on: http://git-master/r/1176815
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agodrivers: imx274: Add maxfps properties
Bhanu Murthy V [Thu, 7 Jul 2016 01:25:36 +0000]
drivers: imx274: Add maxfps properties

Add max fps properties for imx274 driver

Bug 1769654

Change-Id: I063ef6f0ebb5b98625a047d0c2e4297b6a2bb532
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176485
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agoinclude: media: Add max fps properties
Bhanu Murthy V [Thu, 7 Jul 2016 01:22:12 +0000]
include: media: Add max fps properties

Add maxfps default and current format fields
to camera common data to identify proper
sensor mode id.

Bug 1769654

Change-Id: I10b09b437a97f80f16d5e625b50a99bc819c4670
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176483
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoinclude: media: Add maxframerate field
Bhanu Murthy V [Thu, 7 Jul 2016 01:19:01 +0000]
include: media: Add maxframerate field

Add maxframerate field as part of pixelformat
to distinguish different framerate ranges support
as two different modes in sensor drivers.
e.g: 4k@(0-30) and 4K@(0-60).
More parameters might be changed in sensor with a
framerate range for optimal usage.

Bug 1769654

Change-Id: I80e6a36911e802d9f7b17b61248b6268f9b0439d
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1176482
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agomedia: tc358840: BUG_ON for overrunning array
Ahung Cheng [Wed, 6 Jul 2016 05:16:59 +0000]
media: tc358840: BUG_ON for overrunning array

In print_avi_infoframe, it allocates array buffer of 17 bytes.
It might run into a case to access array buffer at byte position 28.
in hdmi_infoframe_unpack when switch case value is SPD.

bug 200192413

Change-Id: I3624d471353f8c5b0ed317fc30e61beee7290439
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1176086
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agodrivers: imx274: adding multiple sensor modes
Josh Kuo [Thu, 23 Jun 2016 05:52:39 +0000]
drivers: imx274: adding multiple sensor modes

adding multiple sensor modes for imx274.

support 4k@60fps, 4k@30fps and 1080p@60fps

Bug 1769654

Change-Id: I1753d63e0c8adaafc59951de8c67b6314da24304
Signed-off-by: Josh Kuo <joshk@nvidia.com>
Reviewed-on: http://git-master/r/1170059
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shiva Dubey <sdubey@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoarm64: tegra21: enable CONFIG_SWAP
Shreshtha SAHU [Wed, 20 Jul 2016 04:42:18 +0000]
arm64: tegra21: enable CONFIG_SWAP

boot.img has increased by 38592 bytes.

Bug 1790199

Change-Id: Icb37ba97da8003cc70e2f205c1104ac6a926c54e
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1183845
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarm: arm64: boot: dts: gang_mode
Ahung Cheng [Wed, 8 Jun 2016 03:34:44 +0000]
arm: arm64: boot: dts: gang_mode

Add gang_mode entry for TC358840

bug 1772273

Change-Id: Ib245d1fb1437fde8c0fce7e64dd0eed1329fdd8d
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
(cherry picked from commit 5e9c441b7a7857d8e22cdd95e08daaf8c898b46b)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1165728
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agodrivers: media: camera: Gang Mode from device tree
Ahung Cheng [Fri, 3 Jun 2016 10:22:05 +0000]
drivers: media: camera: Gang Mode from device tree

Add support for reversing CSI mapping by looking for a new entry,
gang-mode. Set gang mode to GANG_MODE_R_L, instead of default
GANG_MODE_L_R, to swap input ports.

bug 1772273

Change-Id: Ia2be129354e4aca3c7236125667f18e950061f63
Reviewed-on: http://git-master/r/1158678
(cherry picked from commit b595683f9b562b55323ed185e3a4405a31b722b5)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
(cherry picked from commit 7cc03562332180e21090c288ffaa5dfd89ec2df3)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1165727
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>

2 years agov4l2-event: v4l2_event_queue: do nothing if vdev == NULL
Hans Verkuil [Tue, 23 Jun 2015 09:20:23 +0000]
v4l2-event: v4l2_event_queue: do nothing if vdev == NULL

If the vdev pointer == NULL, then just return.

This makes it easier for subdev drivers to use this function without having to
check if the sd->devnode pointer is NULL or not.

Bug 1770474

Change-Id: I4d9798b58ea13e987dcf50442a96694a8f803291
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: http://git-master/r/1154256
(cherry picked from commit 4e09f1b068c7f67926258f6b0a802fe5691ccd4b)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1165707
Reviewed-by: Hayden Du <haydend@nvidia.com>

2 years agoARM64: DTS: t210: sdhci pd disable
Bitan Biswas [Mon, 15 Feb 2016 11:41:48 +0000]
ARM64: DTS: t210: sdhci pd disable

sdmmc power domain disabled for T210

bug 200155814

Change-Id: Ie0ae38b517354a8223e5fd8ecf89c60ab65d1a70
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1011959
(cherry picked from commit 544ed2d95a1fd5564ad072a91ba1a156ff2d41b0)
Reviewed-on: http://git-master/r/1177604
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agommc: sdhci: allow clock enable in suspend sequence
Bitan Biswas [Wed, 17 Feb 2016 12:24:10 +0000]
mmc: sdhci: allow clock enable in suspend sequence

Some host with SDHCI_QUIRK2_NON_STD_RTPM deviation
need to enable clock in the suspend sequence.
This change enables such platforms to
suspend properly.

bug 200155814

Change-Id: I37969748660965c4b4097837e9b9c6bb7a593b4e
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1012839
(cherry picked from commit e27946db4cc054ab016459e3e16f3e68a51f0872)
Reviewed-on: http://git-master/r/1177603
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agommc: sdhci: mmc detect change timeout update
Bitan Biswas [Fri, 8 Jul 2016 11:15:44 +0000]
mmc: sdhci: mmc detect change timeout update

Higher mmc detect change timeout is needed
even if card is removed during suspend

bug 200196862

Change-Id: Ie771af36324d9e5003d1a4167f306c765848b490
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1177591
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoFix uninitialized variable
Joe Korty [Wed, 25 May 2016 13:09:41 +0000]
Fix uninitialized variable

Quiet gcc warning by giving 'in6' an initial
value of NULL.

Technically this is wrong, but there seems to
be no path through the function where 'in6' is
not set then used.  If that is wrong, we will
get a NULL pointer kernel panic.  Though bad,
that is better then the current situation,
where some random spot in the kernel gets
modified via the following of an undefined
pointer value in 'in6'.

include/net/ipv6.h:417:34: warning:
'in6' may be used uninitialized in this function
[-Wmaybe-uninitialized]
return ((ul1[0] ^ ul2[0]) | (ul1[1] ^ ul2[1])) == 0UL;

net/ipv4/tcp.c:3513:19: note: 'in6' was declared here
struct in6_addr *in6;

Bug 200187768

Change-Id: I4db7b351ae720c0a34c48ea7f39e95b788164900
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163944
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoRemove unused variables and labels
Joe Korty [Wed, 25 May 2016 13:05:34 +0000]
Remove unused variables and labels

drivers/media/i2c/imx185.c:548:6:
warning: unused variable 'i' [-Wunused-variable]
drivers/media/i2c/imx185.c:644:1:
warning:
label 'fail' defined but not used [-Wunused-label]
drivers/media/i2c/imx185.c:999:7:
warning:unused variable 'dt_name' [-Wunused-variable]
drivers/media/i2c/imx185.c:560:9:
warning: 'gain' may be used uninitialized in this
function [-Wmaybe-uninitialized]

Bug 200187768

Change-Id: I6e66765abe97fc8923ff48c778a5a3befddb4fc1
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163943
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agoSilence uninitialized variable warning
Joe Korty [Wed, 25 May 2016 12:58:56 +0000]
Silence uninitialized variable warning

When we go through the switch() case
where 'send_direct' is not initialized, the
code later on that uses 'send_direct' will
be skipped over.  So it is safe to set this
'send_direct' to any value we want in order
to quiet this gcc warning.

net/mac80211/cfg.c: In function 'ieee80211_tdls_mgmt':
net/mac80211/cfg.c:3225:5: warning:
'send_direct' may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (send_direct) {

Bug 200187768

Change-Id: I01128d4682898b01e0512881029497821bc93201
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163942
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoAdd default case in switch statement
Joe Korty [Wed, 25 May 2016 12:57:27 +0000]
Add default case in switch statement

Provide a reasonable default value
(ie, the original value) for smps_mode
when a new value is not being assigned.

This forces the value of 'changed' to be correct
when no attempt at changing is being done to
'smps_mode'.

net/mac80211/ht.c: In function
'ieee80211_ht_cap_ie_to_sta_ht_cap':
net/mac80211/ht.c:232:5: warning:
'smps_mode' may be used uninitialized in this
function [-Wmaybe-uninitialized]
if (smps_mode != sta->sta.smps_mode)

Bug 200187768

Change-Id: Ife7dbe09e911d801c4fc1e85c3f8ad40cd681c09
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163941
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoFix 'const' propagation prob
Joe Korty [Wed, 25 May 2016 12:47:49 +0000]
Fix 'const' propagation prob

The strings pointed to are unchanging while in use,
so add a 'const' to the string definition.

drivers/usb/misc/usb_nvshieldled.c:
In function 'nvshieldled_probe':
drivers/usb/misc/usb_nvshieldled.c:394:7: warning:
passing argument 3 of 'of_property_read_string' from
incompatible pointer type [-Wincompatible-pointer-types]
       &edp_name)) {

In file included from drivers/usb/misc/usb_nvshieldled.c:26:0:
include/linux/of.h:268:12: note: expected 'const char **' but
argument is of type 'char **'
extern int of_property_read_string(struct device_node *np,

Bug 200187768

Change-Id: I989ecdf4d0c40ef032c2056889db6b0e399748bb
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163936
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoFix the casting issue
Gaurav Singh [Wed, 25 May 2016 12:45:10 +0000]
Fix the casting issue

Allow a 64 bit pointer to be cast and put into a
32-bit integer, when that pointer points to a
location within a 32 bit userspace.

Normally this is a very bad thing to do, the compiler
is right to warn us about this, but in this very
specific case, it is OK.

In file included from fs/compat_binfmt_elf.c:128:0:
fs/binfmt_elf.c: In function 'create_elf_tables':
/cuba/jak/tegra/r23.1/a/arch/arm64/include/asm/elf.h:143:7:
warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
(elf_addr_t)current->mm->context.vdso);

fs/binfmt_elf.c:216:26: note:
in definition of macro 'NEW_AUX_ENT'
elf_info[ei_index++] = val;

fs/binfmt_elf.c:226:2: note:
in expansion of macro 'ARCH_DLINFO'
ARCH_DLINFO;

Bug 200187768

Change-Id: Ia9086a0b43c608e672d04cec209ea7edc1d3a806
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163935
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoFix uninitialized variable
Joe Korty [Wed, 25 May 2016 12:56:24 +0000]
Fix uninitialized variable

sound/soc/codecs/rt5639.c: In function 'rt5639_pll_calc':
sound/soc/codecs/rt5639.c:2833:19: warning:
'm_t' may be used uninitialized in this
function [-Wmaybe-uninitialized]
 pll_code->m_code = m;

Bug 200187768

Change-Id: I86981ef397ff3f8bd0bf80e723d00cb1ca937ef7
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163940
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoFix kernel warnings
Joe Korty [Wed, 25 May 2016 12:54:57 +0000]
Fix kernel warnings

1) rt5659_enable_push_button_irq() is not yet being
used, so comment it out with #ifdef FIXME.
2) Give mt_t an initial value of zero, for those
paths where it is not initialized.

sound/soc/codecs/rt5659.c:1314:13: warning:
'rt5659_enable_push_button_irq' defined but
not used [-Wunused-function]
static void
rt5659_enable_push_button_irq(struct snd_soc_codec *codec,

sound/soc/codecs/rt5659.c: In function 'rt5659_pll_calc':
sound/soc/codecs/rt5659.c:3636:19: warning:
'm_t' may be used uninitialized in this
function [-Wmaybe-uninitialized]
pll_code->m_code = m;

Bug 200187768

Change-Id: Ibc5aef1383dd6eb140968e5cf4925f8675d36832
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163939
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agommc: sdhci: Support polling mode
Arun Kannan [Thu, 14 Jul 2016 00:58:16 +0000]
mmc: sdhci: Support polling mode

Add support for broken-cd property in DT.

Bug 1765751

Change-Id: I5196de66ce9458971d7d8bf5f34f5c1351477f6a
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/1181053
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kamal Balagopalan <kbalagopalan@nvidia.com>

2 years agousb: gadget: xudc: enable RX detector control
Mark Kuo [Mon, 23 May 2016 11:02:00 +0000]
usb: gadget: xudc: enable RX detector control

Enable receiver detector control when necessary.

Bug 200162414
Bug 200179626

Change-Id: Ief7aeb0556cd7f6f4bd308f8c715ef68acf86b4b
Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Signed-off-by: Hans Yang <hansy@nvidia.com>
Reviewed-on: http://git-master/r/1169998
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoxhci-hcd: add success/failure soft retry counters
JC Kuo [Wed, 4 May 2016 11:30:39 +0000]
xhci-hcd: add success/failure soft retry counters

This commit adds counters for successful and failed soft retry
attempts.

bug 200162414

Change-Id: I7406cea4368da85c78c8fe350398031fc8121015
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/1169997
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoxhci-tegra: t210: support XHCI "soft retry"
JC Kuo [Tue, 22 Dec 2015 13:33:15 +0000]
xhci-tegra: t210: support XHCI "soft retry"

This commit implements a TEGRA210 XHCI specific programming sequence
which needs to be done along with "soft retry".

Verified E2220-ERS.

new added
- wait for U0 when is going to assert clame_en_early, timeout in 300us

Bug 200162414

Change-Id: I9b9e1eeb39d259416c199819808020c48171ab57
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/1169996
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoxhci-hcd: support soft retry on SS transfer error
JC Kuo [Sun, 20 Dec 2015 06:37:02 +0000]
xhci-hcd: support soft retry on SS transfer error

This commit implements XHCI "soft retry" for SuperSpeed endpoints which
encounters transfer errors.
When transfer error happens on an SuperSpeed endpoint, XHCI driver will
1. queue a "reset endpoint" command with TSP=1 (Transfer State Preserve)

2. invoke a HCD driver specific callback "->endpoint_soft_retry()" to let
HCD driver has a chance to configure its hardware

3. ring door bell for the endpoint upon seeing the command completion

bug 200162414

Change-Id: I19df13614f794437c7f4d4369dbdaed13e1da85a
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/1169995
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Tested-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agoplatform: tegra: padctl: add receiver detector API
Mark Kuo [Mon, 23 May 2016 09:52:37 +0000]
platform: tegra: padctl: add receiver detector API

Support clamp_en_early and receiver detector controls.

A copy of JC's original work at http://git-master/r/#/c/1141282/3 on
tegra_usb_pad_ctrl.c

Bug 200162414
Bug 200179626

Change-Id: I8a29f7d90bfedaaa1b2609f46f511754eaa1e71f
Signed-off-by: Mark Kuo <mkuo@nvidia.com>
Reviewed-on: http://git-master/r/1169994
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

2 years agovideo: tegra: dc: sysfs for HDMI AVI content type
Ahung Cheng [Tue, 14 Jun 2016 04:43:47 +0000]
video: tegra: dc: sysfs for HDMI AVI content type

Updated avi infoframe would be picked up by HW for next frame.

Sysfs node:
/sys/devices/platform/host1x/tegradc.1/hdmi_config/it_content_type
Value:
        0x0 = HDMI_AVI_IT_CONTENT_GRAPHICS,
        0x1 = HDMI_AVI_IT_CONTENT_PHOTO,
        0x2 = HDMI_AVI_IT_CONTENT_CINEMA,
        0x3 = HDMI_AVI_IT_CONTENT_GAME,
        0x4 = HDMI_AVI_IT_CONTENT_NONE, (Default)

bug 1772096

Change-Id: I9c9f79dcf0b6a9ff192ad0d457c55f38e21c2cfd
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1164025
(cherry picked from commit 708f5ad20644a2946f3e936e8c267333294d6408)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1170952
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agodrivers: imx2xx: Fail probe if device unavailable
Bhanu Murthy V [Wed, 13 Jul 2016 01:40:38 +0000]
drivers: imx2xx: Fail probe if device unavailable

Return error if otp read or fuse id read fails
Turn off power before returning error and remove
check for device not available during power off as
it's already verified during power on.

Bug 1784114

Change-Id: Id217b87fb8352c426f68468b1520da9520b0dcc7
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1180011
(cherry picked from commit 7ecab59b36e15224e0ea3901055be20794f61f6e)
Reviewed-on: http://git-master/r/1180977
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agomedia: tegra: graph: clean unlinked channels
Frank Chen [Sat, 9 Jul 2016 00:43:48 +0000]
media: tegra: graph: clean unlinked channels

We need to clean all the unlinked channels when
failed to find any imager device in DT.

Failed to do so will leave a false video node in
/dev directory.

Bug 1768704

Change-Id: Ifdbcd2ebeb0f8c1b1a2d28d3b31e4928b6978842
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1177935
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoARM64: DT: E3326 auto detect support
Frank Chen [Thu, 2 Jun 2016 05:09:44 +0000]
ARM64: DT: E3326 auto detect support

Add back E3326 auto detect support since
both cboot and uboot are supporting plugin
manager now.

Bug 1768704

Change-Id: If33edf7aa999d1e87cf603824addeee9eabd23e5
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1175910
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agoplatform: tegra: move pstore to carveout memory
Bibek Basu [Tue, 12 Jul 2016 07:07:38 +0000]
platform: tegra: move pstore to carveout memory

only carveout memory is gauranteed to be not
touched by bootloader. L4T uses NCT carveout
for Pstore .This change makes it explicit

Bug 200211744

Change-Id: I783f93a40f828784c181731cf21f6fcc9c95d718
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1178848
GVS: Gerrit_Virtual_Submit
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>

2 years agovideo: tegra: dc: HDMI SPD InfoFrame support
Ahung Cheng [Tue, 21 Jun 2016 10:39:53 +0000]
video: tegra: dc: HDMI SPD InfoFrame support

Add support to send SPD over Generic InfoFrame.

Please be noted that once SPD InfoFrame support is
enabled, HDR InfoFrame will be disabled as only one
of them can use Generic InfoFrame at one time.

To enable SPD InfoFrame, please add this in kernel config
 CONFIG_TEGRA_HDMI_SPD_INFOFRAME=y

And add source product description format as below under
hdmi-display in device tree
spd-infoframe {
vendor-name = "XXX";
product-description = "YYY";
source-information = <N>;
};

bug 200211468

Change-Id: Ifa8e1f54e1cb64fd507a483b24f8962a96be180e
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1168466
(cherry picked from commit 5604cf8cbc53f91b6945cb933526249113fcbbe8)
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1170967
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agoarch: arm64: boot: dts: Remove barometer
Sunny Li [Wed, 29 Jun 2016 04:44:23 +0000]
arch: arm64: boot: dts: Remove barometer

Remove barometer override option in plugin-manager

Bug 200201316

Change-Id: I22bc7151e17ff07abdc18ddc7764ccac475875ca
Signed-off-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-on: http://git-master/r/1172923
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

2 years agoFix uninitialized variable
Joe Korty [Wed, 25 May 2016 12:52:48 +0000]
Fix uninitialized variable

drivers/staging/iio/meter/ina3221.c: In function
'ina3221_get_shuntv_offset':
drivers/staging/iio/meter/ina3221.c:1021:25: warning:
'offset' may be used uninitialized in this function
[-Wmaybe-uninitialized] shuntv_offset->offset = offset;

Bug 200187768

Change-Id: Iba86f1ed92ab10d702172f577ea59848d337e0a1
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163938
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

2 years agopcie: host: tegra: fix l1ss programming
Vidya Sagar [Tue, 5 Jul 2016 10:19:52 +0000]
pcie: host: tegra: fix l1ss programming

L1SS configuration parameters need to be programmed
only for Tegra root ports and immediate devices (EP/UP port).
This change fixes the unwanted programming being done
to other devices apart from the ones mentioned above

Bug 200215912

Change-Id: Id8d8ec9952f3c7f7249de0f5c2ed244721e2fb57
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1175569
(cherry picked from commit a006e75c1e505eb66386f8be24682d515f726111)
Reviewed-on: http://git-master/r/1176200
(cherry picked from commit 21f3796d6522578736342798947b1c99eec41c94)
Reviewed-on: http://git-master/r/1176996
(cherry picked from commit 0e20e95939447170b88b63bdb4a2365f07127bc6)
Reviewed-on: http://git-master/r/1178428
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agopcie: host: tegra: re-org L1SS reg programming
Vidya Sagar [Wed, 15 Jun 2016 16:13:13 +0000]
pcie: host: tegra: re-org L1SS reg programming

performs all L1SS registers programming before L1SS is
enabled by kernel

Bug 200210426

Change-Id: I48fe1a31933b9dfa9733b2550b1555db9be568b2
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165056
(cherry picked from commit 931881c4ce318b8d6b42db2300347db8546994ae)
Reviewed-on: http://git-master/r/1172629
(cherry picked from commit 67ad51482f14086c84986b2bf7eed9ff1d18a342)
Reviewed-on: http://git-master/r/1178427
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agoPCI: save and restore L1-SS registers
Vidya Sagar [Wed, 16 Dec 2015 08:17:56 +0000]
PCI: save and restore L1-SS registers

saves and restores L1 PM-SS registers during suspend and resume
this makes sure consistency of L1SS states across suspend/resume
cycle

Bug 200161255

Change-Id: I68b25e9433d0f08e4fadbe4547db7fb811f59462
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/923504
(cherry picked from commit 39530fa01a94d0f57f5fbb0febc56ac33f8e0024)
Reviewed-on: http://git-master/r/1165055
(cherry picked from commit 7db113ba07654ce0494b96fd2eb8bf2c3dd02407)
Reviewed-on: http://git-master/r/1172628
(cherry picked from commit 7348b2855df4c29c964b33db08d1687ed6c0d216)
Reviewed-on: http://git-master/r/1178426
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agoPCI: Add support for save/restore of extended capabilities
Alex Williamson [Tue, 17 Dec 2013 23:43:45 +0000]
PCI: Add support for save/restore of extended capabilities

Current save/restore is specific to standard capabilities.

Bug 200210426

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit fd0f7f73ca96bb0f8723b5e59759ad43bab88954)

Change-Id: I58e5d0ea452947d329e099ba54fa9059370693fc
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165054
(cherry picked from commit 61353ada0c3cae8f9302766b06158582387151f2)
Reviewed-on: http://git-master/r/1172627
(cherry picked from commit 8a2e41a87a7426c16916688205c31996422efa04)
Reviewed-on: http://git-master/r/1178425
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agoPCI: Fix comment typo for pci_add_cap_save_buffer()
Yijing Wang [Thu, 1 Aug 2013 13:05:27 +0000]
PCI: Fix comment typo for pci_add_cap_save_buffer()

Fix trivial comment typo for pci_add_cap_save_buffer().

Bug 200210426

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
(cherry picked from commit ce1be10bf6dc8406ae773f0ac6265585a4154d37)

Change-Id: I7c657211f6c230ad2ac216f8539ade8205964626
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1165053
(cherry picked from commit 791fe08f3aff6b141b4f406b394f8cc275665f5f)
Reviewed-on: http://git-master/r/1172626
(cherry picked from commit f47fc199c5f0ab097739361df2981ab71607119f)
Reviewed-on: http://git-master/r/1178424
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agopcie: host: tegra: disable aspm-l0s by default
Vidya Sagar [Mon, 2 Nov 2015 09:20:51 +0000]
pcie: host: tegra: disable aspm-l0s by default

disables aspm-l0s state by default except for those
which are whitelisted.
It also disables CLK-PM if the end point isn't pulling
clkreq down

Bug 200151223
Bug 1687368

Change-Id: I594888b63a9e3b45fff61871b40bca623998e9e4
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/826164
(cherry picked from commit fed09295fc4e5182c94414ef59d27ba48fdae44e)
Reviewed-on: http://git-master/r/831188
(cherry picked from commit 2bc1e873f28d2dbb469ae916cd34bcf2caa54f13)
Reviewed-on: http://git-master/r/1165052
(cherry picked from commit c321a58efb4193a4f46a67553bb4fe03519517f6)
Reviewed-on: http://git-master/r/1172625
(cherry picked from commit a80880386b5066c1c1f58b55e1ec7af6b06600ca)
Reviewed-on: http://git-master/r/1178423
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agoPCI/ASPM: enable aspm-l1ss support
Vidya Sagar [Mon, 19 Oct 2015 16:05:02 +0000]
PCI/ASPM: enable aspm-l1ss support

enables ASPM-L1 sub-states support

Bug 200143430

Change-Id: I236d09df6ea63d4ae72ff99d976026cc9a1ba933
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/819699
(cherry picked from commit c29c8155a63cf296905aa04f2ed1c0382ade2a56)
Reviewed-on: http://git-master/r/822729
(cherry picked from commit 53c3407b88d0964ca9f8653bb3901ccf623d43d9)
Reviewed-on: http://git-master/r/1165051
(cherry picked from commit 4aed2786b41ea74bb6a503674b192f15275baeb7)
Reviewed-on: http://git-master/r/1172624
(cherry picked from commit c0256dde68fb20a33554308e7b9e40fc5e1e5a92)
Reviewed-on: http://git-master/r/1178422
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agopcie: host: tegra: fix aspm-l1ss enabling
Vidya Sagar [Fri, 23 Oct 2015 08:12:24 +0000]
pcie: host: tegra: fix aspm-l1ss enabling

fixes the way aspm-l1ss gets enabled when multiple
pcie end points are connected

Bug 200143430

Change-Id: I1dc7fadb7092e8251378a84c3e4df538e5423d3e
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/821939
(cherry picked from commit 1f8efcf7faafd3641e9e2dfcb2d1956ff5926017)
Reviewed-on: http://git-master/r/822730
(cherry picked from commit 3c23d02d338c2b616966a4567be07e208fcb0541)
Reviewed-on: http://git-master/r/1165050
(cherry picked from commit 61004b3d58110509c749a7574d3b53297f133e96)
Reviewed-on: http://git-master/r/1172623
(cherry picked from commit 11eeeace1b24a51d1be05eb9b052500ef8ea2d71)
Reviewed-on: http://git-master/r/1178421
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agoRevert "pcie: host: tegra: cleanup clkreq dir programming"
Vidya Sagar [Tue, 28 Jun 2016 17:32:50 +0000]
Revert "pcie: host: tegra: cleanup clkreq dir programming"

This reverts commit b57a2766df3545d7f0f3d4229830369643bc18de.

This will be fixed properly along with other fixes in
http://git-master/r/#/c/1172629/

Bug 200210426

Change-Id: I1b11160d333f4957c1ac0296c804cc2379cb9923
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1172622
(cherry picked from commit 9b9c524437b958d186728c224393531a1e04f634)
Reviewed-on: http://git-master/r/1178420
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

2 years agoFix improper 'const' propagation
Joe Korty [Wed, 25 May 2016 12:51:19 +0000]
Fix improper 'const' propagation

It turns out that data 'data' points to
is always constant, so we can declare that
the pointer 'data' points to constant data
without problem.

drivers/net/wireless/iwlwifi/mvm/fw.c:90:64: warning:
initialization discards 'const' qualifier from
pointer target type [-Wdiscarded-array-qualifiers]
{.size = sizeof(_buf), .data = &_buf}
                                                                ^
drivers/net/wireless/iwlwifi/mvm/fw.c:93:8: note:
in expansion of macro 'CALIB_SIZE_N_DATA'
[9] = CALIB_SIZE_N_DATA(wkp_calib_values_tx_iq_skew),

drivers/net/wireless/iwlwifi/mvm/fw.c:90:64: warning:
initialization discards 'const' qualifier from
pointer target type [-Wdiscarded-array-qualifiers]

drivers/net/wireless/iwlwifi/mvm/fw.c:94:9: note:
in expansion of macro 'CALIB_SIZE_N_DATA'
[11] = CALIB_SIZE_N_DATA(wkp_calib_values_rx_iq_skew),

Bug 200187768

Change-Id: Ib1d0dbd3b44238feb39f54d1ebff00c2edd09254
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163937
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

2 years agodrivers: imx219: Fix power on sequence
Bhanu Murthy V [Wed, 15 Jun 2016 23:19:46 +0000]
drivers: imx219: Fix power on sequence

Fix the delay and order for the power on
sequence for IMX219 driver.

Bug 200210065

Change-Id: I55e1ac469c43b3f39739612f730bb9f64c20738f
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1165292
(cherry picked from commit afae6029c0334537d3ca93784685bfaee41cc50d)
Reviewed-on: http://git-master/r/1177913
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agomedia: tegra_camera: add SoC fops for CSI
Bryan Wu [Sat, 18 Jun 2016 00:16:13 +0000]
media: tegra_camera: add SoC fops for CSI

Add an SoC abstraction layer for for CSI which can be extended to
support different Tegra SoC in the future. Now start with T210.

Bug 1779020

Change-Id: I7c081ccb008bb7775591300495154aaf4505aee5
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1169883
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agomedia: tegra_camera: add SoC fops for VI
Bryan Wu [Fri, 17 Jun 2016 20:29:48 +0000]
media: tegra_camera: add SoC fops for VI

Add an SoC abstraction layer for for VI which can be extended to
support different Tegra SoC in the future. Now start with T210.

Bug 1779020

Change-Id: I29a8388f9343a1ffc895148b8ffb36c18d7f5c19
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1169882
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

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

bug 200153029

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

Change-Id: I62dd11e292d3c9fbfe959d76fc510c2115958b7e
Signed-off-by: Leo He <leoh@nvidia.com>
Reviewed-on: http://git-master/r/1023810
(cherry picked from commit e1395c20bf28b4eb5412534d46da9949db6cc8a0)
Reviewed-on: http://git-master/r/1176046
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

2 years agoarm64: dts: wdr/non-wdr 30fps modes for imx185
esen chen [Mon, 13 Jun 2016 08:52:41 +0000]
arm64: dts: wdr/non-wdr 30fps modes for imx185

for modes:
IMX185_MODE_1920X1080_CROP_30FPS
IMX185_MODE_1920X1080_CROP_HDR_30FPS

Bug 200168141

Change-Id: If4cbd3e40178596d90b7909de34b0464f2438b4e
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1163236
(cherry picked from commit a332e5ea8e86133436c4ad39a1f1141b4135c70a)
Reviewed-on: http://git-master/r/1174274
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agodriver: media: i2c: update imx185 driver
esen chen [Fri, 1 Jul 2016 02:01:21 +0000]
driver: media: i2c: update imx185 driver

Added proper equation to translate gain
Update imx185 sensor mode table

Bug 1744523
Bug 200168141

Change-Id: I806a833f5e055c5660f3151562fcd28f622573bc
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1174271
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

2 years agovideo: tegra: dc: fix bit depth of yuv422 mode
Michael Frydrych [Fri, 17 Jun 2016 14:39:30 +0000]
video: tegra: dc: fix bit depth of yuv422 mode

Bit depth of yuv422 mode was set to 10-bits, while it should
have been set to 12-bits. Incorrect bit depth resulted in the
mode not being intercepted when setting yuv422 black.

Bug 200102634
Bug 200182153

Change-Id: I6de42816a9aad92bc2c8bdfad70b1727a49fe94a
Signed-off-by: Michael Frydrych <mfrydrych@nvidia.com>
Reviewed-on: http://git-master/r/1167820
(cherry picked from commit 39aabae1c46710a5dd609690ab12746075640f7f)
Reviewed-on: http://git-master/r/1166991
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>