]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/log
sojka/nv-tegra/linux-3.10.git
8 years agoarch: arm64: configs: Fix garbled console-ramoops
Gaurav Singh [Mon, 30 Nov 2015 08:35:53 +0000 (14:05 +0530)]
arch: arm64: configs: Fix garbled console-ramoops

Add required configs so that soft reset is done and
only PMIC gets reset not RAM.

Bug 200141646

Change-Id: Id472188113d1e706d09a3ee443286ba5dacd3234
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/838871
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
8 years agomedia: soc_camera: vi2: support gang mode
Ahung Cheng [Fri, 11 Dec 2015 17:40:30 +0000 (01:40 +0800)]
media: soc_camera: vi2: support gang mode

- Support combination L|R, R|L, TB|, B|T
- Add gang_mode support for TC358840

Bug 200113762

Change-Id: I8dd8f1e6724ed7579c51a72364f2fcc5cb224367
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/922015
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agomedia: soc_camera: add tc358840 v4l2 driver
Frank Shi [Fri, 11 Dec 2015 09:56:48 +0000 (17:56 +0800)]
media: soc_camera: add tc358840 v4l2 driver

Add TC358840 V4l2 driver
- support 1080p and 4K HDMI-in
- support UYVY and RGB888
- support hotplug detection
- support resolution select

Bug 200113762

Change-Id: I3921e8f0b679ac99d0e7df6193d7080795d3b673
Signed-off-by: Frank Shi <fshi@nvidia.com>
Reviewed-on: http://git-master/r/921825
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agomedia: soc-camera: actually use default resolution
Ahung Cheng [Thu, 17 Dec 2015 10:46:24 +0000 (18:46 +0800)]
media: soc-camera: actually use default resolution

Return default resolution in case no matched format

Bug 200113762

Change-Id: Idf10c35c122b5f42a9349367379a269d8ef7ce25
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/924218
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agomedia: tegra_camera: fix syncpoint time out issue
Bryan Wu [Thu, 10 Dec 2015 21:53:40 +0000 (13:53 -0800)]
media: tegra_camera: fix syncpoint time out issue

The pixel parser is reset in each call to vi2_channel_capture_done()
and then the VI is not well configured anymore for next incoming
frames. By removing this reset, the capture is working again.

However, the second thread (for done buffer process) is woken up too
soon and the stream is corrupted: the buffer contains a mix of the
last and new frame captured. In order to remove this effect, the
wake_up_interruptible(&chan->done_wait) call should be done later, just
after the wait of FRAME_START syncpoint. It permits to wait that the
FRAME_START occurs before enabling and waiting the MW_ACK_DONE
syncpoint.

Bug 1705779

Change-Id: I561e2fb191426abfa358a689985540f0ca8f35b8
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/922773
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agovideo: tegra: dc: enable YUV 1000/1001 modes
Pekka Väänänen [Thu, 27 Aug 2015 15:03:41 +0000 (18:03 +0300)]
video: tegra: dc: enable YUV 1000/1001 modes

YUV modes' refresh rates are not nice multiples of 1000.
That means we need an epsilon check to generate 1000/1001 modes
correctly. Since we now match more modes than before, the mode list
needs to be larger too.

Change-Id: I49c4c65651bde2f272af98a10cd8a47e2b03022c
Signed-off-by: Pekka Väänänen <pvaananen@nvidia.com>
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/790400
(cherry picked from commit f97d6e06214b6216aea71d2f5c078183973ef0e3)
Reviewed-on: http://git-master/r/839408
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agovideo: tegra: dc: enable 1000/1001 modes
Aly Hirani [Tue, 18 Aug 2015 09:48:42 +0000 (02:48 -0700)]
video: tegra: dc: enable 1000/1001 modes

This change enables the 1000/1001 modes for T210. On T210, we have a fractional
divider available for DC. This allows us to generate pclks almost closely
accurate to the common 1000/1001 modes such as 23.976, 29.97 and 59.94 Hz.

This change:

1. Adds a new VMODE flag to signify modes which are * 1000 / 1001
2. Filters exclusively for 24/30/60 Hz modes in the EDID parser, duplicates
   these modes and changes them to be the 1000 / 1001 modes
3. Changes the dc pclk calculation to take into account these modes during the
   rounding

Bug 200111432

Change-Id: I2cc762b2338ce5662d85891859327015e88b670b
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/786281
(cherry picked from commit 2879633052ba8329bc9373f694fa7bcd4ee59d37)
Reviewed-on: http://git-master/r/839407
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agovideo: tegra: dc: update VIC identification
Naveen Kumar S [Thu, 26 Nov 2015 09:55:39 +0000 (15:25 +0530)]
video: tegra: dc: update VIC identification

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

bug 200148145
bug 200145631
bug 1689283
bug 200154490

Change-Id: Ia80ba4dd3337772b24b74ee355a1032d59b31d9d
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/838452
(cherry picked from commit 1ee939ea33c893a5b98652cef4d0fae5c7f25c32)
Reviewed-on: http://git-master/r/839223
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

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

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

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

Bug 200148145
Bug 200145631
Bug 1689283
Bug 200154490

Change-Id: I3742b4d090c26d6c1fc3e2f4af44fd1389079d1a
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/837681
(cherry picked from commit 2046174796fc8ad124b7b34d641ed5acf9f5640c)
Reviewed-on: http://git-master/r/839208
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

8 years agop2360: Build RTC as module
Vipin Kumar [Fri, 27 Nov 2015 08:08:47 +0000 (13:38 +0530)]
p2360: Build RTC as module

max77620 rtc takes significant time (~60 ms) for probe. Build
rtc-max77620 as module and insert it after EVA is done

bug 200156862

Change-Id: I942be0d00ca2174ebcc9f03efb48b16a75945fa5
Signed-off-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-on: http://git-master/r/838856
(cherry picked from commit 11ad7fe0f2969ab5728800cd565818447ecd2c13)
Reviewed-on: http://git-master/r/839112
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
8 years agoRevert "arm64: dts: t210: update jetson cpu-emc table"
Emad Mir [Wed, 16 Dec 2015 23:56:33 +0000 (15:56 -0800)]
Revert "arm64: dts: t210: update jetson cpu-emc table"

This reverts commit 126292a1aa1b602ede9b5a4484a3a6f129409b96.

Change-Id: I6b0ab54fcbb4caf4a9f2ea34e4ea76ac29461ff4
Reviewed-on: http://git-master/r/923871
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agobindings: mmc: tegra: correct KSO mode dump
Bitan Biswas [Wed, 16 Dec 2015 07:15:41 +0000 (12:45 +0530)]
bindings: mmc: tegra: correct KSO mode dump

Updated bindings file with correct spelling of
KSO dump disable attribute

bug 200161173
bug 200138403

Change-Id: I8246926a17a6d23dbe31871e5e2486a110af1d53
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/923485
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agoARM64: DT: tegra21: correct KSO dump disable
Bitan Biswas [Tue, 15 Dec 2015 05:36:49 +0000 (11:06 +0530)]
ARM64: DT: tegra21: correct KSO dump disable

Correct spelling of attribute to disable KSO
register dump for sdmmc.

bug 200161173
bug 200138403

