3 years agodrivers: soc_camera: imx230 crop
Arun Kannan [Sat, 9 Jan 2016 00:03:08 +0000]
drivers: soc_camera: imx230 crop

Define s_crop and g_crop ioctls
and corresponding registers.

Bug 1713205

Change-Id: I5152d7fbded1d52c17320e601240e11c1da715f1
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/930690
(cherry picked from commit 46d677ff1bf70be814b3a56ff6f7e321f352b8c0)
Reviewed-on: http://git-master/r/999520
Reviewed-by: Hu He <hhe@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kamal Balagopalan <kbalagopalan@nvidia.com>

3 years agoRevert "rtc: honor device tree /alias entries when assigning IDs"
Mrutyunjay Sawant [Tue, 16 Feb 2016 13:10:51 +0000]
Revert "rtc: honor device tree /alias entries when assigning IDs"

This reverts commit bb142c18a62c66588321f8041e92feea38ce31c7.

bug 1731008

Change-Id: Ib805e3905d1b61c8c443f871cff8e51249efe211
Reviewed-on: http://git-master/r/1012306
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

3 years agoRevert "arm: tegra: set Tegra RTC as hctosys device"
Mrutyunjay Sawant [Tue, 16 Feb 2016 13:10:34 +0000]
Revert "arm: tegra: set Tegra RTC as hctosys device"

This reverts commit 2be578092e89b0298739081150b0a0c4b6b6ca03.

bug 1731008

Change-Id: I99f9103c57753997f5b4d4872e7aa0aa1b5b1a47
Reviewed-on: http://git-master/r/1012305
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

3 years agoRevert "rtc: tegra: backup hctosys device"
Mrutyunjay Sawant [Tue, 16 Feb 2016 13:10:22 +0000]
Revert "rtc: tegra: backup hctosys device"

This reverts commit 8571d12cc54e7e1fea0f63c75b1d00d788016be8.

bug 1731008

Change-Id: I05e7619ac00a93a5eb0ae145ca37ca4d419ecef9
Reviewed-on: http://git-master/r/1012304
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoRevert "rtc: tegra: Register as tegra rtc"
Mrutyunjay Sawant [Tue, 16 Feb 2016 13:10:07 +0000]
Revert "rtc: tegra: Register as tegra rtc"

This reverts commit 0d2c587672445626447df06978548215236ae594.

bug 1731008

Change-Id: I15ad960ef1688724eee97460397ecebbc6f819e8
Reviewed-on: http://git-master/r/1012303
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoRevert "alarm: Use system rtc for alarms"
Mrutyunjay Sawant [Tue, 16 Feb 2016 13:09:53 +0000]
Revert "alarm: Use system rtc for alarms"

This reverts commit 60063a36096ba97a8cefc3607b57fe774df29ea6.

Bug 1731008

Change-Id: I3c2f8726ff48ccd32dd81de5c12b12f21f8b9f89
Reviewed-on: http://git-master/r/1012302
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

3 years agoarm: tegra: set Tegra RTC as hctosys device
Krishna Yarlagadda [Mon, 14 Dec 2015 06:11:01 +0000]
arm: tegra: set Tegra RTC as hctosys device

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

Bug 1698877

Change-Id: Id10d7ca3ea76e622666c58e6fede437013b7bac5
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/922553
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agortc: tegra: backup hctosys device
Krishna Yarlagadda [Mon, 14 Dec 2015 10:15:16 +0000]
rtc: tegra: backup hctosys device

RTC device used for system time needs to be battery backed.
Non-battery backed devices could lose time upon power reset.
However battery backed devices from external source will add delay
from interface and take more time.

Introduced a config option for slower battery backed rtc device that
will update faster system rtc device.

Bug 1698877

Change-Id: Ifd4884335fdd6c6e375f9bd52fb83fb5bb652adc
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/922552
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agortc: tegra: Register as tegra rtc
Krishna Yarlagadda [Thu, 3 Dec 2015 09:45:16 +0000]
rtc: tegra: Register as tegra rtc

Reigster tegra rtc as rtc devices instead of
clocksource

Bug 1698877

Change-Id: I2e5bf7563f8212d1b4b3742440c7e03088835e73
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/840963
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agortc: honor device tree /alias entries when assigning IDs
Stephen Warren [Thu, 23 Jan 2014 23:55:14 +0000]
rtc: honor device tree /alias entries when assigning IDs

Assign RTC device IDs based on device tree /aliases entries if present,
falling back to the existing numbering scheme if there is no /aliases
entry (which includes when the system isn't booted using DT), or there is
a numbering conflict.

This is useful in systems with multiple RTC devices, to ensure that the
best RTC device is selected as /dev/rtc0, which provides the overall
system time.

For example, Tegra has an on-SoC RTC that is not battery backed, typically
coupled with an off-SoC RTC that is battery backed.  Only the latter is
useful for populating the system time, yet the former is useful e.g.  for
wakeup timing, since the time is not lost when the system is sleeps.

Change-Id: Id8b925fb7a8e1b80487a8e246cdc4ce4654abfbe
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 9d2b7e532da8aadfcc1bd85b62ec5dd853e870e3 in mainline v3.14)
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/926525
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agoalarm: Use system rtc for alarms
Krishna Yarlagadda [Wed, 3 Feb 2016 09:26:43 +0000]
alarm: Use system rtc for alarms

Alarm uses first registered rtc device for setting alarm
as of now. Changed this to use system rtc so time and
alarm are in sync

Bug 1698877

Change-Id: I60b249d871b758fb3afeeab960e79e94838264e5
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1002254
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agovideo: tegra: host: Use pure threaded IRQs
Gagan Grover [Tue, 26 Jan 2016 20:08:53 +0000]
video: tegra: host: Use pure threaded IRQs

Threaded IRQs have higher priority than our current workqueue based.
Make our IRQs "pure" threaded IRQs instead of using workqueue gives
us on average 20 us of efficiency.

This CL removes the workqueue logic and replace it with threaded IRQ

Bug 1712814

Change-Id: I80f3c7496504bb58f66ac3b8e664eee6bf86f38c
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/1010885
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>

3 years agoarm: tegra21: dts: update LC898212 focuser path
Frank Chen [Wed, 10 Feb 2016 00:55:11 +0000]
arm: tegra21: dts: update LC898212 focuser path

Corrected device tree node patch for LC898212 focuser

Bug 1700211

Change-Id: I79aa8061fec9898e9905ad712b68f06c0fd9b8f8
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/1010203
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Igor Tryndin <itryndin@nvidia.com>
Reviewed-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Reviewed-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agovideo: tegra: dc: flag modes failing constraints
Ivan Raul Guadarrama [Tue, 8 Dec 2015 14:44:06 +0000]
video: tegra: dc: flag modes failing constraints

-Create the new FB_VMODE_ADJUSTED flag to detect modes
 which fail tegra dc programming constraints and have
 been adjusted by the driver.
-Propagate such flag to userspace.

Bug 1691633
Bug 1689283

Change-Id: I0794c957f2ac821a8747c929aeda82455538cb54
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-on: http://git-master/r/933883
GVS: Gerrit_Virtual_Submit
Reviewed-by: Tuomas Kulve <tkulve@nvidia.com>
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 years agoarm64: config: tegra21: Add CONFIG_HZ=300
David Lock [Thu, 4 Feb 2016 18:32:27 +0000]
arm64: config: tegra21: Add CONFIG_HZ=300

Bug 1695965

Change-Id: I82c338f1fff32b4f79b501948044abe5bfaacc6c
Signed-off-by: David Lock <dlock@nvidia.com>
Reviewed-on: http://git-master/r/1008503
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoARM64: Make HZ configurable
Sai Gurrappadi [Wed, 14 Oct 2015 20:13:44 +0000]
ARM64: Make HZ configurable

The default value of 100HZ is not fast enough for a smooth
user-experience because preemption isn't slick enough.

Let platforms configure HZ via defconfig to suit their needs.

Bug 1695965

Change-Id: I38874e802cc5a796049b57d0622d0c9a9c9b438c
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/818991
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

3 years agothermal: tegra: aotag: fix programming resolution
navneet kumar [Wed, 3 Dec 2014 20:16:30 +0000]
thermal: tegra: aotag: fix programming resolution

Fix the programming resolution for thermA/B to 1/2C.
was 1C previously.

Bug 200057102
Bug 1560086
Bug 1695267

Change-Id: I225331bbe460e456d4057f2817e4615250ad0aa7
Signed-off-by: navneet kumar <navneetk@nvidia.com>
Reviewed-on: http://git-master/r/934675
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srikar Srimath Tirumala <srikars@nvidia.com>
Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com>
(cherry picked from commit b661f642e41558fed866d2a39e35bfd77003f9a4)
Reviewed-on: http://git-master/r/1010048
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoserial: tegra: remove ack dma_desc again
Shardar Shariff Md [Wed, 10 Feb 2016 12:17:46 +0000]
serial: tegra: remove ack dma_desc again

remove acknowledge dma_desc again in
tegra_uart_rx_dma_complete() callback.

Bug 200166733

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

3 years agospi: tegra: support polling mode
Krishna Yarlagadda [Tue, 17 Nov 2015 14:01:22 +0000]
spi: tegra: support polling mode

Added support to use polling mode instead of interrupts
through a property in dt

Bug 1679083

Change-Id: Ic82ab592822cc96bacda05124d38ddd913e09af9
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/840233
Reviewed-on: http://git-master/r/1009988
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agopcie: host: tegra: increase pcie linkup time
Vidya Sagar [Tue, 9 Feb 2016 11:30:13 +0000]
pcie: host: tegra: increase pcie linkup time

increases pcie link up time from its current 100ms
value to 350ms value because of the specific USB3.0 controller
card based on VIA chipset takes around 350ms time to linkup
with rootport. To be at par with x86 machine interms of
device enumeration, this change is required.
Also, this changes comes into picture only if there is a device
found (i.e. only if TX_RDET_STATUS is already set)

Bug 200171635

Change-Id: I1ccdd395467eb78fed59319f1ab9199210d7bd62
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/1009897
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agospi: tegra: Reduce register access
Krishna Yarlagadda [Mon, 8 Feb 2016 13:48:17 +0000]
spi: tegra: Reduce register access

Reduce register accesses to SPI as it is dependent on
slow, variable SPI clock frequency.

Bug 1675619

Change-Id: I5d638b8f95d9207fbad1e30e21234fc7433e03b3
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1009503
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agospi: tegra: option to boost register access
Krishna Yarlagadda [Mon, 8 Feb 2016 11:17:35 +0000]
spi: tegra: option to boost register access

SPI register access for T210 and earlier chips depend
on SPI clock frequency. Provided an option to set SPI
clock at max frequency for register access.

Bug 1675625

Change-Id: Ie52c83cd4602604822462d9f02ddf31ead83aafc
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1009454
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 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>
(cherry picked from commit cb63fa51cab28aa6871fef9e9839e56a688c9e93)
Reviewed-on: http://git-master/r/1010606
Reviewed-by: Steve Rogers <srogers@nvidia.com>

3 years agotegra-alt: amx: allow disabling of AMX slots
Viraj Karandikar [Fri, 5 Feb 2016 09:57:37 +0000]
tegra-alt: amx: allow disabling of AMX slots

AMX slot can be disabled by sending negative value via
Byte Map control.

Bug 200100724

Change-Id: I67d8e0896b739f94187e4401ceb09382a4a7ed8d
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1008822
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Uday Gupta <udayg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>

3 years agov4l2: use _IOC_NR for comparison
Naveen Kumar Rai [Fri, 5 Feb 2016 06:18:51 +0000]
v4l2: use _IOC_NR for comparison

use _IOC_NR for comparison to avoid
mismatch in different enviornments.

Bug 1719828
Bug 200168855

Change-Id: Icbbc43501c006a102018e33a55612fb21e6ab2b5
Signed-off-by: Naveen Kumar Rai <nkumarrai@nvidia.com>
Reviewed-on: http://git-master/r/1008721
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Sharma <rasharma@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agonet: wireless: bcmdhd: Avoid data pkt processing if credits is low
Ramanathan R [Mon, 25 Jan 2016 18:28:47 +0000]
net: wireless: bcmdhd: Avoid data pkt processing if credits is low