Change-Id: I506d87fee955fc0db924beffa35a0d77fe424985
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/922884
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agoarm64: dts: t210: update jetson cpu-emc table
Terry Wang [Fri, 28 Aug 2015 10:03:08 +0000 (10:03 +0000)]
arm64: dts: t210: update jetson cpu-emc table

updated jetson cpu-to-emc ratio table based on loki-e
to optimize power and performance.

Bug 200146718

Change-Id: Icd6aad5b27a6c36a7ec598be87f051fa9c84148f
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-on: http://git-master/r/832619
(cherry picked from commit 69f00966c2881b6803b13769ffe30b0a2e9b3bec)
Reviewed-on: http://git-master/r/843352
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agoarm64: tegra: jetson_cv: add shunt volt offset
Rajkumar Kasirajan [Mon, 7 Dec 2015 11:04:55 +0000 (19:04 +0800)]
arm64: tegra: jetson_cv: add shunt volt offset

added shunt voltage offset to hangle INA
channel inaccuracy on high voltage rails.

Bug 1677375

Change-Id: I78292e7447f06f2b743b7eef60c19d4d4814c22d
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-on: http://git-master/r/842256
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agoiio: meter: ina3221: support to offset shunt volt
Rajkumar Kasirajan [Mon, 23 Nov 2015 10:29:50 +0000 (18:29 +0800)]
iio: meter: ina3221: support to offset shunt volt

added support to offset shunt voltage reading to hangle INA
channel inaccuracy on high voltage rails.

example:
    p2180_shuntv_offset: shuntv-offset {
        offset = <40>;
        conditional_offset@0 {
            shunt_volt_start = <40>;
            shunt_volt_end = <120>;
            offset = <33>;
        };
    conditional_offset@1 {
            shunt_volt_start = <200>;
            shunt_volt_end = <400>;
            offset = <80>;
        };
};

channel@0 {
reg = <0x0>;
ti,rail-name = "VDD_IN";
ti,shunt-resistor-mohm = <20>;
ti,current-critical-limit-ma = <2105>;
shunt-volt-offset-uv = <&p2180_shuntv_offset>;
};

which means,
 if shunt voltage reading is  from 40 to 120, offset -33 will be applied
 if shunt voltage reading is  from 200 to 400, offset -80 will be applied
 for all other readings offset -40 will be applied.

Bug 1677375

Change-Id: I67c12a6b105011a0a8ca2aae2c5764df6e21ce8b
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-on: http://git-master/r/836475
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agopower: console flush during suspend
Bibek Basu [Mon, 14 Dec 2015 06:32:31 +0000 (12:02 +0530)]
power: console flush during suspend

If the console lock is taken by non boot cpus, then during
suspend conosole buffer may not flush because all nonboot
cpus will be disabled. So,if no_console_suspend is passed
in kernel commandline, flush console before disabling
nonboot cpus.

Bug 200143487

Change-Id: I1a4455a1f515694a75ff7a96d08f24bf4777bf5c
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/922363
Reviewed-by: Allen Yu <alleny@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agovideo: tegra: nvmap: avoid duplicated vma in vmas
Frank Shi [Thu, 10 Dec 2015 08:15:09 +0000 (16:15 +0800)]
video: tegra: nvmap: avoid duplicated vma in vmas

When nvmap_vma_open is called more than one time
for same vma. This vma should not be added to vmas
list again.

Bug 200154984

Change-Id: I7617d6c10e2a9cfcd03418865f0e4b3b8576c971
Signed-off-by: Frank Shi <fshi@nvidia.com>
Reviewed-on: http://git-master/r/921294
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
8 years agoarm64: jetson-cv: correct regulator en_vdd_cam_1v2
Frank Shi [Thu, 26 Nov 2015 06:41:21 +0000 (14:41 +0800)]
arm64: jetson-cv: correct regulator en_vdd_cam_1v2

Current regulator en_vdd_cam_1v2 is for E3233.
Copy it to dtb of E3233, then change current GPIO to
correct one for P2597.

Bug 1651635

Change-Id: I0f981485d2842c918a3587600808c896f512c2f4
Signed-off-by: Frank Shi <fshi@nvidia.com>
Reviewed-on: http://git-master/r/921808
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agodrivers: soc_camera: give default hdr_en
Frank Shi [Fri, 11 Dec 2015 08:43:33 +0000 (16:43 +0800)]
drivers: soc_camera: give default hdr_en

Some sensor driver may not have HDR_EN ctrl.
It's not a fatal error. Just give a default value 0
to it.

Bug 1579861

Change-Id: I8b970cf17184edb18cd18dc8269b13ecbda6f7e4
Signed-off-by: Frank Shi <fshi@nvidia.com>
Reviewed-on: http://git-master/r/921824
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agoi2c: tegra-vi: powergate only when partition is ON
Shridhar Rasal [Wed, 9 Dec 2015 11:08:30 +0000 (16:38 +0530)]
i2c: tegra-vi: powergate only when partition is ON

Both i2c-vi and host-vi are in VE power domain.
During boot stage, interlaced acessing may occur and
cause negative reference count

Bug 200159379

Change-Id: Iee523b7b3084f0ac890bd47b81738152f064ec41
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/843497
Reviewed-by: Nine Feng <nfeng@nvidia.com>
Tested-by: Nine Feng <nfeng@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agokernel changes for implementing sensor cropping
Shubham Chandra [Thu, 5 Nov 2015 11:16:54 +0000 (16:46 +0530)]
kernel changes for implementing sensor cropping

Defined s_crop & g_crop ioctls with proper functions
Added macros for required registers addresses
Boundary check in s_crop function

Bug 1687120

Change-Id: I3ad1f3d82c189dd473ea205c03be30638349bd58
Signed-off-by: Shubham Chandra <shubhamc@nvidia.com>
Reviewed-on: http://git-master/r/835964
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-by: Hu He <hhe@nvidia.com>
Reviewed-by: Kamal Balagopalan <kbalagopalan@nvidia.com>
8 years agoarm64: jetson-cv: enable INA for 2180-1000-a03
Shreshtha SAHU [Tue, 8 Dec 2015 08:57:56 +0000 (14:27 +0530)]
arm64: jetson-cv: enable INA for 2180-1000-a03

Enable INA only for A03 revisions of compute module P2180.
Only this revision and later has INA accuracy hardware fix.

Bug 1677375

Change-Id: Iff82316ca91b76b3de3aa06076724c4ed3ba6d71
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/842848
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agoof: plugin-manager: fix section mismatch error
Laxman Dewangan [Tue, 10 Nov 2015 02:49:53 +0000 (08:19 +0530)]
of: plugin-manager: fix section mismatch error

Fix following section mismatch error:

/**
WARNING: vmlinux.o(.text+0x8ba968): Section mismatch in reference
from the function update_target_node() to the variable .init.text:$x
The function update_target_node() references
the variable __init $x.
This is often because update_target_node lacks a __init
annotation or the annotation of $x is wrong.
**/