When running the EU wifi adaptivity test, ioctl timeouts are
observed as ctrl frames are out of bus credits and do not get sent
to the wifi chip. As a result, the OS resets the wifi chip to recover
the ioctl timeout. This results in EU wifi adaptivity test failure.

To prevent this from happening, avoid processing the data frames if
available credits is low.

Bug 1700549

Change-Id: Iaaf46112b1673088c27bfc5126b874dcdeb82b2d
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: http://git-master/r/936993
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>

3 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
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Santosh Galma <galmar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 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/1009959
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Steve Rogers <srogers@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>

3 years agoARM64: darcy: add camera support
Naveen Kumar Rai [Fri, 5 Feb 2016 03:03:27 +0000]
ARM64: darcy: add camera support

Even Darcy does not have built-in cameras
we still need to create power service device
node for SCF in case user plug in an USB camera.

Bug 1717157

Change-Id: Ic9a9dfcb42f92ed79c60075c1bfbb0d9fa300ac6
Signed-off-by: Naveen Kumar Rai <nkumarrai@nvidia.com>
Reviewed-on: http://git-master/r/1008679
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 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/1007652
GVS: Gerrit_Virtual_Submit
Reviewed-by: Steve Rogers <srogers@nvidia.com>

3 years agogpu: nvgpu: move clean up of jobs to separate worker
Deepak Nibade [Tue, 12 Jan 2016 13:21:37 +0000]
gpu: nvgpu: move clean up of jobs to separate worker

We currently clean up the jobs in gk20a_channel_update()
which is called from nvhost worker thread

Instead of doing this, schedule another delayed worker thread
clean_up_work to clean up the jobs (with delay of 1 jiffies)

Keep update_gp_get() in channel_update() and not in
delayed worker since this will help in better book
keeping of gp_get

Also, this scheduling will help delay job clean-up so
that more number of jobs are batched for clean up
and hence less time is consumed by worker

Bug 1718092

Change-Id: If3b94b6aab93c92da4cf0d1c74aaba756f4cd838
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/931701
(cherry picked from commit 31d3378067e5d184ab9a7b269f4111a90ac76327)
Reviewed-on: http://git-master/r/931707
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoarch: arm64: boot: dts: darcy fixup for SOR config
Martin Gao [Sat, 6 Feb 2016 02:39:55 +0000]
arch: arm64: boot: dts: darcy fixup for SOR config

Added support of SOR instance configurable to darcy dt file

Change-Id: Iebf96d354d4ce26bf9427f57713415d7d45f807e
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/1009137
Reviewed-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Santosh Galma <galmar@nvidia.com>

3 years agoARM64: t210: hawkeye: extend tegra WDT suspend
Laxman Dewangan [Mon, 4 Jan 2016 14:14:16 +0000]
ARM64: t210: hawkeye: extend tegra WDT suspend

Extend tegra WDT suspend to syscore ops to keep running
after device suspend.

bug 200130544

Change-Id: I9ebc3b0a47c3478e44625a5943934efd4b149b1a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/928702
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Tested-by: Gagan Grover <ggrover@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agowatchdog: add support to extend WDT disable on suspend
Laxman Dewangan [Mon, 4 Jan 2016 08:26:13 +0000]
watchdog: add support to extend WDT disable on suspend

Add flag which can be slected from DT to disable the
watchdog in the syscore suspend instead of device
suspend to have more time for WDT running.

Similarly, enable this in syscore resume instead of
device resume.

This helps to recover system from hang even after device
suspend happen.

bug 200130544

Change-Id: Iaeaaeaa9ef2d85e6f750cafaee25fa6f85797b6b
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/928559
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Tested-by: Gagan Grover <ggrover@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agoserial: tegra: acknowledge dma_desc after configuring new transfer
Shardar Shariff Md [Fri, 5 Feb 2016 10:50:49 +0000]
serial: tegra: acknowledge dma_desc after configuring new transfer

acknowlege the rx dma_desc after configuring new transfer
to get new dma_desc for new transfer to avoid issues
of corrupting the dma_desc data(cb_node) when previous
dma_desc is still in progress.

Bug 200166733

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

3 years agousb: gadget: tegra: update vbus status properly
Rakesh Babu Bodla [Wed, 3 Feb 2016 10:37:53 +0000]
usb: gadget: tegra: update vbus status properly

vbus status needs to be set to true, even if
charger is connected.

Bug 200105851

Change-Id: I02a32e9372f526c16b4448cf8ded67ef8fd8c7b2
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/1002306
(cherry picked from commit 458d45cbf0fd1bcf95113166769753ea35deed24)
Reviewed-on: http://git-master/r/1008791
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 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
(cherry picked from commit 4e0c6a5eb7e453fc88c19cbbf6d1ac1d62662243)
Reviewed-on: http://git-master/r/1000939
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>

3 years agovideo: tegra: dc: add VRR capability checks
Daniel Solomon [Fri, 15 Jan 2016 20:17:50 +0000]
video: tegra: dc: add VRR capability checks

On platforms that support VRR, but that run with non-VRR displays,
certain VRR logic was still being activated. Checking for VRR
capability prevents that from happening.

Change-Id: Idb4fc279c3fa0c50ca42335c7f8aae94c401c8aa
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/933276
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agortc: Avoid rtc timer access during shutdown
Krishna Yarlagadda [Wed, 3 Feb 2016 14:09:13 +0000]
rtc: Avoid rtc timer access during shutdown

rtc timer can access rtc hw to stop existing queued
alarms or add new alarm in queue. Preventing this during
shutdown as it could result in failures from access bus.

Bug 1714735

Change-Id: I2529755a30381257f869b90fd4ab63e3352de8df
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1002402
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agovideo: tegra: dc: make SOR instance configurable
Shu Zhong [Fri, 18 Sep 2015 23:53:59 +0000]
video: tegra: dc: make SOR instance configurable

Allow SOR configuration to attach to any DC via
new "nvidia,dc-or-node" DT property. Force DPAUX configuration
to be the same as the SOR instance number.

Bug 1684922

Change-Id: I9df348cdb873cb47d17bf9af9d772326c0a81ecc
Signed-off-by: Shu Zhong <shuz@nvidia.com>
Reviewed-on: http://git-master/r/801569
Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com>
Reviewed-on: http://git-master/r/999318
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agogpu: nvgpu: check power_on before checking gp_get/put
Deepak Nibade [Mon, 11 Jan 2016 10:52:26 +0000]
gpu: nvgpu: check power_on before checking gp_get/put

gk20a_channel_update() runs in worker thread, and it is possible
that we shutdown GPU while this funtion is still running

Hence, check if GPU is on with flag g->power_on before accessing
gp_get/put

Bug 200165480

Change-Id: Ifcff7c60212923966e36f792f550524275aede22
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/931039
(cherry picked from commit 43bef369993b76e4d343c8d48a06315f399b576c)
Reviewed-on: http://git-master/r/1002870
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agogpu: nvgpu: increase wait time during shutdown
Deepak Nibade [Mon, 11 Jan 2016 10:22:28 +0000]
gpu: nvgpu: increase wait time during shutdown

In GPU shutdown path, we currently wait for 2s to allow
all other work to finish.

Increase this time to 5s as a workaround in case
2s is insufficient

This commit should be reverted once proper fixes are merged

Bug 200165480

Change-Id: I1bb99568235c327dab53114afb902507fb5f0792
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/931024
(cherry picked from commit 4d1baeff1ace5a03ee15ec1c27081d328c21f739)
Reviewed-on: http://git-master/r/1002869
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoARM64: dts: Correct mclk_multiplier for OV5693
Sudhir Vyas [Wed, 3 Feb 2016 23:14:06 +0000]
ARM64: dts: Correct mclk_multiplier for OV5693

Correct mclk_multiplier for OV5693 modes, on all
the platforms, its being used.

Bug 200167152

Change-Id: Iac51ef9e1ac51c7d780ef618f0c28f4eddd2ead5
Signed-off-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-on: http://git-master/r/1002635
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoARM64: DT: plugin-manager support for camera board
Frank Chen [Sat, 9 Jan 2016 02:03:28 +0000]
ARM64: DT: plugin-manager support for camera board

Add plugin-manager support for camera board. This will
be used to detect the camera board in the system

Bug 1705808

Change-Id: I83e3658e49aa3464d9f7b692bbbad7f4e32429bc
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/933398
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agoplatform: tegra: skip disabled V4L2 graph nodes
Frank Chen [Mon, 18 Jan 2016 22:39:01 +0000]
platform: tegra: skip disabled V4L2 graph nodes

Add support for camera board auto detect by skipping
disabled nodes.

Bug 1705808

Change-Id: Ib360e986b5ded02624dd0a7e2f1936793b1ef199
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/933983
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agoRevert "arch: dt: Disable periodic-calibration"
Anubhav jain [Thu, 8 Oct 2015 12:33:10 +0000]
Revert "arch: dt: Disable periodic-calibration"

This reverts commit 8115919a5e4d4903e81a756c2601bef86fc1e534.

As WAT tests failure (bug 200134543) was suspected due to auto-calibration,
it was disabled. However as it is proven with sufficient testing that
this is not the cause, reverting the patch

Bug 200165216

Change-Id: I3eb17726a8d6db777a04d2e1c4cfdeec278a28c6
Signed-off-by: Anubhav jain <anubhavj@nvidia.com>
Reviewed-on: http://git-master/r/1002055
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

3 years agoPM/Domain: propogate genpd_start_dev return value
Viraj Karandikar [Mon, 1 Feb 2016 09:12:50 +0000]
PM/Domain: propogate genpd_start_dev return value

Return value of genpd_start_dev() was ignored. This was resulting
in success being reported in pm_runtime_get_sync() even in case
of failure.

Bug 200149702

Change-Id: I12a348060304fffd2f91c9d15e31130775611eb6
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1000751
(cherry picked from commit 5950e2505f8886ff576eeafa99cd86fd231fe4fe)
Reviewed-on: http://git-master/r/1001471
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agovideo: tegra: nvmap: Optimize rw_handle
Sri Krishna chowdary [Mon, 11 Jan 2016 14:09:48 +0000]
video: tegra: nvmap: Optimize rw_handle

For handles with heap_pgalloc as true, get_page()/put_page() for each
page in handle takes a substantial amount of time. It was noted that
for a 32 MB buffer, with and without these calls the difference was
about 6 msec. So, use h->vaddr virtual mappings and avoid these calls.

Also, another 1 msec saving for 32 MB buffers can be achieved by
using cache maintenance operations by set/ways for such large buffers.

Essentially we optimize the NVMAP_IOC_READ/NVMAP_IOC_WRTIE ioctls.
So, any user space modules which use these calls are benefitted.

Bug 200092803

Change-Id: I36ef67d4472656692c581ae9a4d490dee568fd83
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/1000860
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

3 years agowatchdog: max77620: fix GETTIMEOUT in ioctl
Jeetesh Burman [Tue, 12 Jan 2016 07:07:06 +0000]
watchdog: max77620: fix GETTIMEOUT in ioctl

to fix GETTIMEOUT from user apps, set default or requested timeout to
"timeout" member of "struct watchdog_device", so that this value can
be read from ioctl cmd i.e GETTIMEOUT.

Bug 200160105

Change-Id: Ia0b48de5d1236d918b30ab386015c043f0d02042
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/931535
(cherry picked from commit 55d2fddf22d8b9549c706bd61ce3cffba2affaf3)
Reviewed-on: http://git-master/r/932607
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agoarm64: dts: rename timeout to boot-timeout in wdt
Jeetesh Burman [Mon, 28 Dec 2015 05:18:16 +0000]
arm64: dts: rename timeout to boot-timeout in wdt

"timeout" has been replaced with "boot-timeout" in max77620_wdt.c,
hence changing "timeout" property under "watchdog" node to "boot-timeout".

Bug 200160105

Change-Id: I81d306c2b15f105782cee491275df7963748e9c5
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/927014
(cherry picked from commit f9d1e67c087c653e6aec45504c3bd850ed366602)
Reviewed-on: http://git-master/r/932605
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agopcie: host: tegra: optimize PCIe linkup check
Vidya Sagar [Mon, 25 Jan 2016 10:42:44 +0000]
pcie: host: tegra: optimize PCIe linkup check

optimizes pcie link up checking process by initially waiting
for 20ms for UPHY lane's TX_RDET_STATUS to get set if there is any
end point connected, thereby avoiding any further waiting for linkup
on root ports