Change-Id: I853c3b4f77ebed587ec122be550acd024bb132a8
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/831096
(cherry picked from commit 5a0b1037f77e168e421e80598f924180ab2aeaa9)
Reviewed-on: http://git-master/r/842368
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
8 years agoof: plugin-manager: add support for deleting property from target node
Laxman Dewangan [Wed, 28 Oct 2015 12:48:48 +0000 (18:18 +0530)]
of: plugin-manager: add support for deleting property from target node

Add support for deleting the property from the target node using
plugin-manager.

Change-Id: I404013473f4955e1e82f12670f1c207c005cf2dc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/824182
(cherry picked from commit d460849d546c236c0797a7dfa9a6de79466ca1d2)
Reviewed-on: http://git-master/r/842367
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
8 years agoof: plugin-manager: copy properties for adding/updating
Laxman Dewangan [Wed, 14 Oct 2015 08:56:18 +0000 (14:26 +0530)]
of: plugin-manager: copy properties for adding/updating

Create copied version of properties before updating or
adding in target node as this is permanently used by
target node.

Change-Id: I1831391097baaae8b345725180b71fe238960b75
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/817450
(cherry picked from commit 756d0ccd51f1f98b45766963c87094d91cf99a45)
Reviewed-on: http://git-master/r/842364
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com>
Tested-by: Shreshtha Sahu <ssahu@nvidia.com>
8 years agogpu: nvgpu: IOCTL to disable timeouts
Deepak Nibade [Thu, 20 Aug 2015 14:16:16 +0000 (19:46 +0530)]
gpu: nvgpu: IOCTL to disable timeouts

Add IOCTL NVGPU_DBG_GPU_IOCTL_TIMEOUT to support
disabling/re-enabling scheduler timeout from user space

If user space application is closed without re-enabling
the timeouts, kernel will restore the timeouts' state
while releasing the debug session

This is needed for debugging purpose

Bug 1514061

Change-Id: I32efb47ad09d793f3e7fd8f0aaa9720c8bc91272
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/788176
(cherry picked from commit e338eb25e9177ca25a2035f10b93e378ac8bbf16)
Reviewed-on: http://git-master/r/841468
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
8 years agogpu: nvgpu: enable powergate always while releasing debug session
Deepak Nibade [Thu, 10 Sep 2015 10:40:21 +0000 (16:10 +0530)]
gpu: nvgpu: enable powergate always while releasing debug session

Currently, while releasing the debug session we enable powergate
only if a channel is bound to session

If a session has no channel bound to it, and has powergate
disabled, then we do not enable powergate when that session
is closed

Fix this by calling dbg_set_powergate(POWERGATE_ENABLE) always
while releasing the session

Refcounting and sanity checks in dbg_set_powergate() will take
care of situation if powergate was not disabled by the session
in first place

Bug 1679372

Change-Id: I4e027393c611d3e8ab4f20e195f31871086da736
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/796999
(cherry picked from commit 671dff8cb0605f865c5da32bd889e2a6fcf133fe)
Reviewed-on: http://git-master/r/841467
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
8 years agogpu: nvgpu: gm20b: use jiffies for wait on PMU
Vijayakumar [Tue, 24 Nov 2015 07:06:58 +0000 (12:36 +0530)]
gpu: nvgpu: gm20b: use jiffies for wait on PMU

bug 200153970
bug 1707442

Change-Id: Ia5f616269bfeb834540bf4da6ecfc6e399682819
Reviewed-on: http://git-master/r/836966
(cherry picked from commit 9bc019e3b62984b3d1f12da5edc3221ee44a86b1)
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/841356
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Tested-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
8 years agovideo:tegra:nvmap: fix dump-stack for nvmap test
Jeetesh Burman [Thu, 26 Nov 2015 11:32:58 +0000 (17:02 +0530)]
video:tegra:nvmap: fix dump-stack for nvmap test

to get cpu-id use local_clock instead of smp_processor_id,
as it calls to debug_smp_processor_id, which causes stack_dump.

Bug 200155945

Change-Id: Ibd5c8990eca9a83c7e8384a375495dd18c4a18e6
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/838528
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
8 years agovideo: tegra: nvmap: support inserting pages on unreserve
Sri Krishna chowdary [Tue, 12 May 2015 07:12:49 +0000 (12:42 +0530)]
video: tegra: nvmap: support inserting pages on unreserve

Some times it is beneficial to insert pages into vma on unreserve.
This avoids page fault overhead for any accesses later. If user space
knows apriori which regions of a group of handles will be accessed for
sure, user space can pass relevant information with this new
NVMAP_INSERT_PAGE_ON_UNRESERVE option to reserve ioctl call.

Mark pages as writable, else write accesses after read fault nullifying the
purpose of the option.

Bug 200092803

Change-Id: Id44502b9a5d890d24f221e38c6ae781584ce7ace
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/781602
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
8 years agoRevert "media: tegra: ov5693: create node if HW is present"
Mrutyunjay Sawant [Tue, 8 Dec 2015 07:57:43 +0000 (23:57 -0800)]
Revert "media: tegra: ov5693: create node if HW is present"

bug 1710357

Change-Id: I1eff4db8dc5c65fa99f5148a22953afc3a9939b4
Reviewed-on: http://git-master/r/842800
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
8 years agomm: consolidate code to setup pte
Kirill A. Shutemov [Thu, 3 Apr 2014 21:48:16 +0000 (14:48 -0700)]
mm: consolidate code to setup pte

Extract and consolidate code to setup pte from do_read_fault(),
do_cow_fault() and do_shared_fault().

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 3bb977946998ae0d756279c5a108435d04636e2b)
Change-Id: I2af7640de17d93d81c5f7f1d83662ac3909dd15f
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/840996
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
8 years agoiommu/tegra: smmu: fix iommu message
Jeetesh Burman [Tue, 24 Nov 2015 10:56:03 +0000 (16:26 +0530)]
iommu/tegra: smmu: fix iommu message

To fix below message:
"No iommus property found in DT node"

replacing dev_notice to dev_dbg.

Bug 200137948

Change-Id: I772f5e9750f50eeab812ed1e18a042fde7cfa02d
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/837095
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
8 years agomedia: tegra: ov5693: create node if HW is present
Shreshtha SAHU [Mon, 16 Nov 2015 15:46:31 +0000 (21:16 +0530)]
media: tegra: ov5693: create node if HW is present

Create video dev node ov5693.1 only if HW is present/detected.

Bug 1693452
Bug 1692979

Change-Id: Ic4c9172798f243471d2d87b6eddab81e79a240aa
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/833358
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agomedia: tegra_camera: support YUV CSI input
Frank Shi [Fri, 20 Nov 2015 03:13:48 +0000 (11:13 +0800)]
media: tegra_camera: support YUV CSI input

Program VI to support YUV CSI input

Bug 200153901

Change-Id: I791e55a24cea59ad32a9af99f8d0c3be8eb5919d
Signed-off-by: Frank Shi <fshi@nvidia.com>
Reviewed-on: http://git-master/r/835644
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bryan Wu <pengw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agogpu: nvgpu: create sync_fence only if needed
Deepak Nibade [Wed, 7 Oct 2015 10:50:07 +0000 (16:20 +0530)]
gpu: nvgpu: create sync_fence only if needed

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

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

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

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

Bug 200141116

Change-Id: Ia921701bf0e2432d6b8a5e8b7d91160e7f52db1e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/812845
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
8 years agopcie: host: tegra: fix port register access
Vidya Sagar [Tue, 24 Nov 2015 18:08:35 +0000 (23:38 +0530)]
pcie: host: tegra: fix port register access

access root port registers only if rootport is active

Bug 1705758

Change-Id: Iac2f2b673d30824188220ddddf3a037535ab1f34
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/837265
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agodrivers: media: platform: ov5693 gpio warning
David Wang [Wed, 2 Dec 2015 21:52:02 +0000 (13:52 -0800)]
drivers: media: platform: ov5693 gpio warning

Changing reset gpio error message to warning as
reset gpio pin is not a requirement for this sensor.

Bug 200143488

Change-Id: Ibb878f537fc279bd728e86f9522c29e3fd04b621
Signed-off-by: David Wang <davidw@nvidia.com>
Reviewed-on: http://git-master/r/840627
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Jeetesh Burman <jburman@nvidia.com>
Tested-by: Jeetesh Burman <jburman@nvidia.com>
8 years agoarm64: tegra210: fix DT for node xusb_padctl
Hans Yang [Wed, 25 Nov 2015 04:30:51 +0000 (12:30 +0800)]
arm64: tegra210: fix DT for node xusb_padctl

This commit fixed xusb_padctl node in DT source files
by means of "check_padctl_dt_auto_fix.sh".

It automatically checks .dtb and does following actions
in .dts/.dtsi files

1) Replace padctl@0 by xusb_padctl
2) Correct "nvidia,enable-sata-port" if sata is enabled/disabled.
3) Correct "nvidia,lane-map=0x??" if pcie is enabled/disabled.
4) Correct "status=??" depends on sata/pcie/xusb lane owner.
5) Add needed regulators depends on sata/pcie/xusb lane owner.

Bug 200153624

Change-Id: Ibd7407c2e52822ed28467cfedeb4602b18a0f745
Signed-off-by: Hans Yang <hansy@nvidia.com>
Reviewed-on: http://git-master/r/837607
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: TW Chiu <twchiu@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
8 years agoARM64: move regulator en_vdd_vcm_2v8 to E3233 dtb
Frank Shi [Thu, 26 Nov 2015 06:41:21 +0000 (14:41 +0800)]
ARM64: move regulator en_vdd_vcm_2v8 to E3233 dtb

The regulator en_vdd_vcm_2v8 is on E3233. It should be placed in device
tree file for E3233. Otherwise it may confilct with GPIO mapping on
other camera board

Bug 1651635

Change-Id: I240cd6a401ee1633db5ec58bbf7a2877906b5fa0
Signed-off-by: Frank Shi <fshi@nvidia.com>
Reviewed-on: http://git-master/r/838354
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agogpu: nvgpu: move check_gp_put() and update_gp_get() to worker
Deepak Nibade [Mon, 30 Nov 2015 10:39:48 +0000 (16:09 +0530)]
gpu: nvgpu: move check_gp_put() and update_gp_get() to worker

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

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

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

Bug 200141116

Change-Id: I276400111be0421eb673695e2f2899ff52e344b4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/839232
(cherry picked from commit 289617e8bf01bde9aab45dfa3a1c6a1241e6eb78)
Reviewed-on: http://git-master/r/839711
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
8 years agoSummary: Disable kernel SDMMC driver on SLT boards
Anand Bhatia [Mon, 13 Jul 2015 21:25:55 +0000 (14:25 -0700)]
Summary: Disable kernel SDMMC driver on SLT boards

Bug 1656029

For pad safety, interactions of kernel driver
post mods sd test need to be avoided. Kernel
SD driver are therefore disabled.

Change-Id: Ic96ac0bc8dbb82a9d790d9c19587bc881f97c332
Signed-off-by: Anand Bhatia <anandb@nvidia.com>
Reviewed-on: http://git-master/r/769512
Reviewed-by: Vivek Aseeja <vaseeja@nvidia.com>
8 years agotegra-alt: adsp: request ACK when closing PCM stream
Viraj Karandikar [Wed, 18 Nov 2015 07:01:13 +0000 (12:31 +0530)]
tegra-alt: adsp: request ACK when closing PCM stream

Request ACK and wait when closing PCM stream.

Bug 200100724

Change-Id: I1a12a3a8efff0e25152c148e4b74b163f0b4f63d
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/834456
Reviewed-by: Uday Gupta <udayg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
8 years agotegra: host: pcie: fix D3_Hot test code
Vidya Sagar [Fri, 27 Nov 2015 11:52:16 +0000 (17:22 +0530)]
tegra: host: pcie: fix D3_Hot test code

fixes D3_Hot test code w.r.t checking device's
entry into D3_Hot state

Bug 200143348

Change-Id: I74b874b8c0e105b69da086a9edc3f9a29718eb7e
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/838881
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agoarm: dt: vcm30_t124: otg: allow host gadget change
Haribabu Narayanan [Tue, 10 Nov 2015 01:24:31 +0000 (17:24 -0800)]
arm: dt: vcm30_t124: otg: allow host gadget change

vcm30_t124 based platforms don't physically use a OTG connector that allows for
ID pin based state changes.  Since SW based transitions use ID/VBUS changes
simultaneously, allow OTG to switch directly between HOST and DEVICE modes
without needing to go through a SUSPEND state.

Bug 1653886

Change-Id: Ibe131d6e087970c4a1fc2c391fb73bedc31486fd
Signed-off-by: Haribabu Narayanan <hnarayanan@nvidia.com>
Reviewed-on: http://git-master/r/831057
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
8 years agomedia: soc_camera: add ov13860 v4l2 driver
Nine Feng [Mon, 19 Oct 2015 06:54:36 +0000 (14:54 +0800)]
media: soc_camera: add ov13860 v4l2 driver

Bug 1674463

Change-Id: Ic7aa8c864aae5bb21882bbcaffd0ca561200734d
Signed-off-by: Nine Feng <nfeng@nvidia.com>
Reviewed-on: http://git-master/r/819465
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Arun Kannan <akannan@nvidia.com>
Reviewed-by: Kamal Balagopalan <kbalagopalan@nvidia.com>
8 years agoarm64: tegra21: config: enable USB_SERIAL_FTDI_SIO
Jeetesh Burman [Wed, 25 Nov 2015 06:04:31 +0000 (11:34 +0530)]
arm64: tegra21: config: enable USB_SERIAL_FTDI_SIO

Enable USB_SERIAL_FTDI_SIO.

Bug 1705825

Change-Id: I928642b23c8fcf561137edcd5d326ed5029bd03d
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/837612
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
8 years agovideo: tegra: dc: Setup hda presence on hotplug
Shaunak Gupte [Tue, 20 Oct 2015 07:00:31 +0000 (12:30 +0530)]
video: tegra: dc: Setup hda presence on hotplug

Setup hda presence automatically when hdmi is plugged in.

Bug 200130740
Bug 200128816