Bug 200165778
Bug 200163241

Change-Id: I2805af37e2fdf4d16f0233dbb7a44b2f8d3565b3
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/936894
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agomm: vmscan: fix wakeup_kswapd's per zone disable logic
Sri Krishna chowdary [Mon, 30 Nov 2015 10:30:58 +0000]
mm: vmscan: fix wakeup_kswapd's per zone disable logic

While wakeup_kswapd's first parameter represents the current zone
for which allocation logic is trying to wake kswapd for, the
per zone wake up disable logic was using just the preferred zone's
idx to prevent kswapd from wake up.
This is incorrect. Consider a case where preferred zone is ZONE_HIGHMEM
but current zone is ZONE_NORMAL. Ideally this logic should be bypassed
as request is for ZONE_NORMAL but it is not.

So, even though there is a need for kswapd to reclaim memory for an
allocation, it does not do so. This has serious side effects and in some
cases hang as well.

zonelist describes the allowed zones for the current allocation. Allow
scan on only the lowest zone in the zonelist to fix logic and avoid such
incorrect behaviour.

Bug 200130931
Bug 200105279

Change-Id: Iaca11ccf0404dd16ebb9266c64b40293b99eb96e
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/839001
Reviewed-on: http://git-master/r/936109
(cherry picked from commit 084b2ddd8c0a107fdb9618853b742d7607d69efb)
Reviewed-on: http://git-master/r/1000491
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoarm64: dts: Add Darcy-A04 DTB and support for XPU
Anshul Jain [Mon, 25 Jan 2016 20:43:36 +0000]
arm64: dts: Add Darcy-A04 DTB and support for XPU

Add Darcy-A04 DTB and tegra-joint_xpu_rails flag that is used to
identify whether GPU/CPU rails are merged or not.

Bug 1722942

Change-Id: I9ec084a70712edb9fbedb49ded33e93b9cbc602c
Signed-off-by: Anshul Jain <anshulj@nvidia.com>
Reviewed-on: http://git-master/r/937027
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agogpu: nvgpu: Add support for XPU rail split
Anshul Jain [Mon, 25 Jan 2016 20:42:11 +0000]
gpu: nvgpu: Add support for XPU rail split

Check if CPU/GPU rails are joint, disable railgating if they are.

Bug 1722942

Change-Id: I002488f6418805569b0ef0fc3032b58297adeafb
Signed-off-by: Anshul Jain <anshulj@nvidia.com>
Reviewed-on: http://git-master/r/937026
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoARM64:dts: do not use IN->US country code mapping
Om Prakash Singh [Wed, 20 Jan 2016 12:14:11 +0000]
ARM64:dts: 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: Ia38f2948f0c77444785ac693abf3eb480deac212
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/935717
(cherry picked from commit 4e01c2ad561968fc3c63b14656b37ed377569e85)
Reviewed-on: http://git-master/r/999448
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 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/935103
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/999445

3 years agoplatform: tegra: padctl: reduce usb pad unnecessary print
Kerwin Wan [Fri, 29 Jan 2016 13:02:06 +0000]
platform: tegra: padctl: reduce usb pad unnecessary print

Only print the information in debug mode to reduce kernel resume
time.

Bug 200088740

Change-Id: I1d339e67eec941ee880dbb5c0126da35a909e60e
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/1000040
Reviewed-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: Ajay Gupta <ajayg@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years ago[media] v4l: vb2-dma-contig: fix vb2_get_vma()
Sri Krishna chowdary [Tue, 12 Jan 2016 10:24:08 +0000]
[media] v4l: vb2-dma-contig: fix vb2_get_vma()

nvmap expects that same VMA is opened and closed to disallow
memory leaks. So, nvmap panics if a previously non-existent vma
is being closed through it.

Hence modify the sequence in vb2_get_vma() to
open the vma_copy before returning it. This way nvmap sees that
the vma_copy exists in its list and will close the vma.

Bug 200164002

Change-Id: I45dfb8ca710375a0e70d9802ebdcc9fd4d0b4600
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/931997
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Shi <fshi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoRevert "arch: arm: tegra: configs: enable SMMU in PCIe"
Martin Gao [Fri, 29 Jan 2016 18:31:57 +0000]
Revert "arch: arm: tegra: configs: enable SMMU in PCIe"

This reverts commit a5808b219bbe67da936908efa4e9a0ad73c88ff4.

Bug 200168018

Change-Id: I039d2bc487363fc14c89f6102946730d18f868ba
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/1000114
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agoiommu/tegra: of: disable IOMMU PCIe temporary
Hiroshi Doyu [Wed, 15 Oct 2014 00:42:28 +0000]
iommu/tegra: of: disable IOMMU PCIe temporary

HACK: Disable IOMMU PCIe till dynamic loadable module issue is solved.

Bug 1561604
Bug 200168018

Change-Id: Id0960a4e7f6001175cc6dc21b8403d2865e51a1c
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/998410
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

3 years agovideo: tegra: host:Use master in sync_writel/readl
Gagan Grover [Tue, 29 Dec 2015 05:04:59 +0000]
video: tegra: host:Use master in sync_writel/readl

Originally host1x_sync_writel and host1x_sync_readl were taking
platform device as an argument and then converting it to
nvhost_master to get access to sync_aperture, which was causing
more number of instructions execution and hence higher execution
time (~5us). While, the calling functions directly have
nvhost_master available.
Passing nvhost_master directly to sync_readl/writel reduces the
number of instructions and hence the execution time is reduced
to < 1us (~ .5us).

Bug 1650536

Change-Id: Id4e1b19d2ff9c51d19f5e659c13b95209ef34908
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/927643
(cherry picked from commit 679d431d9b0aaac50934e57d7d65c4e33e1635f6)
Reviewed-on: http://git-master/r/927298
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>

3 years agodvfs: tegra21: Add support for XPU rail split
Anshul Jain [Mon, 25 Jan 2016 20:40:49 +0000]
dvfs: tegra21: Add support for XPU rail split

Add support to read the CPU and GPU rail status from DTB.

Bug 1722942