Change-Id: I3d220bc893f6821963a3a9be6eb0c71ff54938ed
Signed-off-by: Shaunak Gupte <shaunakg@nvidia.com>
Reviewed-on: http://git-master/r/820156
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rahul Mittal <rmittal@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
8 years agoiommu/tegra: smmu: make iova_to_phys debugfs more robust
Sri Krishna chowdary [Thu, 19 Nov 2015 08:57:14 +0000 (14:27 +0530)]
iommu/tegra: smmu: make iova_to_phys debugfs more robust

This fixes 2 things
1. Make sure user gets valid result only if read from the
same address space the iova originally was requested for
2. make sure not to proceed with iova translation to physical
address when no iova was ever programmed

Bug 200143318

Change-Id: If6af4780bfffa82bd9776137e343bcb8e27b49ad
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/835273
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agoarm64: t210: jetson_cv: update hdmi2.0 prod values
Naveen Kumar S [Mon, 23 Nov 2015 06:27:59 +0000 (11:57 +0530)]
arm64: t210: jetson_cv: update hdmi2.0 prod values

Updated prod settings for HDMI2.0 on Jetson-CV to ahere to
HDMI electrical compliance values.

bug 1699941
bug 1660935

Change-Id: Icb3909f67ae282d3bde528e99f820454680ce835
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/837320
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agotegra21: dvfs: Add support for SKU 0x8F
Alex Frid [Fri, 20 Nov 2015 19:56:50 +0000 (11:56 -0800)]
tegra21: dvfs: Add support for SKU 0x8F

Bug 1558421

Change-Id: Ib31ac17b0338d8916fb8e9b526b86b7cebbd45d0
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/836416
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Kerwin Wan <kerwinw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agogpu: nvgpu: fixed NV_PBUS_INTR_0 value on pbus isr
Thomas Fleury [Thu, 19 Nov 2015 14:38:37 +0000 (15:38 +0100)]
gpu: nvgpu: fixed NV_PBUS_INTR_0 value on pbus isr

bug 200139995

Change-Id: I81d2eb4461e92fbb33db8554779f6566f6b002c1
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/835307
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
8 years agoARM64: DT: tegra210: disable KSO mode dump
Bitan Biswas [Thu, 29 Oct 2015 09:58:23 +0000 (15:28 +0530)]
ARM64: DT: tegra210: disable KSO mode dump

Disable SDMMC register dump after errors
like command index error in KSO sleep mode
for Jetson-cv board

bug 200138403

Change-Id: Iad087a16de2caa270c1fc30dbd0fe76da99c2792
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/824721
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agommc: host: tegra: disable kso mode reg dump
Bitan Biswas [Thu, 29 Oct 2015 09:54:37 +0000 (15:24 +0530)]
mmc: host: tegra: disable kso mode reg dump

On platforms with Broadcom Wifi over SDIO
support register dump in KSO sleep is disabled

bug 200138403

Change-Id: I49bded4df12fd0ce83be5bd791f4a9bd2e98b5b7
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/824720
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agobindings: mmc: tegra: disable SDIO register dump
Bitan Biswas [Thu, 29 Oct 2015 09:49:54 +0000 (15:19 +0530)]
bindings: mmc: tegra: disable SDIO register dump

Platforms with Broadcom Wifi over SDIO support
may use attribute
nvidia,bcm-sdio-supress-kso-dump to suppress
register dump in KSO sleep mode.

bug 200138403

Change-Id: Ib7258be0023df53cdf0f3910f947b5e56b5e2f82
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/824719
Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agop2360: Add support for max20024-rtc
Vipin Kumar [Tue, 17 Nov 2015 09:58:34 +0000 (15:28 +0530)]
p2360: Add support for max20024-rtc

bug 200138527
bug 1687264

Change-Id: I8dc4c84e1e62aa11d87b1f874add89f37651ec40
Signed-off-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-on: http://git-master/r/833904
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshagiri Holi <sholi@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
8 years agomedia: v4l2-core: Migration from upstream
Bhanu Murthy V [Thu, 1 Oct 2015 21:32:03 +0000 (14:32 -0700)]
media: v4l2-core: Migration from upstream

Adds required upstream files to support
unified VI driver
Add minimal changes in existing files without
breaking the current interface

Bug 1617777

Change-Id: Iaa2b63aed4ac028fd3b3a7920a3781d7186ca03f
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/786823
(cherry picked from commit 230d024056fb256a741ac4da94624f463cad6574)
Reviewed-on: http://git-master/r/832143
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agodrivers: Restructure GRHOST_VI
Bhanu Murthy V [Fri, 30 Oct 2015 18:51:53 +0000 (11:51 -0700)]
drivers: Restructure GRHOST_VI

Remove GRHOST_VI. VI code moved from
drivers/video/tegra/host/ to
drivers/media/platform/tegra/vi/

Bug 1617777

Change-Id: I54350ddf178229c9975419a77d2fe0d9836e844f
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/825018
(cherry picked from commit 9bf60d57e2ddbc273e25ce7cb022ebaacedaac3a)
Reviewed-on: http://git-master/r/832137
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agoarch: arm64: configs: Moving VI config
Bhanu Murthy V [Thu, 29 Oct 2015 23:43:53 +0000 (16:43 -0700)]
arch: arm64: configs: Moving VI config

Remove GRHOST_VI as part of defconfig
Add TEGRA_VI for l4t to compile as module

Bug 1617777

Change-Id: Ia48be53d8529ab35a438a8abc16a94e7e38d83db
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/825017
(cherry picked from commit d9aed46d431443740cd82b15fccbface2d8d2dc0)
Reviewed-on: http://git-master/r/832136
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agoiio: proximity: IQS2x3 SAR v.20
Erik Lilliebjerg [Tue, 10 Nov 2015 03:58:12 +0000 (20:58 -0700)]
iio: proximity: IQS2x3 SAR v.20

- Add device tree options for the loop variables that checks for the RDY GPIO
  signal.
- Update the documentation for this.

Bug 200137195

Change-Id: Ie2b482ef7e71d5932ceea40072dd086624f18017
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/831117
(cherry picked from commit 9fb5f2d04cef94818977e7ec2412ac09a118bad5)
Reviewed-on: http://git-master/r/833377
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>
8 years agodrivers: usb: gadget: Add release fn for snd_uac2
Gaurav Singh [Thu, 5 Nov 2015 06:21:16 +0000 (11:51 +0530)]
drivers: usb: gadget: Add release fn for snd_uac2

Introducing a blank release fucntion to fix the warning issue
faced while unloading g_audio module.

Bug 200149372

Change-Id: Ia1fdd73ed2b1aa80f9d1bb2aed497ade6ed26608
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/828208
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agoarm64: mm: dma-mapping: fix the overflow issue
Krishna Reddy [Fri, 6 Nov 2015 22:21:20 +0000 (14:21 -0800)]
arm64: mm: dma-mapping: fix the overflow issue

Fix the overflow of variable "start" holding the start bit number.
It should be of same type mapping->bits, which is size_t, to avoid
overflow for IOVA range beyond 4GB boundary.

Bug 200150063

Change-Id: Ie2ab3ce12293beadac4a1a21d26ed6d1fef41176
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/834822
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
8 years agoplatform: tegra: pmc: silent debug print
Bibek Basu [Sat, 31 Oct 2015 21:03:53 +0000 (02:33 +0530)]
platform: tegra: pmc: silent debug print

pcm prod list not found list is made a
debug print as its not a mandatory error

Bug 200137939

Change-Id: I8b5523e015325ad940ff29b2b7ba1cad69d2d845
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/825874
(cherry picked from commit 5c9397de732d50acaf879ca1a77823a16410ac6e)
Reviewed-on: http://git-master/r/826864
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agogpu: nvgpu: disable ELPG while accessing gr_gpcs_tpcs_sm_sch_macro_sched_r
Thomas Fleury [Mon, 2 Nov 2015 14:26:54 +0000 (15:26 +0100)]
gpu: nvgpu: disable ELPG while accessing gr_gpcs_tpcs_sm_sch_macro_sched_r

bug 200139995

Any GR register access should disable ELPG and clock gating before
access and enable it back after it is done. Disable ELPG while tweaking
perf parameters in gk20a_alloc_obj_ctx.

Also output NV_PBUS_INTR_0 in case of interrupt.

Change-Id: Ic9ddc514207ff91631dbd96c5ab0c70ebae0b6d1
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/826272
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agoarm64: tegra210: fix DT for node xusb_padctl
TW Chiu [Sat, 10 Oct 2015 09:56:54 +0000 (17:56 +0800)]
arm64: tegra210: fix DT for node xusb_padctl

DT node xusb_padctl contains info to initialize PLLE and UPHY PLLs.

If pcie is enabled, xusb_padctl needs the following property copied
from pcie node:
nvidia,lane-map

If sata is enabled, xusb_padctl needs the following property copied
from sata node:
nvidia,enable-sata-port

XUSB uses the following property to assign lanes:
nvidia,lane_owner

To initialize PLLE and UPHY PLLs, xusb_padctl needs to know power
rails below:
avdd_pll_uerefe-supply
hvdd_pex_pll_e-supply
dvdd_pex_pll-supply
hvddio_pex-supply
dvddio_pex-supply
hvdd_sata-supply
dvdd_sata_pll-supply
hvddio_sata-supply
dvddio_sata-supply

Bug 1685150

DEPENDS ON: < None >

Change-Id: I5d3d227883d8c3f2148c9ea218f1312a2b54c20a
Signed-off-by: TW Chiu <twchiu@nvidia.com>
Reviewed-on: http://git-master/r/815639
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit

8 years agoarm64: max77620: jetson-cv: update fps-time-period
Shreshtha SAHU [Sat, 7 Nov 2015 05:50:42 +0000 (11:20 +0530)]
arm64: max77620: jetson-cv: update fps-time-period

Fix fps-time-period for Jetson-CV board as provided by syseng

Bug 200149755

Change-Id: Ia1be5dc98143b6b25821235381dbd191b3803893
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/829392
(cherry picked from commit cdddc523aafea574cd2d83d6f3455ae403b27354)
Reviewed-on: http://git-master/r/833318
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
8 years agoarm64: t210: config: enable Intel 82576 NIC driver
Vidya Sagar [Thu, 12 Nov 2015 08:20:42 +0000 (13:50 +0530)]
arm64: t210: config: enable Intel 82576 NIC driver

Bug 200144579

Change-Id: Ibadbd0418914844a1d6613cdf3a6bdb5c5eee785
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/832155
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agoarm64: t210: ksavedefconfig formatted output
Vidya Sagar [Thu, 12 Nov 2015 08:17:08 +0000 (13:47 +0530)]
arm64: t210: ksavedefconfig formatted output

Bug 200144579

Change-Id: I95b3636fd2786a5c144445cc16e687031d769880
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/832154
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agoarm: dts: p2360: HDMI: Golden register update
Varun TV [Mon, 25 May 2015 16:05:47 +0000 (21:35 +0530)]
arm: dts: p2360: HDMI: Golden register update

 Update golden register fields as per latest QUAL for HDMI on p2360

 bug 200104478

Change-Id: I8fbe6a01088b058d40ccb37614ab8a4147c84822
Reviewed-on: http://git-master/r/789476
Signed-off-by: Sagar Kadamati <skadamati@nvidia.com>
Reviewed-on: http://git-master/r/826960
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agodrivers: video: tegra: sor: Updated sor GR's
Sagar Kadamati [Fri, 6 Nov 2015 13:17:24 +0000 (18:47 +0530)]
drivers: video: tegra: sor: Updated sor GR's

Bug 200104480

Change-Id: I8d581b384b339675e761ccf7bf87cffad4efa2db
Signed-off-by: Sagar Kadamati <skadamati@nvidia.com>
Reviewed-on: http://git-master/r/819544
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agoresource: Coverity fixes
Pavitrakumar [Thu, 18 Jun 2015 15:17:20 +0000 (20:47 +0530)]
resource: Coverity fixes

Coverity fixes
Initializing counter 'l' to 0 in 'r_next', which is
incremented to keep track of the resource position during
resource tree traversal.

Coverit ID 13503

Bug 200083369

Change-Id: Iea3d1390686b4c418a9bf40571921dbd9ca8d2fa
Signed-off-by: Pavitrakumar <pavitrak@nvidia.com>
Reviewed-on: http://git-master/r/759698
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
8 years agotegra: pm: Coverity fixes
Pavitrakumar [Thu, 18 Jun 2015 10:24:50 +0000 (15:54 +0530)]
tegra: pm: Coverity fixes

Coverity fixes
Initialized pps.affinity_level field to 0; this was left
un-initialized and coverity complained about this.

Coverity ID 18088

Bug 200083369

Change-Id: I1b297b57e69c879e437b606b1c04694605146dd2
Signed-off-by: Pavitrakumar <pavitrak@nvidia.com>
Reviewed-on: http://git-master/r/759603
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
8 years agoarm64: tegra210: add device node xusb_padctl
Vidya Sagar [Wed, 11 Nov 2015 11:24:53 +0000 (16:54 +0530)]
arm64: tegra210: add device node xusb_padctl

Rename the node from padctl to xusb_padctl and add properties:

nvidia,lane-map: assign lanes for PCIE driver
nvidia,enable-sata-port: specify if SATA driver will use lane or not

Add power rails necessary for UPHY.

Bug 200068549
Bug 1682515

Change-Id: Iae2708211267ccb564dad32be90561827350608d
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: http://git-master/r/831714
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Carl Dong <carld@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
8 years agodrivers: media: soc_camera: IMX230 driver to gain
David Wang [Wed, 11 Nov 2015 21:09:54 +0000 (13:09 -0800)]
drivers: media: soc_camera: IMX230 driver to gain

Updating IMX230 driver to have it's own to gain function.

Bug 1654210

Change-Id: Iedd8303a3cce61c5de9a272343248bc86b4bca7d
Signed-off-by: David Wang <davidw@nvidia.com>
Reviewed-on: http://git-master/r/831854
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agodrivers: media: platform: tegra: get gpio pwr info
Anurag Dosapati [Mon, 9 Nov 2015 23:57:03 +0000 (15:57 -0800)]
drivers: media: platform: tegra: get gpio pwr info

Add support to get power status (on/off) of a GPIO used by isc-mgr to
turn on/off isc devices

Bug 1698463