Change-Id: I4f85b57ba6370b199c1e8526363345c109de6258
Signed-off-by: Anshul Jain <anshulj@nvidia.com>
Reviewed-on: http://git-master/r/937025
Reviewed-by: Vinayak Pane <vpane@nvidia.com>

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

Bug 1723199

Change-Id: I3daa33a11d813a680fd3319c0223ec5bdb394b00
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/937396
(cherry picked from commit 55390f02db2c7419c09abf515beea9368965353b)
Reviewed-on: http://git-master/r/998914
GVS: Gerrit_Virtual_Submit

3 years agoARM:tegra: enable F2FS filesystem support
Ian Chang [Tue, 26 Jan 2016 06:58:24 +0000]
ARM:tegra: enable F2FS filesystem support

Enable CONFIG_F2FS_FS for T124/T210 platform

bug 200169356

Change-Id: I61dcf958a0151aebd763ce7fc2d892e405b3f0e7
Signed-off-by: Ian Chang <ianc@nvidia.com>
Reviewed-on: http://git-master/r/937193
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoMerge "Merge branch 'dev/dev-kernel-f2fs-bringup' into HEAD" into rel-24
mobile promotions [Thu, 28 Jan 2016 18:34:39 +0000]
Merge "Merge branch 'dev/dev-kernel-f2fs-bringup' into HEAD" into rel-24

3 years agoata: ahci: t210: sata pad pll reset
TW Chiu [Thu, 14 Jan 2016 08:07:59 +0000]
ata: ahci: t210: sata pad pll reset

SATA UPHY PLL is initialized in SW and put into HW control.
SW don't need to reset this PLL during RTPM as this may
disable HW control.

Bug 200155282

DEPENDS ON: < None >

Change-Id: I2ff7e8ff879286e60e22a5c04d7d8bcc21475474
Signed-off-by: TW Chiu <twchiu@nvidia.com>
Reviewed-on: http://git-master/r/932570
(cherry picked from commit 4ef4428247be136a565c72d7e5fb16284c211433)
Reviewed-on: http://git-master/r/998624
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

3 years agodrivers: video: Fix hsync/vsync polarity
Aly Hirani [Wed, 13 Jan 2016 22:46:16 +0000]
drivers: video: Fix hsync/vsync polarity

The fbmon driver has had the HSYNC/VSYNC polarity swapped since the
beginning. HSYNC_POSITIVE should be read from 0x2 and VSYNC_POSITIVE
should be read from 0x4 from the FLAGS. fbmon has had this apparently
swapped.

Refer to Table 3.22 in the E-EDID v1.4 spec.

Change-Id: Ibae0f8307eb4c757ddc93748a1372163216f99a5
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/932849
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 years agovideo: tegra: host: Make syncpt_thresh_cascade_fn realtime
David Lock [Tue, 10 Nov 2015 00:15:04 +0000]
video: tegra: host: Make syncpt_thresh_cascade_fn realtime

Promote the syncpt_thresh_cascade_fn workqueue to a kthread and set
it's priority to realtime.  This removes scheduling latency as a
potential bottleneck for syncpoint latency.

Bug 200121259

Change-Id: I42ed37621e5430853f323e8e4bcd18019c77c92d
Signed-off-by: David Lock <dlock@nvidia.com>
Reviewed-on: http://git-master/r/830995
Reviewed-by: Jonathan Mccaffrey <jmccaffrey@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 years agonvtouch: interface for manual tuning
Aaron Bartholomew [Thu, 21 Jan 2016 00:28:55 +0000]
nvtouch: interface for manual tuning

adds tune_debug & tune_param debug nodes for testing tuning
functionality between nvtouch userspace & kernel

info passed over nvtouch_ioctl.driver_config

Change-Id: I2624f731e535fe8e9df58c1fc3735e54ce835992
Signed-off-by: Aaron Bartholomew <abartholomew@nvidia.com>
Reviewed-on: http://git-master/r/935407
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vincent Chen <zochen@nvidia.com>
Reviewed-by: Steve Rogers <srogers@nvidia.com>