Change-Id: I6a01c610a2bd41027eb04158514887ae5ed67234
Signed-off-by: Anurag Dosapati <adosapati@nvidia.com>
Reviewed-on: http://git-master/r/830964
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
8 years agoiio: proximity: IQS2x3 SAR v.19
Erik Lilliebjerg [Mon, 2 Nov 2015 10:13:22 +0000 (03:13 -0700)]
iio: proximity: IQS2x3 SAR v.19

- Add generic external status function for WARs.
  When called by an external driver an ATI redo is done.
- Add the ability to spew just the SAR GPIO status to the kernel log.
- Add ability to spew just the external state to the kernel log when the call
  is made.
- Add a DT option to make visible and hide the SAR sensors from the OS by
  changing the case ("SAR" vs. "sar") in the sensor name.  If os_options is > 0
  then the lower case name is used allowing the NVS HAL to find the sensors.
  Otherwise the sensor names use "SAR" and is hidden from the OS.

Bug 200137195

Change-Id: I4163f3ab30fc9e3292f3171dd98f88c8896a079e
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/826194
(cherry picked from commit 740de03f84ae5f7fd4d95f6ede3099876306ea2f)
Reviewed-on: http://git-master/r/831999
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>
8 years agoiio: light: Add WAKE_ON capability
Erik Lilliebjerg [Fri, 23 Oct 2015 08:44:23 +0000 (01:44 -0700)]
iio: light: Add WAKE_ON capability

- Add ability to wake AP from proximity (WAKE_ON) sensors.
- Add proximity debug dump.
- Add NVS light and proximity module versioning.
- Fix light enable initial poll delay.
- Add CM32180 ARA WAR device tree configuration option.  If enabled, the WAR
  does an ARA before every I2C transaction regardless of the interrupt GPIO
  status.  The DT option: ARA_WAR = <1>;
  This is an extension to the current WAR that tests the interrupt GPIO to
  determine if an ARA is needed.

Bug 200122255
Bug 200121777

Change-Id: Id334d165cd7f6962c47592392089c55e70b50d22
Signed-off-by: Erik Lilliebjerg <elilliebjerg@nvidia.com>
Reviewed-on: http://git-master/r/821953
(cherry picked from commit 51087b9001d2c851d620aa02de0098add7df998b)
Reviewed-on: http://git-master/r/831346
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Tested-by: Robert Collins <rcollins@nvidia.com>
8 years agoARM64: jetson: provide commands for power off from bootrom
Venkat Reddy Talla [Mon, 9 Nov 2015 08:52:41 +0000 (14:22 +0530)]
ARM64: jetson: provide commands for power off from bootrom

Add support to power off system via bootrom. Add required commands
for bootrom from DT so that bootrom can issue the I2C commands.

Bug 200146310

Change-Id: Ib128af7f0982a154fc4068005169c58b7fa93fda
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/831324
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agoARM64: t210: hawkeye: provide commands for power off from bootrom
Laxman Dewangan [Fri, 6 Nov 2015 14:26:11 +0000 (19:56 +0530)]
ARM64: t210: hawkeye: provide commands for power off from bootrom

Add support to power off system via bootrom. Add required commands
for bootrom from DT so that bootrom can issue the I2C commands.

bug 200146310

Change-Id: I8bba75d25a748ef2bd43031880d761965de1f2c9
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/829086

8 years agopower: reset: max77620: add support to ignore final power off commands
Laxman Dewangan [Fri, 6 Nov 2015 14:23:38 +0000 (19:53 +0530)]
power: reset: max77620: add support to ignore final power off commands

Add support to not issue final power off commands for PMIC if there
is soc specific power off sequence is available.

This is required to do the power off sequence by SoC per their system
requirements.

bug 200146310

Change-Id: I932c2044d4f2942dd7e234185b88720ebcd676ee
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/829085

8 years agopower: reset: system-pmic: add support to power off via soc specific
Laxman Dewangan [Fri, 6 Nov 2015 14:20:59 +0000 (19:50 +0530)]
power: reset: system-pmic: add support to power off via soc specific

Add support to call the SoC specific power off calls when registerd
pm_power_off is not able to power off the system.

On this case, SoC provides the power off handler to do system power
off.

bug 200146310

Change-Id: I8a98825c33e05631c879028a651f510a895b6c3d
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/829084

8 years agoplatform: tegra: pmc: add API to do system reset
Laxman Dewangan [Fri, 6 Nov 2015 14:17:11 +0000 (19:47 +0530)]
platform: tegra: pmc: add API to do system reset

Add APIs to do system reset through PMC.

bug 200146310

Change-Id: If89a68f29f85140e1d046c3f8a39da2293a3f0c7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/829083

8 years agoplatform: tegra: bootrom: add support for power off commands
Laxman Dewangan [Fri, 6 Nov 2015 14:03:42 +0000 (19:33 +0530)]
platform: tegra: bootrom: add support for power off commands

Add support for power off commands fro bootrom. The commands
are provided from DT as follows:
pmc {
bootrom-commands {
reset-commands {
};
power-off-commands {
};
};
};

If power off and reset commands are not available from child node
then properties and command in node bootrom-commands are used. This
is done to support backward compatibility.

The commands properties are same as earlier.

bug 200146310

Change-Id: I3a2102a20424c81310a7c96041884b24ce6e9e15
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/829082

8 years agoplatform: tegra: bootrom: fix pmc register config for commands
Laxman Dewangan [Fri, 6 Nov 2015 13:59:13 +0000 (19:29 +0530)]
platform: tegra: bootrom: fix pmc register config for commands

The number of PMC commands provided from DT is not fully written
into PMC register due to mishandling of index pointer.

Fix the index pointer handling to properly increment it.

bug 200146310

Change-Id: I6d300a050923052ebd356b62dc756dd6cf197beb
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/829081

8 years agodrivers: soc_camera: sensor drivers update
David Wang [Sun, 18 Oct 2015 21:53:48 +0000 (14:53 -0700)]
drivers: soc_camera: sensor drivers update

Adding OV5693 V4L2 driver with timing, OTP, and
EEPROM controls. Updating IMX214 V4L2 driver group
hold control. Updating IMX214 and OV23850 dpd
control.

Bug 200143026.

Change-Id: I91d73ee3f54ca5a1df8ae38abf71d4f33331b664
Signed-off-by: David Wang <davidw@nvidia.com>
(cherry picked from commit e6415ba6abeca5e284a7560f9fcd260faf3d7c3f)
Reviewed-on: http://git-master/r/815427
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agodrivers: soc_camera: add ov23850 OTP controls
David Wang [Thu, 17 Sep 2015 23:08:23 +0000 (16:08 -0700)]
drivers: soc_camera: add ov23850 OTP controls

enabling ov23850 driver with OTP and fuse id controls.

bug 1651635.

Change-Id: I0e9b4a72135730a5a55e986d1f3a2e064f3cc834
Signed-off-by: David Wang <davidw@nvidia.com>
(cherry picked from commit 6d3d3aa222a273bec33d630b18e1e30efda16882)
Reviewed-on: http://git-master/r/825097
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agoARM64: updating OV23850 boundary values
David Wang [Wed, 23 Sep 2015 20:13:03 +0000 (13:13 -0700)]
ARM64: updating OV23850 boundary values