3 years agoarm: dts: t124: disable dtb support for wifi
Om Prakash Singh [Tue, 19 Jan 2016 10:55:20 +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
(cherry picked from commit 4af65c50620bdb6507f7f2c16470ad77eaf5b0cb)
Reviewed-on: http://git-master/r/934470
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 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
(cherry picked from commit de4d9c5be4f395445e49d1f2c838fe983d9b812b)
Reviewed-on: http://git-master/r/928620
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/934050

3 years agommc: sdhci: Increase SW time out value for sanitize command.
Naveen Kumar Arepalli [Wed, 20 Jan 2016 05:36:55 +0000]
mmc: sdhci: Increase SW time out value for sanitize command.

->As per eMMC part data sheet, worst case time out value for
sanitize command is 8 mins.
->Increase SW time out value to 600 seconds for
sanitize command.

Bug 200137087

Change-Id: Ia7397cdb93542f16f4041ff388501f534ecaf56c
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/934880
(cherry picked from commit 0c22e4fdd465585d0253f946fc57fd96de09f0ee)
Reviewed-on: http://git-master/r/936929
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

3 years agoarch: arm64: config: Add IMX219 support
Frank Chen [Fri, 13 Nov 2015 22:21:55 +0000]
arch: arm64: config: Add IMX219 support

Add IMX219 sensor support

Bug 1654140

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

3 years agoarm64: dts: add e3322 6 camera support
Frank Chen [Thu, 18 Jun 2015 22:36:24 +0000]
arm64: dts: add e3322 6 camera support

6 camera board e3322 contains 6 imx219
Add DTS support for both Jetson CV

Based on changes from Bryan Wu <pengw@nvidia.com>
and David Wang <davidw@nvidia.com>.

Bug 1654140.

Change-Id: I8922d6b6ff805ab6c659c5ae1dcf2e679ee94d50
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/932997
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Bryan Wu <pengw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agomedia: add V4L2 sensor driver for IMX219
Frank Chen [Fri, 13 Nov 2015 22:17:31 +0000]
media: add V4L2 sensor driver for IMX219

Based on changes from Bryan Wu <pengw@nvidia.com>.

Bug 1654140

Change-Id: Ib045310f86eba6bc48cb0f2315077dfc31bc2fbd
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/932996
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Bryan Wu <pengw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agoi2c: tegra-vi: enable runtime PM before register devices
Daniel Fu [Fri, 3 Jul 2015 22:15:25 +0000]
i2c: tegra-vi: enable runtime PM before register devices

Child devices may use i2c bus in driver probe.
Runtime PM should be enabled before register child devices.
Or it will cause pm_runtime_get_sync() with -EACCES failure in i2c
transfer & devices probe failure.

Bug 1654140

Change-Id: Ic92ab34baab06d7146d8f67c2be324209b2f1ec4
Signed-off-by: Daniel Fu <danifu@nvidia.com>
Reviewed-on: http://git-master/r/766320
(cherry picked from commit 139b57d003be55d78660ca7202de2fc09c12ad54)
Reviewed-on: http://git-master/r/926650
Tested-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Bryan Wu <pengw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agoMerge branch 'dev/dev-kernel-f2fs-bringup' into HEAD
Ian Chang [Wed, 27 Jan 2016 10:28:17 +0000]
Merge branch 'dev/dev-kernel-f2fs-bringup' into HEAD

bug 200169356

Change-Id: I02e4eb30c427b0ba09c122ce9692ae509a3bf85c
Signed-off-by: Ian Chang <ianc@nvidia.com>

3 years agobackport llist_for_each_entry_safe from 3.14 to 3.10
Peter Hurley [Sat, 15 Jun 2013 13:36:06 +0000]
backport llist_for_each_entry_safe from 3.14 to 3.10

comes from 809850b7a5fcc0a96d023e1171a7944c60fd5a71
  tty: Use lockless flip buffer free list

Change-Id: Ieed87861d7d1ead741390a121dd54f6783875b8b
Signed-off-by: JP Abgrall <jpa@google.com>

3 years agollists: move llist_reverse_order from raid5 to llist.c
Christoph Hellwig [Thu, 14 Nov 2013 22:32:11 +0000]
llists: move llist_reverse_order from raid5 to llist.c

Make this useful helper available for other users.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Conflicts:
drivers/md/raid5.c

Change-Id: Ibfc31e7289ffe9bda511c88543bc2deb70a4691b

3 years agoRevert "f2fs: support ->tmpfile()"
Daniel Rosenberg [Fri, 28 Aug 2015 22:16:02 +0000]
Revert "f2fs: support ->tmpfile()"

This reverts commit 1991ae04eaf30c09967fe83dd5907979fba0d201.

Bug: 23520714
Change-Id: Ib7ea2f7f67b076aa67e8685ec5ba4f5396daa0de

3 years agof2fs: Add missing call to trace_f2fs_write_begin.
Mohamad Ayyash [Thu, 13 Nov 2014 20:47:01 +0000]
f2fs: Add missing call to trace_f2fs_write_begin.

Change-Id: Ie0240ee40c24ef25dc983f8c2929b083fc2a3a54
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
(cherry picked from commit be45938aceaa891845499ae7583773a2f5516e23)

3 years agofs:f2fs: only remount ro if panic was not invoked
JP Abgrall [Fri, 10 Oct 2014 20:04:37 +0000]
fs:f2fs: only remount ro if panic was not invoked

If f2fs is mounted as errors=panics it will not panic, and instead
remount as MS_RDONLY.

Change-Id: I89e2a8d744f9e6927fc1c2da2064c5cc13f6f597
Signed-off-by: Yu chen Yu <jessica_yu@htc.com>

Conflicts:
fs/f2fs/segment.c

3 years agof2fs: support 3.10
Jaegeuk Kim [Wed, 1 Oct 2014 00:16:11 +0000]
f2fs: support 3.10

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Conflicts:
fs/f2fs/acl.c
fs/f2fs/data.c
fs/f2fs/namei.c

Change-Id: I2ddd2d07320c3076d3ae052f78fa02adf42c2d46

3 years agof2fs: potential shift wrapping buf in f2fs_trim_fs()
Dan Carpenter [Thu, 25 Sep 2014 11:39:17 +0000]
f2fs: potential shift wrapping buf in f2fs_trim_fs()

My static checker complains that segment is a u64 but only the lower 31
bits can be used before we hit a shift wrapping bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: call f2fs_unlock_op after error was handled
Jaegeuk Kim [Thu, 25 Sep 2014 18:55:53 +0000]
f2fs: call f2fs_unlock_op after error was handled

This patch relocates f2fs_unlock_op in every directory operations to be called
after any error was processed.
Otherwise, the checkpoint can be entered with valid node ids without its
dentry when -ENOSPC is occurred.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: clean up f2fs_ioctl functions
Jaegeuk Kim [Wed, 24 Sep 2014 22:37:02 +0000]
f2fs: clean up f2fs_ioctl functions

This patch cleans up f2fs_ioctl functions for better readability.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: support atomic_write feature for database
Jaegeuk Kim [Wed, 24 Sep 2014 00:52:40 +0000]
f2fs: support atomic_write feature for database

This patch introduces a very limited functionality for atomic write support.
In order to support atomic write, this patch adds two ioctls:
 o F2FS_IOC_ATOMIC_WRITE
 o F2FS_IOC_ATOMIC_COMMIT

For F2FS_IOC_ATOMIC_WRITE, this patch introduces a data structure to communicate
with applications.

struct atmoic_w {
u64 aid; /* atomic write id */
const char __user *buf; /* user data */
u64 count; /* size to update */
u64 pos; /* file offset */
};

This is almost same as write() system call, and application can easily submit
any atomic data by calling
  f2fs_ioctl(fd, F2FS_IOC_ATOMIC_WRITE, struct atomic_w *);

Then, data's page indices are recorded in the linked list, atomic_range list.
Later, f2fs_ioctl(fd, F2FS_IOC_ATOMIC_COMMIT, aid) trigger will flush all the
previous atomic data to the storage, which will be shown all or nothing by
f2fs recovery procedure.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: check the use of macros on block counts and addresses
Jaegeuk Kim [Tue, 23 Sep 2014 18:23:01 +0000]
f2fs: check the use of macros on block counts and addresses

This patch cleans up the existing and new macros for readability.

Rule is like this.

         ,-----------------------------------------> MAX_BLKADDR -,
         |  ,------------- TOTAL_BLKS ----------------------------,
         |  |                                                     |
         |  ,- seg0_blkaddr   ,----- sit/nat/ssa/main blkaddress  |
block    |  | (SEG0_BLKADDR)  | | | |   (e.g., MAIN_BLKADDR)      |
address  0..x................ a b c d .............................
            |                                                     |
global seg# 0...................... m .............................
            |                       |                             |
            |                       `------- MAIN_SEGS -----------'
            `-------------- TOTAL_SEGS ---------------------------'
                                    |                             |
 seg#                               0..........xx..................

= Note =
 o GET_SEGNO_FROM_SEG0 : blk address -> global segno
 o GET_SEGNO           : blk address -> segno
 o START_BLOCK         : segno -> starting block address

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: refactor flush_nat_entries to remove costly reorganizing ops
Jaegeuk Kim [Mon, 22 Sep 2014 18:40:48 +0000]
f2fs: refactor flush_nat_entries to remove costly reorganizing ops

Previously, f2fs tries to reorganize the dirty nat entries into multiple sets
according to its nid ranges. This can improve the flushing nat pages, however,
if there are a lot of cached nat entries, it becomes a bottleneck.

This patch introduces a new set management flow by removing dirty nat list and
adding a series of set operations when the nat entry becomes dirty.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: introduce FITRIM in f2fs_ioctl
Jaegeuk Kim [Sun, 21 Sep 2014 05:06:39 +0000]
f2fs: introduce FITRIM in f2fs_ioctl

This patch introduces FITRIM in f2fs_ioctl.
In this case, f2fs will issue small discards and prefree discards as many as
possible for the given area.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: introduce cp_control structure
Jaegeuk Kim [Sun, 21 Sep 2014 04:57:51 +0000]
f2fs: introduce cp_control structure

This patch add a new data structure to control checkpoint parameters.
Currently, it presents the reason of checkpoint such as is_umount and normal
sync.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Conflicts:
fs/f2fs/recovery.c

Change-Id: I6520d43626485cea428d3ba73609ab4aa0a32036

3 years agof2fs: use more free segments until SSR is activated
Jaegeuk Kim [Thu, 18 Sep 2014 00:52:58 +0000]
f2fs: use more free segments until SSR is activated

Previously, f2fs activates SSR if the # of free segments reaches to the # of
overprovisioned segments.
In this case, SSR starts to use dirty segments only, so that the overprovisoned
space cannot be selected for new data.
This means that we have no chance to utilizae the overprovisioned space at all.

This patch fixes that by allowing LFS allocations until the # of free segments
reaches to the last threshold, reserved space.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: change the ipu_policy option to enable combinations
Jaegeuk Kim [Wed, 17 Sep 2014 01:30:54 +0000]
f2fs: change the ipu_policy option to enable combinations

This patch changes the ipu_policy setting to use any combination of orthogonal policies.

Signed-off-by: Changman Lee <cm224.lee@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: fix to search whole dirty segmap when get_victim
Chao Yu [Mon, 15 Sep 2014 10:05:44 +0000]
f2fs: fix to search whole dirty segmap when get_victim

In ->get_victim we get max_search value from dirty_i->nr_dirty without
protection of seglist_lock, after that, nr_dirty can be increased/decreased
before we hold seglist_lock lock.
Then in main loop we attempt to traverse all dirty section one time to find
victim section, but it's not accurate to use max_search as the total loop count,
because we might lose checking several sections or check sections redundantly
for the case of nr_dirty are increased or decreased previously.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: fix to clean previous mount option when remount_fs
Chao Yu [Mon, 15 Sep 2014 10:04:44 +0000]
f2fs: fix to clean previous mount option when remount_fs

In manual of mount, we descript remount as below:

"mount -o remount,rw /dev/foo /dir
After  this call all old mount options are replaced and arbitrary stuff from
fstab is ignored, except the loop= option which is internally generated and
maintained by the mount command."

Previously f2fs do not clear up old mount options when remount_fs, so we have no
chance of disabling previous option (e.g. flush_merge). Fix it.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: skip punching hole in special condition
Chao Yu [Mon, 15 Sep 2014 10:03:32 +0000]
f2fs: skip punching hole in special condition

Now punching hole in directory is not supported in f2fs, so let's limit file
type in punch_hole().

In addition, in punch_hole if offset is exceed file size, we should skip
punching hole.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: support large sector size
Chao Yu [Mon, 15 Sep 2014 10:01:10 +0000]
f2fs: support large sector size

Block size in f2fs is 4096 bytes, so theoretically, f2fs can support 4096 bytes
sector device at maximum. But now f2fs only support 512 bytes size sector, so
block device such as zRAM which uses page cache as its block storage space will
not be mounted successfully as mismatch between sector size of zRAM and sector
size of f2fs supported.

In this patch we support large sector size in f2fs, so block device with sector
size of 512/1024/2048/4096 bytes can be supported in f2fs.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Conflicts:
fs/f2fs/data.c

Change-Id: I32fa56de8f9b50b3a6f0daa930a86f6c027d94e1

3 years agof2fs: fix to truncate blocks past EOF in ->setattr
Chao Yu [Mon, 15 Sep 2014 10:02:09 +0000]
f2fs: fix to truncate blocks past EOF in ->setattr

By using FALLOC_FL_KEEP_SIZE in ->fallocate of f2fs, we can fallocate block past
EOF without changing i_size of inode. These blocks past EOF will not be
truncated in ->setattr as we truncate them only when change the file size.

We should give a chance to truncate blocks out of filesize in setattr().

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Conflicts:
fs/f2fs/file.c

Change-Id: I1fe5d45d3770a810f7e1101b3a34a97d2c52ec03

3 years agof2fs: update i_size when __allocate_data_block
Jaegeuk Kim [Tue, 16 Sep 2014 02:32:16 +0000]
f2fs: update i_size when __allocate_data_block

The f2fs_direct_IO uses __allocate_data_block, but inside the allocation path,
we should update i_size at the changed time to update its inode page.
Otherwise, we can get wrong i_size after roll-forward recovery.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

3 years agof2fs: use MAX_BIO_BLOCKS(sbi)
Jaegeuk Kim [Mon, 22 Sep 2014 23:21:07 +0000]
f2fs: use MAX_BIO_BLOCKS(sbi)

This patch cleans up a simple macro.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>