Updating OV23850 DT entry with correct boundary values
including pixel clock, min/max exposure and frame rate

bug 1651635.

Change-Id: Iacce0d94ae1e9ec0dfada7fd2bff6826fea4bf22
Signed-off-by: David Wang <davidw@nvidia.com>
(cherry picked from commit 7337b5d93b65c1b82317635392415547fced85ef)
Reviewed-on: http://git-master/r/825096
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
8 years agoRevert "iio: proximity: SAR Stable Setting V1.2.3"
Steve Rogers [Fri, 6 Nov 2015 22:10:00 +0000 (14:10 -0800)]
Revert "iio: proximity: SAR Stable Setting V1.2.3"

This reverts commit 7706a9b9170491e2c39fc3d54f60eeb011579fa2.

Change-Id: I02ca3757a469275b8a61c19dcfcc8fae36f025fb
Signed-off-by: Steve Rogers <srogers@nvidia.com>
Reviewed-on: http://git-master/r/829254
(cherry picked from commit 886e933e846f7139caee2432e36c40a8bde35ca2)
Reviewed-on: http://git-master/r/829413
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

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

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

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

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

Bug 200141116
Bug 1698667

Change-Id: Id4b69429d7ad966307e0d122a71ad55076684307
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/827638
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agodt: otg: update doc with nvidia,enable-host-peripheral-transitions
Rakesh Babu Bodla [Wed, 4 Nov 2015 04:45:14 +0000 (10:15 +0530)]
dt: otg: update doc with nvidia,enable-host-peripheral-transitions

Update the doc with dt node field enable-host-peripheral-transitions.
Enabling this will allow otg driver to allow host to peripheral
transitions and vice versa. And remove nvidia,enable-event-serialization.

Bug 1653886

Change-Id: Ifac1c1c46567f9c0a0164f85d4ecebc5b8a98532
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/827402
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agousb: phy: tegra: allow host peripheral transitions
Rakesh Babu Bodla [Tue, 16 Jun 2015 09:15:09 +0000 (14:45 +0530)]
usb: phy: tegra: allow host peripheral transitions

Allow otg state machine transitions from host to
pheripheral and vice-versa.

Bug 1653886

Change-Id: I55c6b6bcf7c5cc33ecfd8e9063faed88aa54ccc2
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/826937
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Haribabu Narayanan <hnarayanan@nvidia.com>
Tested-by: Haribabu Narayanan <hnarayanan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agoxhci: tegra: fix for usb2 utmi pad power saving
TW Chiu [Mon, 2 Nov 2015 08:11:04 +0000 (16:11 +0800)]
xhci: tegra: fix for usb2 utmi pad power saving

USB2 pad PD bits can be set to save power when device is disconnected
or suspended. When device is connected or in resume state, we need to
clear these PD bits.

During boot, there is a case that CSC bit is cleared by hub init
function. This causes PD bits set and failures in port reset and set
address.

Bug 200146188

Change-Id: Id12deb97689ef08b3e9236124c2fc4775b039c3c
Signed-off-by: TW Chiu <twchiu@nvidia.com>
Reviewed-on: http://git-master/r/826136
GVS: Gerrit_Virtual_Submit
Reviewed-by: Henry Lin <henryl@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
8 years agotegra124: p2360: Use clock port 0 for PCI root port 1
Vipin Kumar [Fri, 18 Sep 2015 09:35:48 +0000 (15:05 +0530)]
tegra124: p2360: Use clock port 0 for PCI root port 1

bug 1657220

Change-Id: I647c029649c6be08635f79b6ae61acfc111b6290
Signed-off-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-on: http://git-master/r/801254
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agopci: tegra: Make clkport independent of root port
Vipin Kumar [Fri, 18 Sep 2015 09:27:47 +0000 (14:57 +0530)]
pci: tegra: Make clkport independent of root port

PCI driver assumes that PCI0 is bound to clock port 0 and PCI1 is bound
to clock port 1. This patch adds a DT property to make use of the below
combinations as well
PCI0 <--> Clock Port 1
PCI1 <--> Clock Port 0

bug 1657220

Change-Id: I01ff0285d1b1403f1ea15202119318fb489fbe8b
Signed-off-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-on: http://git-master/r/801253
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
8 years agop2360: Add support for C-sample
Vipin Kumar [Tue, 3 Nov 2015 06:27:39 +0000 (11:57 +0530)]
p2360: Add support for C-sample

bug 200150801

Change-Id: I5c1a86afef20bfb17199d9a543ebf1684eefda5c
Signed-off-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-on: http://git-master/r/826900
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
8 years agomedia: tegra_camera: fix potential race condition
Bryan Wu [Mon, 2 Nov 2015 22:15:11 +0000 (14:15 -0800)]
media: tegra_camera: fix potential race condition

Make sure increase sync point max value for arming the single shot.

Bug 1700868

Change-Id: I9a429150dad0851a3da34ee8ad75339728f3ed81
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/826439
(cherry picked from commit d20b72061fa57331fe16d311bfac035227e206ae)
Reviewed-on: http://git-master/r/827967
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
8 years agomedia: tegra_camera: introduce 2 kthreads for capture
Bryan Wu [Thu, 29 Oct 2015 01:19:03 +0000 (18:19 -0700)]
media: tegra_camera: introduce 2 kthreads for capture

Use one kthread to start capture a frame and wait for next frame start.
Before waiting, it will move the current buffer to another queue which
will be handled another kthread.

The second kthread (capture_done) will wait for memory output done sync
point event and handle the buffer to videobuffer2 framework as capture
done.

Bug 1686911

Change-Id: I6805e47ab5252aa75ba70f62747c845c7dd2ba71
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/824954
(cherry picked from commit 7f9af08d6e1e710c0444d0986b6324f884a3d688)
Reviewed-on: http://git-master/r/824965
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
8 years agomedia: tegra_camera: replace workqueue with kthread
Bryan Wu [Wed, 28 Oct 2015 00:48:32 +0000 (17:48 -0700)]
media: tegra_camera: replace workqueue with kthread

Use kthread instead of workqueue, which will create a dedicated kernel
thread for capture.

Remove useless mutex and convert spin_lock_irq() to normal spin_lock().

Bug 1686911

Change-Id: Ie90320ccff9b46a53719bf8924afe38b24dda64c
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/824953
(cherry picked from commit d184f7a5ad79419a169c01e453af2c5ac41b5865)
Reviewed-on: http://git-master/r/824964
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
8 years agogpu: nvgpu: restart timer instead of cancel
Deepak Nibade [Mon, 12 Oct 2015 12:39:43 +0000 (18:09 +0530)]
gpu: nvgpu: restart timer instead of cancel

In gk20a_fifo_handle_sched_error(), we currently cancel
the timeout on all the channels
But this could cause us to miss one of stuck channel

hence, instead of cancelling, restart the timeout of channel
on which it is already active

Bug 200133289

Change-Id: I40e7e0e5394911fc110ab6fde39592b885dfaf7d
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/816133
(cherry picked from commit 7d249416f79e708f4825c9a7265becec0b8c6100)
Reviewed-on: http://git-master/r/820161
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: http://git-master/r/825508
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>