]> nv-tegra.nvidia Code Review - linux-nvidia.git/log
linux-nvidia.git
6 years agotegra: bwmgr: make debugfs node emc_rate override emc requests
Vince Hsu [Mon, 9 Jul 2018 09:26:26 +0000 (17:26 +0800)]
tegra: bwmgr: make debugfs node emc_rate override emc requests

In K4.14 we no longer have override.emc to pm_sanity. To achieve
the same test scenario, this patche makes debugfs node emc_rate
as writable. The pm_sanity can override emc frequnecy by configuring
this variable.

Bug 200422735

Change-Id: I865d1028da5eb5fad60593e1081cb4101483cd7c
Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774315
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: media: mipical: fix refcount leak
David Bang [Fri, 20 Jul 2018 02:05:39 +0000 (19:05 -0700)]
drivers: media: mipical: fix refcount leak

This change adds refcount for vmipi and fixes a refcount leak
when fd for mipical is forcibly closed

Bug 200428765

Change-Id: Ic4ad50a953a962dba1812e4ff78988f5ff0412c3
Signed-off-by: David Bang <dbang@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1782229
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra: camera: fix channel shutdown on signal
Kirill Artamonov [Wed, 18 Jul 2018 13:03:41 +0000 (16:03 +0300)]
tegra: camera: fix channel shutdown on signal

Reset immediately.

Unpin remaining capture requets.

Do not interrupt IVC transactions on signal.

bug 200428765
bug 2047638

Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com>
Change-Id: Ia2f749c65cca1409080ffb192df3533582673c15
Reviewed-on: https://git-master.nvidia.com/r/1780921
GVS: Gerrit_Virtual_Submit
Reviewed-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-by: Ajith Kumar <ajithk@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agobpmp: ABI headers update
Sivaram Nair [Thu, 19 Jul 2018 21:32:21 +0000 (14:32 -0700)]
bpmp: ABI headers update

39d0bd8 [abi] Add MRQ to query fuse burning status

Bug 2250499

Change-Id: I4d1a0fc8639b85fb484b555407d8c7f218950047
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1781979
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocamera: fix csi clock calculations
Bhushan Rayrikar [Wed, 18 Jul 2018 20:00:42 +0000 (13:00 -0700)]
camera: fix csi clock calculations

We were overclocking CSI by aggregating pixel rate for
sensors on different bricks. This is not needed as all the
CSI bricks get the same clock in parallel.

Bug 1888833

Change-Id: Iba5bd447494107e0c9cb9e5951d6580044a7ae75
Signed-off-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1781101
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
Reviewed-by: Ian Kaszubski <ikaszubski@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agofirmware: tegra: increase debugfs buffer size
Sivaram Nair [Thu, 19 Jul 2018 18:00:32 +0000 (11:00 -0700)]
firmware: tegra: increase debugfs buffer size

Size increased from 128 KB to 256 KB for accomodating large files (such
as device tree).

Bug 1872026

Change-Id: Ib32cfa1fdeb72284954c609d7d678a8e512a4f2f
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1781847
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonet: can: mttcan: replace cycle_t by u64 for k4.14
Bitan Biswas [Thu, 19 Jul 2018 14:41:23 +0000 (20:11 +0530)]
net: can: mttcan: replace cycle_t by u64 for k4.14

k4.14 onwards cycle_t is replaced by u64. Fix corresponding
build errors

bug 200385931
bug 200381871

Change-Id: I62cf9f0ceb28209d6b458079fc39c54c3fd735ca
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1781741
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra-alt: adsp: add adsp fe switch support
Gaurav Tendolkar [Thu, 13 Apr 2017 05:19:39 +0000 (10:49 +0530)]
tegra-alt: adsp: add adsp fe switch support

Adding ADSP FE widget event which enables/disables
ADMA when using ADSP pcm device, pause the DMA on
path disconnect event. This prevents glitches
if another app starts writing on same ADMAIF
using another ADSP pcm device

Bug 200298756
Bug 2119806

Change-Id: I96f27be3b9616954f7b5acc12deb5935ba770180
Signed-off-by: Gaurav Tendolkar <gtendolkar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1462190
(cherry picked from commit 93eac105424234b082d7f13ee2ba443594604116)
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1732695
(cherry picked from commit 957029384bc4d51ab79b6e2bef2b9093819b54d5)
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1730254
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: cpuidle: fix read permission for cpuidle
Jeetesh Burman [Thu, 19 Jul 2018 11:27:18 +0000 (16:57 +0530)]
drivers: cpuidle: fix read permission for cpuidle

While running "sudo nvidia-bug-report-tegra.sh" on Galen, below errors
observed and similar issue observed in T186:

cat: /sys/kernel/debug/tegra_cpuidle/crossover_c1_c6: Permission denied
cat: /sys/kernel/debug/tegra_cpuidle/crossover_cc1_cc6: Permission denied
cat: /sys/kernel/debug/tegra_cpuidle/crossover_cc1_cg7: Permission denied
cat: /sys/kernel/debug/tegra_cpuidle/forced_idle_duration_us: Permission denied
cat: /sys/kernel/debug/tegra_cpuidle/testmode: Permission denied

To fix make above attributes, change permission to WRITE permission only
and remove READ permission for above file for T194 and similar file for
T186.

Bug 200431878

Change-Id: I0233e8805d7a2706f9d1dc77a4a35fc60ba946ba
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1781667
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoiio: meter: Add version check at register_hotcpu_notifier()
Nicolin Chen [Fri, 13 Jul 2018 23:47:09 +0000 (16:47 -0700)]
iio: meter: Add version check at register_hotcpu_notifier()

Both register_hotcpu_notifier() and unregister_hotcpu_notifier()
functions are removed since Kernel 4.10 so build errors occurs
when compiling the drivers with K4.14.

This patch adds version checks to the hotcpu notifier related
code in the ina drivers as a quick fix.

Bug 200419967
Bug 200428570

Change-Id: I37f6c27ed30053253bdf36588c83e99fab29d6c7
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1778138
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoMerge "Merge remote-tracking branch 'origin/dev/13_7' into HEAD" into dev-kernel
Gerrit Code Review [Fri, 20 Jul 2018 08:36:23 +0000 (01:36 -0700)]
Merge "Merge remote-tracking branch 'origin/dev/13_7' into HEAD" into dev-kernel

6 years agoPCI: tegra: Disable DMA test code by default
Vidya Sagar [Fri, 25 May 2018 18:20:23 +0000 (23:50 +0530)]
PCI: tegra: Disable DMA test code by default

Moves root port integrated DMA test code under a separate
config option and the option is disabled by default

Bug 200411612

Change-Id: I11eb3287e64adc2d94b67075dfc764f9879a5dd9
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1730762
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agobpmp: ABI headers update
Sivaram Nair [Thu, 12 Jul 2018 18:53:04 +0000 (11:53 -0700)]
bpmp: ABI headers update

1e8460a [abi] Add MRQ to retrieve EC status

Jira BPMP-2053
Jira BPMP-2233

Change-Id: I1ee4b435e705bac8f818219af387dba324778bd8
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1777226
GVS: Gerrit_Virtual_Submit
Reviewed-by: Navneet Kumar <navneetk@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agobluedroid_pm: remove wakelock.h dependency
Om Prakash Singh [Fri, 13 Apr 2018 17:03:39 +0000 (22:33 +0530)]
bluedroid_pm: remove wakelock.h dependency

issue: wakelock.h is deprecated in upstream kernel

fix: aligning downstream code to align with upstream kernel to use
 pm_wakeup.h

Bug 200400829

Change-Id: I88c0b3e0371c9147202f8845e21f70194bbcfdde
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1694888
(cherry picked from commit d1261397f47c248331dbbb3076b3f12e6d7fc49e)
Reviewed-on: https://git-master.nvidia.com/r/1775107
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Asati <gasati@nvidia.com>
Tested-by: Gaurav Asati <gasati@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agomisc: bluedroid_pm: remove platform data usage
Nagarjuna Kristam [Tue, 17 Jan 2017 07:04:12 +0000 (12:34 +0530)]
misc: bluedroid_pm: remove platform data usage

Kernel-4.4 no longer uses platform data. Remove code which populates
info from platform data

Bug 200271726

Change-Id: I466daf0e9df1259b9beebc42a065b0c6130b9b08
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: http://git-master/r/1286523
(cherry picked from commit 0492f1158a78f53c08a197c6276393093989a048)
(gasati: header bluedroid_pm.h is not present in k4.14 hence
patch does not delete it)
Reviewed-on: https://git-master.nvidia.com/r/1775106
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Gaurav Asati <gasati@nvidia.com>
Tested-by: Gaurav Asati <gasati@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agomisc: bluedroid_pm: Fix module remove
Bibek Basu [Fri, 22 Apr 2016 09:22:36 +0000 (14:52 +0530)]
misc: bluedroid_pm: Fix module remove

Added dev_id to free_irq and checked for
valid gpio while freeing

Bug 200193367
Bug 200173713

Change-Id: I694b398fc7aab1628f01c7e47ea6f21d4beaab71
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/1132380
(cherry picked from commit a7d9b15a70fc6b2ffe2170f9860a7ced214c28f4)
Reviewed-on: https://git-master.nvidia.com/r/1775105
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Asati <gasati@nvidia.com>
Tested-by: Gaurav Asati <gasati@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agomisc: bluedroid_pm: fix memory corruption
Manikanta [Wed, 11 May 2016 06:56:18 +0000 (12:26 +0530)]
misc: bluedroid_pm: fix memory corruption

- rfkill is freed in rfkill_destroy, no need to
free rfkill again in bluedroid_pm driver
- correct the cleanup sequence in probe and
create_bt_proc_interface functions

bug 200195922
bug 200191319

Change-Id: I12709810f250930f220c4975a0e046180dadd296
Signed-off-by: Manikanta <mmaddireddy@nvidia.com>
Reviewed-on: http://git-master/r/1145305
(cherry picked from commit a18a8bafa8c28e4644730bd91a2a17e9267ce2b1)
Reviewed-on: https://git-master.nvidia.com/r/1775104
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Asati <gasati@nvidia.com>
Tested-by: Gaurav Asati <gasati@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agomisc: bluedroid_pm: remove IRQF_DISABLED
Bharat Nihalani [Fri, 27 May 2016 05:57:28 +0000 (11:27 +0530)]
misc: bluedroid_pm: remove IRQF_DISABLED

IRQF_DISABLED is a NOOP and has been removed now.

Bug 200197107

Change-Id: I63a73d6cc92846259fd8a6913fc87e1c33e0fa36
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-on: http://git-master/r/1154930
(cherry picked from k4.9 commit
6604ce7f2eaebad3f37adf4041625eb2ff8d4204)
Reviewed-on: https://git-master.nvidia.com/r/1775103
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gaurav Asati <gasati@nvidia.com>
Tested-by: Gaurav Asati <gasati@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: misc: add bluedroid_pm drver
Gaurav Asati [Sun, 8 May 2016 17:17:45 +0000 (22:47 +0530)]
drivers: misc: add bluedroid_pm drver

This driver is implemented to actively manage the bluetooth radio power and
control wake interface from bluetooth radio to host processor.
Two interfaces are used to manage bluetooth radio power

RFKILL: This interface is used to toggle rfkill switches which are controlled
by gpios and voltage regulators. This interface is created only when
bluetooth radio requires one of rfkill switches [GPIO/ Voltage regulators]
Driver assumes vdd_bt_3v3 as consumer name for 3V regulator and
vddio_bt_1v8 as consumer name for 1.8V regulator

PROCFS: Using procfs interface, driver controls BT chip ext_wake GPIO to
enable/disable BT chip LPM. This interface is created only when bluetooth
module supports LPM mode control using GPIO

This driver assumes platform data is passed from the board files to configure
IO parameters needed to control bluetooth radio.

"shutdown_gpio" is resource name to register radio's Enable/Shutdown gpio
"reset_gpio" is resource name to regster radio's reset gpio
"gpio_ext_wake" is resource name to register radio's ext_wake gpio
"gpio_host_wake" is resource name to register host wake gpio
"host_wake" is resource name to register host wake irq

Bug 200197107

Change-Id: Ida4c9388547e01ba15def93f91af595a79fa4497
Signed-off-by: Gaurav Asati <gasati@nvidia.com>
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: http://git-master/r/1143283
(cherry picked from k4.9 commit
3f81df5f0050a3326df38961bc33036f757a6fa1)
Reviewed-on: https://git-master.nvidia.com/r/1775102
Tested-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: default mode support for fbconsole
Naveen Kumar S [Tue, 17 Jul 2018 13:55:34 +0000 (19:25 +0530)]
video: tegra: default mode support for fbconsole

First mode from EDID is chosen for fbconsole without applying any
sort of filtering. This lead to choosing modes which were not
always guaranteed to be supported by our hardware. To overcome such
cases, we are adding support for users to specify a default mode for
fbconsole. Other userspace applications will have to choose the best
mode based on their requirements.

To avoid any impact on platforms that might prefer the earlier logic
of using the first mode from monitor's modelist, default mode for
fbconsole will be set only if a mode is specified through
"nvidia,fbcon-default-mode" property in DT.

Refactored code. Created a new function for fbcon default mode parsing
logic and used tegra_dc_set_fbcon_boot_mode() to set early dc mode for
fbconsole. Added edid parameter to tegra_dc_set_fbcon_boot_mode() and
moved its declaration to dc_privs.h as edid.h is already available in
this header file.

bug 200308135

Change-Id: Id69a10b8b7b85176dacc4a9127ef0707aea3c4ca
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1563131
(cherry picked from commit a5e01c17dbc55fd0153790ddbded5e017a6f7999)
Reviewed-on: https://git-master.nvidia.com/r/1780977
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agothermal: pwm-fan: Add K4.14 support
Krishna Yarlagadda [Mon, 16 Jul 2018 11:53:22 +0000 (04:53 -0700)]
thermal: pwm-fan: Add K4.14 support

Include sched/clock.h header as sched_clock api is moved to this in K4.14
Also fix cleanup for probe failures. Probe defer functionality works with this

Bug 200430924

Change-Id: Ia55ab7aeb6b7cfca969c4848a2fa71d3895d764f
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1779750
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agothermal: pwm_fan: Add platform data
Anshul Jain [Sat, 1 Dec 2012 00:41:54 +0000 (16:41 -0800)]
thermal: pwm_fan: Add platform data

pwm_fan driver is moved to nvidia repo and platform data related
to it is pulled from below commits

Bug 200430924
Bug 1179033
Bug 1259204
Bug 1261177
Bug 1259488
Bug 1259204
Bug 1388303
Bug 1399542
Bug 1489876

Change based on below commits from linux-4.9
2c03205c thermal: pwm_fan: Add PWM controlled fan driver
e4443760 thermal: pwm_fan: Add sysfs node for state cap
2e2f0810 thermal: pwm_fan: Add support for look up table
f0e562bc thermal: pwm_fan: toggle gpio in suspend/resume
132ef9d7 arm:tegra:loki: update fan pwm period

Signed-off-by: Anshul Jain <anshulj@nvidia.com>
Change-Id: Ia6d99e22c8a32e8a98f7a54073397721c65f220f
Reviewed-on: https://git-master.nvidia.com/r/1780502
Reviewed-by: Ajay Nandakumar M <anandakumarm@nvidia.com>
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Tested-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Ajay Nandakumar M <anandakumarm@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: Fix support for I2S mono playback
Jon Hunter [Thu, 12 Jul 2018 15:39:43 +0000 (16:39 +0100)]
ASoC: tegra-alt: Fix support for I2S mono playback

Mono playback via the RT5658 codec on the Jetson TX1/TX2/Xavier is
distorted. Although the RT5658 codec is configured for standard I2S
timings (implying 2 channels), the Tegra XBAR should convert the mono
audio track from one channel to two channels. The problem is caused
because the 'CHANNEL_BIT_CNT' field in the I2S Timing Register is
being configured incorrectly. For mono playback in I2S mode (or LRCK
mode) the CHANNEL_BIT_CNT is being set to 31 instead of 15 by fixing
this mono playback works as expected.

Please note that the 'bitcnt' value programmed into the I2S Timing
Register is verified to see that it is not bigger than the mask for
the CHANNEL_BIT_CNT field. However, this is done before we shift the
bitcnt by 1 for I2S mode. Therefore, ensure the bitcnt is shifted by
1 before we do the check.

Mono playback has been tested by playing the following audio clip ...

aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Center.wav

Bug 2257806

Change-Id: I4d306ccef891282e96c300d90bad2a5b6efc9968
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1777096
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonvlink: t19x: Remove 25GBPS speed support
Seema Khowala [Tue, 10 Jul 2018 20:29:14 +0000 (13:29 -0700)]
nvlink: t19x: Remove 25GBPS speed support

Based on A01 Silicon Characterization, we cannot meet Nvlink POR speeds
of 25G across 100% bin and hence 25GBPS is defeatured.

Bug 200425755
Bug 2083356

Change-Id: Ia2166370413571787040e57ade299e3c136f4d5e
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1775462
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agomisc: tegra-profiler: fix build errors on k4.14
Igor Nabirushkin [Sun, 8 Jul 2018 19:17:39 +0000 (22:17 +0300)]
misc: tegra-profiler: fix build errors on k4.14

Fix build errors on k4.14:

- A few minor changes.
- Do not use cpu hotplug notifier for k4.14.

Bug 2247414

Change-Id: I51221d08f6e8b7aaa37a7e719da8586cf93288a8
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1773927
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: Dmitry Antipov <dantipov@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agomedia: capture: update closing capture channel
Songhee Baek [Sat, 14 Jul 2018 21:37:10 +0000 (14:37 -0700)]
media: capture: update closing capture channel

+ fix kernel spew while capture_shut_down
  Once channel_release is called, callback of control channel will be
  unregistered so csi_stream_close should be called
  before channel_release
+ call channel_reset before release to make sure to stop the capture
  channel.

Bug 2179959
Bug 2047638

Change-Id: I0c502f163cec28e83832d3b3e415c3ac7037cde8
Signed-off-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1778436
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com>
Reviewed-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra: bwmgr: update cooling dev register call
Sanjay Chandrashekara [Fri, 29 Jun 2018 20:41:28 +0000 (13:41 -0700)]
tegra: bwmgr: update cooling dev register call

bwmgr cooling device used thermal_cooling_device_register earlier
and has been updated to use thermal_of_cooling_device_register as
kernel 4.14 supports only the latter.

Bug 2227106

Change-Id: I47eb419b5a950b5f5551d2ac5c5107187a984e43
Signed-off-by: Sanjay Chandrashekara <sanjayc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1765964
Reviewed-by: Srikar Srimath Tirumala <srikars@nvidia.com>
Reviewed-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodriver: aotag: Use pmc driver for pmc reg access
kalyani chidambaram [Wed, 13 Jun 2018 17:59:11 +0000 (10:59 -0700)]
driver: aotag: Use pmc driver for pmc reg access

Replace the direct access to pmc registers with access via. pmc driver.

Bug 1811649

Change-Id: Ifbd944e0e81dd0009256e81a453f3c38e319177c
Signed-off-by: kalyani chidambaram <kalyanic@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1744182
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Srikar Srimath Tirumala <srikars@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoiommu: dma-override: do not use it for kernel-4.14
Pritesh Raithatha [Mon, 9 Jul 2018 12:22:09 +0000 (17:52 +0530)]
iommu: dma-override: do not use it for kernel-4.14

Kernel-4.14 is not using this dma override function so skip it
for K4.14.

Bug 200427376

Change-Id: I10f76ade31cd278df7c309440c991fa140cf43e0
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774425
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoplatform: tegra: create generic debugfs for RAS error inject
Sumit Gupta [Wed, 4 Jul 2018 12:56:32 +0000 (18:26 +0530)]
platform: tegra: create generic debugfs for RAS error inject

Creating generic debugfs node for injecting
RAS errors(one of each type).

How to use:
  - reading the node gives help info about using.
      cat /d/RAS_MCA_ERR-trip
  - write node to cause error.
    e.g:
echo EEDDCCBBAA > /d/RAS_MCA_ERR-trip
where:
   EE[32-39] - L3_Bank_ID
   DD[24-31] - Logical_Cluster_ID
   CC[16-23] - Logical_CPU_ID
   BB[08-15] - Error type(Corr is 0, UnCorr is 1)
   AA[00-07] - Unit
        Unit numbers will be printed in help info on reading same node

Bug 200420692

Change-Id: Ib83548b1781a55e9b980b0a506b93d5ef14b5119
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770600
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: nvmap: alloc 6, 4K pages for 6 cv devs
Puneet Saxena [Mon, 16 Jul 2018 06:06:23 +0000 (11:36 +0530)]
video: tegra: nvmap: alloc 6, 4K pages for 6 cv devs

gos mem requirement is to allocate 6, 4K pages from
kernel common heap.

In K4.9, dma_alloc_coherent has legacy support of
allocating from iomem heap even if "device pointer"
is passed as NULL. Gos mem code was passing device pointer
NULL to allocate 6, 4K pages.

On K4.14, the support is removed. dma_alloc_coherent()
will succeed only if passed, not NULL device pointer.

As there is no requirement of creating gosmem device and
each 4K pages for CV devices may be discontiguous,
using Vmalloc to allocate 6, 4K pages.

Bug 200430056

Change-Id: Idc43b1ee3565fe1d66470035a2a68a681e81abce
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1778946
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: nvmap: fix return value check of _dma_declare_coherent_memory
Pritesh Raithatha [Mon, 16 Jul 2018 06:06:23 +0000 (11:36 +0530)]
video: tegra: nvmap: fix return value check of _dma_declare_coherent_memory

Kernel-4.9 and before _dma_declare_coherent_memory function was not reporting
failure. We updated the code to return the same mapping flag(MAP/NOMAP/IO)
in case of succeed.

Kernel-4.14 upstream is updated to return error in case of failure so
updating return value check in nvmap heap.

Change-Id: I00684c38def2968150bc144083d560c2528d558a
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1778869
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
Tested-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: ufs: increase timeout on suspend
dmitry pervushin [Sat, 30 Jun 2018 12:25:13 +0000 (14:25 +0200)]
drivers: ufs: increase timeout on suspend

shutdown needs to be completed in 500 msec

Change-Id: Ib88b6d6f30e381703971583e3332fe6a1326c74b
Signed-off-by: dmitry pervushin <dpervushin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1766448
Reviewed-on: https://git-master.nvidia.com/r/1770462
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rahul Jain (SW-TEGRA) <rahuljain@nvidia.com>
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoiommu: arm-smmu: set SMRG GROUP MAX to 128
Pritesh Raithatha [Tue, 17 Jul 2018 06:42:27 +0000 (12:12 +0530)]
iommu: arm-smmu: set SMRG GROUP MAX to 128

Tegra SoC has 128 SMRG(SMR and S2CR). Updating SMRG_GROUP_MAX to 128.

Bug 200383912

Change-Id: I51b1818a507d50b5bc70f5cda70d277c9406ff76
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1779792
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: isp: Perform reset at channel close
Bhanu Murthy V [Mon, 16 Jul 2018 20:50:55 +0000 (13:50 -0700)]
drivers: isp: Perform reset at channel close

Reset ISP channel before closing the channel ensures
the context is cleaned up for all the requests.

Bug 2047639

Change-Id: Ifd5182acc9b54708612069591484cb83c3d47170
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1779409
Reviewed-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-by: Vincent Chung <vincentc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: dpaux: Get reset clock regardless of bpmp
Mark Zhang [Fri, 13 Jul 2018 08:29:12 +0000 (16:29 +0800)]
video: tegra: dpaux: Get reset clock regardless of bpmp

This patch removes the "tegra_bpmp_running" check before getting
dpaux reset clock, because:
- We only do that for dpaux reset clock which is confusing
- On T210, bpmp FW won't present in the end which makes dpaux
  reset clock missing

Bug 200416228

Change-Id: I708d846d9a5cea7483a0c869afb67696b326047d
Signed-off-by: Mark Zhang <markz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1777669
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: dpaux: Get dpaux clock from DT on T210
Mark Zhang [Fri, 13 Jul 2018 08:24:49 +0000 (16:24 +0800)]
video: tegra: dpaux: Get dpaux clock from DT on T210

T210 is using DT describing dpaux clock now, clk_get_sys doesn't
work on Darcy. So now we can retrieve the dpaux clock from DT
regardless of soc generations.

Bug 200416228

Change-Id: Ibd8783a5b4b79047f69fa976e0636d7622232303
Signed-off-by: Mark Zhang <markz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1777663
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra-alt: adsp: update index for send bytes ctrl
Hariharan Sivaraman [Wed, 11 Jul 2018 07:09:01 +0000 (12:39 +0530)]
tegra-alt: adsp: update index for send bytes ctrl

Number of ADSP plugins were increased to 20. The
PLUGIN_SEND_BYTES_IDX macro should be updated to reflect
the same.

Bug 2048629

Change-Id: Ia02361600530f88b133eae1a67e440570e19dfb4
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1775907
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Uday Gupta <udayg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agospi: tegra: Add spi driver for Aurix-Tegra communication
Theodoros Marinakis [Sun, 15 Jul 2018 23:32:57 +0000 (16:32 -0700)]
spi: tegra: Add spi driver for Aurix-Tegra communication

Add SPI Protocol driver responsible for receiving the system
state transition request sent from Aurix and triggering the
corresponding command.

JIRA STR-438

Bug 2061083

Change-Id: I443b3ecf67d55d213e2e3680b451ed37bbdc4429
Signed-off-by: Theodoros Marinakis <tmarinakis@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1765019
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocrypto: tegra-se: Disable SE context save
Mallikarjun Kasoju [Tue, 10 Apr 2018 11:45:57 +0000 (17:15 +0530)]
crypto: tegra-se: Disable SE context save

Disable SE context save in SE driver as it
is handled in TZ driver.

Bug 2091033

Change-Id: Ie292817668465768784c7a654b52538413e30173
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1692068
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra_cec: suppport dump registers and snoop mode
Chun Xu [Fri, 19 Jan 2018 03:08:51 +0000 (11:08 +0800)]
tegra_cec: suppport dump registers and snoop mode

Provide dump registers and changingRX snoop mode interface.

Bug 200382184

Change-Id: Idb55d22112bc6be9de89b8ff8e060e73de469507
Signed-off-by: Chun Xu <chunx@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1765068
(cherry picked from commit 3310df0f117d792d3d0bfab6326592851faaeed7)
Reviewed-on: https://git-master.nvidia.com/r/1641846
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoPCI: dwc: tegra: add host controller driver
Vidya Sagar [Sun, 8 Jul 2018 03:31:37 +0000 (09:01 +0530)]
PCI: dwc: tegra: add host controller driver

Adds host controller driver for Tegra's Designware
IP based PCIe controller implementation

Bug 200415690

Change-Id: I63b4554b44c88c10c82126de61f62d29ffe0d81b
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1773623
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoMerge remote-tracking branch 'origin/dev/13_7' into HEAD
Mudit Jain [Fri, 13 Jul 2018 10:42:27 +0000 (16:12 +0530)]
Merge remote-tracking branch 'origin/dev/13_7' into HEAD

Import history for i2c-tegra-hv.c and i2c-tegra-hv-common.c
Build virtualized i2c driver from nvidia repo

Jira SSV-1826

Change-Id: If3f84f148b0a0c8cfc077e831e6efc8ba34c1a23
Signed-off-by: Mudit Jain <muditj@nvidia.com>
6 years agoMerge "Merge remote-tracking branch 'origin/dev/vannapurve_virt_storage_13_7' into...
Gerrit Code Review [Mon, 16 Jul 2018 19:06:49 +0000 (12:06 -0700)]
Merge "Merge remote-tracking branch 'origin/dev/vannapurve_virt_storage_13_7' into dev-kernel" into dev-kernel

6 years agothermal: throttle: register via of cooling i\f
Srikar Srimath Tirumala [Thu, 28 Jun 2018 22:32:14 +0000 (15:32 -0700)]
thermal: throttle: register via of cooling i\f

Thermal framework requires DT based cooling devices to use the _of_
registration routine in order to bind correctly with the thermal
zones. The non _of_ registration uses name based cooling device
registration which does not exist upstream.

Replace the name based registration with of based registration so
that the driver continues to work with K4.14 and future kernels
without the need for downstream changes.

Bug 2125602
Bug 2227106

Change-Id: If3150ea78c3fa4beefb66ecda8c3d5559c9df9fc
Signed-off-by: Srikar Srimath Tirumala <srikars@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1764793
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Wei Ni <wni@nvidia.com>
Tested-by: Wei Ni <wni@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agokernel: remove trace_printk users
dmitry pervushin [Thu, 19 Apr 2018 18:30:04 +0000 (20:30 +0200)]
kernel: remove trace_printk users

Bug 2089957

Change-Id: I1e5c869a19133918effd20d3bb76e10c7f4634a5
Signed-off-by: dmitry pervushin <dpervushin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1698695
Reviewed-on: https://git-master.nvidia.com/r/1776084
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Vipin Kumar <vipink@nvidia.com>
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodenver: cpu notifier API compatibility
Sachin Nikam [Tue, 3 Jul 2018 11:16:40 +0000 (16:46 +0530)]
denver: cpu notifier API compatibility

In K4.14 below APIs are deprecatd:
cpu_register_notifier
register_hotcpu_notifier
cpu_unregister_notifier

Using cpuhp_setup_state_nocalls instead for K4.14

Bug 200427682

Change-Id: I146bf0336dff613f7c25c2c8b053aa450986405b
Signed-off-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1769210
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: dc: add k4.14 stub tegra_get_fb_resource
Bitan Biswas [Wed, 11 Jul 2018 11:42:02 +0000 (17:12 +0530)]
video: tegra: dc: add k4.14 stub tegra_get_fb_resource

Add stub tegra_get_fb_resource for kernel version
after k4.9

bug 200416228

Change-Id: I971479cecb94850dc3a3f657b61ba7c44e1b3d07
Signed-off-by: Anshuman Kar <anshumank@nvidia.com>
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1776076
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo,hid: enable switch based on CONFIG_SWITCH
Anshuman Kar [Wed, 11 Jul 2018 04:22:05 +0000 (23:22 -0500)]
video,hid: enable switch based on CONFIG_SWITCH

switch.h header inclusion done when CONFIG_SWITCH
is defined. Calls to switch APIs in hid jarvis
conditional on the config.
 - update hid-atv-jarvis.c and
   video/tegra/dc/dc_priv_defs.h

bug 200205754

Change-Id: I10876af64bd4d9c5afb6a8c22019f314e6bcc8f0
Signed-off-by: Anshuman Kar <anshumank@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1775787
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: tegra23x: define arch config for T23x
Hemant Nigam [Thu, 14 Jun 2018 23:52:53 +0000 (16:52 -0700)]
arm64: tegra23x: define arch config for T23x

Add CONFIG_ARCH_TEGRA_23x_SOC. All T23x specific configs
will "depends on" this. They config will be marked default n
for now.

Bug 2124727

Change-Id: I11f89c5de37b3820e267071dd2ac4f69b9a9fcae
Signed-off-by: Hemant Nigam <hnigam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1751098
Reviewed-by: Vignesh Radhakrishnan <vigneshr@nvidia.com>
Reviewed-by: Chetan Kumar <chetankumarn@nvidia.com>
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra_bootloader_debug: BCP data from bootloader
Taborowski Lukasz [Wed, 11 Jul 2018 09:51:21 +0000 (11:51 +0200)]
tegra_bootloader_debug: BCP data from bootloader

Information about BCP location is passed in bootargs. Kernel maps
BCP location as memory reserved block to prevent from overwriting it.
If kernel receives boot_cfg_dataptr then new module bcp is loaded.
This means that BCP data is available at /sys/kernel/boot_cfg location.
Additionally, extended the tegra_bootloader_debug module to BCP area.
After the module is loaded, debugfs exposes new file the boot_cfg.

Bug 1850555
Bug 200396169

Change-Id: I013473d100c7dd64e6fc55227a98a9d6ce2bf3c1
Signed-off-by: Virupax.Sadashivpetimath <virupaxs@nvidia.com>
Reviewed-on: http://git-master/r/1269284
Reviewed-on: https://git-master.nvidia.com/r/1694542
Signed-off-by: dmitry pervushin <dpervushin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1776006
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonvadsp: prevent race in os_queue for app
Dipesh Gandhi [Mon, 12 Feb 2018 12:51:37 +0000 (18:21 +0530)]
nvadsp: prevent race in os_queue for app

Change add spinlock to nvadsp app start and init
functions for os_queue write protection. It make
sure only one app from different context can update
queue at given time.
Also added some debug info to adsp driver for providing
extra info for debugging purpose.

Bug 2060866

Signed-off-by: Dipesh Gandhi <dipeshg@nvidia.com>
Change-Id: If1bbfdb233d2af984f62bb02ed515eec1ab8a492
Reviewed-on: https://git-master.nvidia.com/r/1655974
(cherry picked from commit 7edeb242aba4cabc517b6e270b254777e3ea66ea)
Reviewed-on: https://git-master.nvidia.com/r/1775133
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoplatform: tegra: update RAS error codes
Sumit Gupta [Mon, 9 Jul 2018 13:07:00 +0000 (18:37 +0530)]
platform: tegra: update RAS error codes

Updating ERR<x>CTLR bits and IERR codes to report correct error.
RAS/MCA error codes and bits have been changed in recent MTS code
due to which error info will not be reported correctly. So, updating
related codevalues and bits in RAS driver as per latest sheet
from MTS member "New_MCA_20180619_0114.xlsx".

Bug 200420692

Change-Id: If5268a8f0b8005cf97b147b154b9249529c108ec
Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774516
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonvadsp: Add get file size support to adspff APP
Uday Gupta [Fri, 22 Jun 2018 08:43:05 +0000 (14:13 +0530)]
nvadsp: Add get file size support to adspff APP

Add adsp_fsize support

Bug 2060675

Change-Id: I288d09c290eab940547c76654fa5708efc40724d
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1775909
GVS: Gerrit_Virtual_Submit
Tested-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Swati Sachdeva <ssachdeva@nvidia.com>
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: host: Return zero for get_rate if clock is disabled
Mikko Perttunen [Tue, 3 Jul 2018 10:44:18 +0000 (13:44 +0300)]
video: tegra: host: Return zero for get_rate if clock is disabled

Current code calls nvhost_module_busy on an engine before getting its
clock rate to force clocks on. This will keep the engine always on if
a UMD is frequently polling the engine's frequency. Remove the busy
call and return zero if the clock is disabled.

Bug 2114935
Jira HOSTX-352

Change-Id: I307226f198d18d2644455e30ab170f51474b392f
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1769174
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoMerge remote-tracking branch 'origin/dev/vannapurve_virt_storage_13_7' into dev-kernel
Vishal Annapurve [Fri, 13 Jul 2018 12:04:40 +0000 (17:34 +0530)]
Merge remote-tracking branch 'origin/dev/vannapurve_virt_storage_13_7' into dev-kernel

Jira SSV-1816
Change-Id: I97f6b6c8cac9c94ff185ed899f0cf6a51fb67d2c
Signed-off-by: Vishal Annapurve <vannapurve@nvidia.com>
6 years agovirt_storage: Enable virtual storage build
Vishal Annapurve [Fri, 13 Jul 2018 07:30:03 +0000 (13:00 +0530)]
virt_storage: Enable virtual storage build

Jira SSV-1816

Change-Id: Ie3c5f64c74007042807f8e81fbc3cf114430c8a7
Signed-off-by: Vishal Annapurve <vannapurve@nvidia.com>
6 years agoi2c-hv : Add t19x compatible in the match table for of_platform binding
Mudit Jain [Tue, 31 Oct 2017 02:55:47 +0000 (08:25 +0530)]
i2c-hv : Add t19x compatible in the match table for of_platform binding

Jira SSV-903

Change-Id: Ief0476399ea55b95cf5227ed8a76a763602250d5
Reviewed-on: https://git-master.nvidia.com/r/1588890
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Tested-by: Mudit Jain <muditj@nvidia.com>
Reviewed-by: Nitin Sehgal <nsehgal@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoi2c: busses: i2c-tegra-hv: Add suspend/resume handler
Jinyoung Park [Tue, 29 Aug 2017 08:40:10 +0000 (17:40 +0900)]
i2c: busses: i2c-tegra-hv: Add suspend/resume handler

In suspend handler, it blocks i2c transfer, disables irq and waits for
the work to finish.
In resume handler, it enables irq and unblocks i2c transfer.

STR-390

Change-Id: I8244bb8f00fba4bbb48e4caa43123c964b8e29a3
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1547599
Reviewed-by: Vishal Annapurve <vannapurve@nvidia.com>
Reviewed-by: Nitin Sehgal <nsehgal@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kurt Yi <kyi@nvidia.com>
6 years agoi2c: Increase the maximum number of channels
Naman Patel [Tue, 15 Nov 2016 09:56:59 +0000 (15:26 +0530)]
i2c: Increase the maximum number of channels

DPX2 with hyp-linux requires upto 9 channels so
increasing the number of channels to 10 to be
on safer side.

Bug ID: 200251876

Change-Id: I84bbf39a65d467e6f74370287bbf9b1942526a56
Signed-off-by: Naman Patel <namanp@nvidia.com>
Reviewed-on: http://git-master/r/1253448
(cherry picked from commit 565b94d472d4270492881f374569b7df0b2f7968)
Reviewed-on: https://git-master.nvidia.com/r/1489795
Tested-by: Haley Teng <hteng@nvidia.com>
Reviewed-by: Joshua Cha <joshuac@nvidia.com>
Reviewed-by: Haley Teng <hteng@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agoi2c-tegra-hv: Add bus clock rate implementation
Arnab Basu [Fri, 2 Dec 2016 09:26:48 +0000 (14:56 +0530)]
i2c-tegra-hv: Add bus clock rate implementation

At the moment this is "dummy" in the sense that it is not passed
to the i2c server. This will be added later.

Bug 200256490

Change-Id: Id3deb251f1d7df57b1a8f9f856d2c54d8296f7cf
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/1263776
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1489793
Reviewed-by: Vishal Annapurve <vannapurve@nvidia.com>
Tested-by: Vishal Annapurve <vannapurve@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
6 years agoi2c: replace spin_lock with mutex
dmitry pervushin [Wed, 9 Aug 2017 18:07:21 +0000 (20:07 +0200)]
i2c: replace spin_lock with mutex

This spinlock serializes calls to _hv_i2c_get_comm_dev, that is called
only from probe. There is no need to disable interrupts, replacing
spinlock with mutex

Bug 1954228

Change-Id: I691d16695b53aa3c4f8e2bd6c40cbcaeeab58896
Signed-off-by: dmitry pervushin <dpervushin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1535950
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agoi2c: i2c-tegra-hv: fix global-out-of-bounds in tegra_hv_i2c_devtype
Pritesh Raithatha [Thu, 25 May 2017 05:42:31 +0000 (11:12 +0530)]
i2c: i2c-tegra-hv: fix global-out-of-bounds in tegra_hv_i2c_devtype

Adding empty bracket at end of array to fix following KASAN defect:

BUG: KASAN: global-out-of-bounds in platform_match+0xbc/0x120
at addr ffff20000b3305e0
Address belongs to variable tegra_hv_i2c_devtype+0x20/0x6e0
...
[<ffff2000089f76cc>] driver_register+0xb4/0x198
[<ffff2000089f93e0>] __platform_driver_register+0x90/0xa0
[<ffff20000a0ce7c8>] tegra_hv_i2c_init_driver+0x18/0x20

Bug 200312168

Change-Id: I0751a478cf3aed5e41ce2a67d3afd17bbd4a3a4a
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/1489429
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
6 years agoi2c-tegra-hv: Prevent negative offset into buffer
Arnab Basu [Wed, 10 Feb 2016 06:20:47 +0000 (11:50 +0530)]
i2c-tegra-hv: Prevent negative offset into buffer

Coverity caught at scenario where we might try to add a
negative offset to a buffer pointer. Add handling for this
case.

Bug 200116059

Change-Id: I86f1ecfcfd56dc990c9b93d5d303a085b65b2d08
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/1010285
Reviewed-on: http://git-master/r/1198254
Reviewed-on: http://git-master/r/1314822
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c: Mark _hv_i2c_get_comm_dev as static
Arnab Basu [Fri, 29 Jan 2016 10:12:54 +0000 (15:42 +0530)]
i2c: Mark _hv_i2c_get_comm_dev as static

The function was intended to be a static function
the missed annotation is causing warnings from
Sparse

Bug 200088648

Change-Id: I8921df229b01fa06e6c74766a824c30a88504db0
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/999937
Reviewed-on: http://git-master/r/1198253
Reviewed-on: http://git-master/r/1314821
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c-tegra-hv: Add T186 compatible string
Arnab Basu [Mon, 30 Nov 2015 06:39:29 +0000 (12:09 +0530)]
i2c-tegra-hv: Add T186 compatible string

VFND-1062

Change-Id: I3d88f39d589c2bb6b73ca2f099169b4d072b5f7f
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/839110
Reviewed-on: http://git-master/r/1198251
Reviewed-on: http://git-master/r/1314820
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agodts/t210: i2c-tegra-hv: Move Linux to i2c server
Arnab Basu [Thu, 25 Jun 2015 10:05:09 +0000 (15:35 +0530)]
dts/t210: i2c-tegra-hv: Move Linux to i2c server

In virtualized environment Linux will use the virtualized
i2c driver instead of the hardware i2c driver

Bug 200096489

Change-Id: I167a69e15eca04776355d6bbbdbc3cf81e0bff8a
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/765887
Reviewed-on: http://git-master/r/1198241
Reviewed-on: http://git-master/r/1314819
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c-tegra-hv: Move call to add_numbered_adapter to end of probe
Arnab Basu [Wed, 1 Jul 2015 06:25:29 +0000 (11:55 +0530)]
i2c-tegra-hv: Move call to add_numbered_adapter to end of probe

In kernel-3.18 the kernel thinks that the i2c adapter is
ready to be used as soon as i2c_add_numbered_adapter is
called. So we need to make sure that this is our last call
in probe.

Bug 200119646
VFND-202

Change-Id: I915e47dfb6c9efe0ac119b593656c809611ed23c
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/764787
Reviewed-on: http://git-master/r/1198240
Reviewed-on: http://git-master/r/1314818
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c-tegra-hv: Send controller base address
Arnab Basu [Fri, 26 Jun 2015 11:07:09 +0000 (16:37 +0530)]
i2c-tegra-hv: Send controller base address

Identify i2c controller using base address instead
of an arbitrarily assigned controller id

Bug 200096489
VFND-193

Change-Id: I0abd3940c76cbad9fab59ea0f1a2b8bd228ac7fd
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/764786
Reviewed-on: http://git-master/r/1198239
Reviewed-on: http://git-master/r/1314817
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c/i2c-tegra-hv: Fixes for upstream API changes
Arnab Basu [Fri, 15 May 2015 09:23:16 +0000 (14:53 +0530)]
i2c/i2c-tegra-hv: Fixes for upstream API changes

of_i2c_register_devices is now called from within i2c_add_numbered_adapter
ref commit 687b81d083c082bc1e853032e3a2a54f8c251d27

INIT_COMPLETION has now been replaced with reinit_completion
ref commit 62026aedaacedbe1ffe94a3599ad4acd8ecdf587

Bug 200105222

Change-Id: Ib69fce9299ab5e48f1e43897c4fb6d9a0b87fc4c
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Signed-off-by: Ishan Mittal <imittal@nvidia.com>
Reviewed-on: http://git-master/r/1198238
Reviewed-on: http://git-master/r/1314816
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c-tegra-hv: Fix guest reset handling
Arnab Basu [Thu, 16 Apr 2015 11:37:18 +0000 (17:07 +0530)]
i2c-tegra-hv: Fix guest reset handling

There was a race and i2c was only successfully initialized if the
ivc channel state successfully changed to established before the
first message was transmitted. This commit fixes that issue.

Bug 200097082

Change-Id: Iaff773eacef2e1c9ec04d3fbfbc0288a021ce105
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/732250
(cherry picked from commit 9bede6491e197cf948dc0bc1f09ddfca5f30ce66)
Reviewed-on: http://git-master/r/738101
Reviewed-on: http://git-master/r/1198235
Reviewed-on: http://git-master/r/1314815
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Bahadir Balban <bbalban@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c-tegra-hv: Fix incorrect error print
Arnab Basu [Mon, 6 Apr 2015 04:44:52 +0000 (10:14 +0530)]
i2c-tegra-hv: Fix incorrect error print

Remove incorrect reporting of an error situation due to checking of
an uninitialized variable.

Bug 200069021

Change-Id: Idb65f4d5969f1cf0b9e2e8f32286cf86b9672b20
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/727904
(cherry picked from commit 398c27859a6945e89c6ee78d72c9ce34d063dff1)
Reviewed-on: http://git-master/r/729578
(cherry picked from commit 5988b23d5df2de4ba12a4e8cac55f749b06cdc2f)
Reviewed-on: http://git-master/r/738100
Reviewed-on: http://git-master/r/1198234
Reviewed-on: http://git-master/r/1314803
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Bahadir Balban <bbalban@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c-tegra-hv: Add guest reset handling
Arnab Basu [Tue, 31 Mar 2015 07:41:35 +0000 (13:11 +0530)]
i2c-tegra-hv: Add guest reset handling

This patch modifies the i2c driver behavior after sending a cleanup request
and adds support for guest reset.

Bug 200069021

Change-Id: I185f61cb5598a48f1127413c1f116bc6d491eb03
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/725565
(cherry picked from commit 73ce692b31b9dbd71ce0f49364cdb7f23a3db646)
Reviewed-on: http://git-master/r/729565
(cherry picked from commit f418aecc581a900f6d123384cf32429d2d835c8c)
Reviewed-on: http://git-master/r/738099
Reviewed-on: http://git-master/r/1198233
Reviewed-on: http://git-master/r/1314802
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Bahadir Balban <bbalban@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c-tegra-hv: Fixes to driver based on review
Arnab Basu [Sat, 21 Mar 2015 19:58:58 +0000 (01:28 +0530)]
i2c-tegra-hv: Fixes to driver based on review

- Remove slave reg from IVC message
- Add support for 10 bit i2c addresses

Bug 200069021

Change-Id: I70afb51feaaa1cb30a48c9c7d549215d5e0d3d2f
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/724581
(cherry picked from commit a3c66f77ccfd6916cbe7566715629fdb96081ada)
Reviewed-on: http://git-master/r/720611
(cherry picked from commit e74f6ef92a76f201775a19a2977b9cd8ed0ed70d)
Reviewed-on: http://git-master/r/738098
Reviewed-on: http://git-master/r/1198232
Reviewed-on: http://git-master/r/1314801
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Bahadir Balban <bbalban@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agoi2c/busses: Add tegra HV I2C driver
Arnab Basu [Tue, 20 Jan 2015 06:27:57 +0000 (11:57 +0530)]
i2c/busses: Add tegra HV I2C driver

This is the driver to be used when Linux runs as a guest in the
virtualization environment. It expects an i2c server to be present
and will communucate with the server over IVC.

Bug 200069021

Change-Id: I37e945e52b5470f8fb1478093e41e6ff2118e7b0
Signed-off-by: Arnab Basu <abasu@nvidia.com>
Reviewed-on: http://git-master/r/709378
Reviewed-on: http://git-master/r/1198220
Reviewed-on: http://git-master/r/1314789
Reviewed-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Tested-by: Aniruddha Banerjee <aniruddhab@nvidia.com>
Reviewed-by: Bahadir Balban <bbalban@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agomtd: virt spi: Add Suspend/resume support
Vishal Annapurve [Fri, 8 Jun 2018 11:40:54 +0000 (17:10 +0530)]
mtd: virt spi: Add Suspend/resume support

This change adds suspend/resume support in virtual
MTD device driver.

Jira SSV-1437

Change-Id: I89b176a10c1e206c78a33cc21b5c786b76cd9a9e
Reviewed-on: https://git-master.nvidia.com/r/1753216
Tested-by: Vishal Annapurve <vannapurve@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Nitin Sehgal <nsehgal@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Signed-off-by: Vishal Annapurve <vannapurve@nvidia.com>
6 years agovblk: Implement vblk driver suspend/resume
Vishal Annapurve [Fri, 1 Jun 2018 14:47:39 +0000 (20:17 +0530)]
vblk: Implement vblk driver suspend/resume

This change implements Vblk driver suspend:
1) Ensure that no more requests can be enqueued by
block layer
2) Ensure that no more requests can be enqueued to
storage server
3) Wait for enqueued requests to complete
4) Disable ivc irq

Vblk driver resume:
1) Ensure that requests can be enqueued to Storage
server
2) Enable IVC interrupt
3) Ensure that Requests can be enqueued by block layer

Jira SSV-1437

Change-Id: Ieac0cd8dd0f73e297cc9f72601e5229e63cabdd0
Signed-off-by: Vishal Annapurve <vannapurve@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1737136
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Sehgal <nsehgal@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovblk: extend the number of partitions in vblkdev
Kwangwoo Lee [Mon, 4 Jun 2018 04:06:12 +0000 (13:06 +0900)]
vblk: extend the number of partitions in vblkdev

The number of partitions which can be created in vblkdev is limited by
the argument of alloc_disk(VBLK_MINORS). If more than 16 partitions are
defined in GPT, only 15 partitions can be created in the vblkdev.

This patch extends the number of partition by adding GENHD_FL_EXT_DEVT
flag in struct gendisk. In https://lwn.net/Articles/290141/, the flag is
explained like below:

There is a new flag (GENHD_FL_EXT_DEVT) which allows the disk to use
extended partition numbers; once the number of minor numbers given to
alloc_disk() is exhausted, any additional partitions will be numbered in
the extended space.

Bug 2115886

Change-Id: I687afdca61021415229c3a45606527fba0b39281
Signed-off-by: Kwangwoo Lee <kwangwool@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1738858
Reviewed-by: Phoenix Jung <pjung@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dilan Lee <dilee@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vishal Annapurve <vannapurve@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovirt: Add virtual MTD storage driver
Vishal Annapurve [Thu, 1 Mar 2018 13:27:36 +0000 (18:57 +0530)]
virt: Add virtual MTD storage driver

This change adds support for virtual mtd storage
device driver.

Jira SSV-1201

Change-Id: Ie98b94effe7a6ca9104fead1dff53ac8bca7bf9c
Reviewed-on: https://git-master.nvidia.com/r/1686660
Signed-off-by: Vishal Annapurve <vannapurve@nvidia.com>
(cherry picked from commit 6559348a9ec3df569414a866a8184ab8ebf4adb6)
Reviewed-on: https://git-master.nvidia.com/r/1666698
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Sehgal <nsehgal@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: host: Disable SLCG WAR on K4.14
Mikko Perttunen [Mon, 2 Jul 2018 09:22:12 +0000 (12:22 +0300)]
video: tegra: host: Disable SLCG WAR on K4.14

On kernel 4.14, the SLCG war is implemented by the core clock/
powergating drivers. As such, we don't need to do anything about it.
On K4.14, we also start using the PMC genpd provider for powergates,
so the assumption of nvhost_pd being the powergating provider doesn't
apply anyway.

Bug 200418280

Change-Id: I52f0e72592741d54e581780c405992a4c2e0b9e7
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1767875
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Joseph Lo <josephl@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: host: unify the VI clock name
Joseph Lo [Thu, 12 Jul 2018 08:53:40 +0000 (16:53 +0800)]
video: tegra: host: unify the VI clock name

Sync up the VI clock name as "vi" among different platforms. In order to
do this on Tegra210, we also need to fix the DT clock ID to the clock
that we want to use as "vi" clock. For Tegra210, which is
"vi_v4l2.cbus".

Bug 200418280

Change-Id: Iab278bc7792848a1c2b32495a485119a2c925078
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1776742
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra-profiler: fix uninitialized pmu structures
Igor Nabirushkin [Thu, 12 Jul 2018 11:38:32 +0000 (14:38 +0300)]
tegra-profiler:  fix uninitialized pmu structures

Split the module initialization into two parts and move
PMU initialization to the later part. This fixes
possibly uninitialized PMU structures for some cores.

Bug 200427239

Change-Id: I09555a1b018596e779b937f0e1378db60bb69780
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1776957
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Dmitry Antipov <dantipov@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Kasinadha Dendukuri <kdendukuri@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: host: t194: Update prod values
Mikko Perttunen [Fri, 6 Jul 2018 08:08:58 +0000 (11:08 +0300)]
video: tegra: host: t194: Update prod values

Update FALCON_CG2 prod values for NVENC, NVDEC, and NVJPG.

Jira HOSTX-353

Change-Id: Ica3ab1623543263ff8932694a32dc3c89f5d8edf
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1772475
GVS: Gerrit_Virtual_Submit
Reviewed-by: Reshma Prabhu <rprabhu@nvidia.com>
Reviewed-by: Aapo Vienamo <avienamo@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonvlink: t19x: Fix minion falcon interrupts config
Petlozu Pravareshwar [Wed, 6 Jun 2018 11:10:29 +0000 (16:40 +0530)]
nvlink: t19x: Fix minion falcon interrupts config

This change does the following things:

* Configure MINION falcon interrupts i.e enable interrupts in _IRQMSET
  register and set destination of these interrupts to HOST and further
  classify them as HOST_NORNAL.

* Disable MINION Falcon interrupts when there is a fatal interrupt.

* Replace hardcoded falcon irqmask with a proper register read value.

* Remove read on CMINION_FALCON_IRQDEST register which becomes redundant
  after having done the above steps.

Bug 200420243
Bug 2043859

Change-Id: Ie40fc6d783f4a3974dd79f84ad4a7b6483c5a2f4
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1741643
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Adeel Raza <araza@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: nvmap: fix return value check of dma_declare_coherent_memory
Pritesh Raithatha [Tue, 10 Jul 2018 07:21:43 +0000 (12:51 +0530)]
video: tegra: nvmap: fix return value check of dma_declare_coherent_memory

Kernel-4.9 and before dma_declare_coherent_memory function was not reporting
failure. We updated the code to return the same mapping flag(MAP/NOMAP/IO)
in case of succeed.

Kernel-4.14 upstream is updated to return error in case of failure so
updating return value check in nvmap heap.

Bug 200415588

Change-Id: I4222438a80516d9c78f7cd9d4325a00cccb463df
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774909
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: David Gilhooley <dgilhooley@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
6 years agocpufreq: clamp boot frequency in core cpufreq
Bo Yan [Tue, 10 Jul 2018 19:12:00 +0000 (12:12 -0700)]
cpufreq: clamp boot frequency in core cpufreq

Set the flag to let cpufreq check the boot frequency against
available frequencies in frequency table. clamp to a valid
entry if the boot frequency is not in the table.

Remove the relevant code in tegra cpufreq driver for t186 and
t194. This is no longer needed.

bug 2255138

Change-Id: I47949ef4c641d9c2406480e1efafd71821632d3f
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1775429
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoPHY: tegra: move P2U driver inside tegra
Vidya Sagar [Tue, 10 Jul 2018 09:56:41 +0000 (15:26 +0530)]
PHY: tegra: move P2U driver inside tegra

moves PCIe's P2U phy driver to inside tegra folder as
this phy is specific to Tegra

Bug 200415690

Change-Id: Ie7f3999434f58e98103ac7d432ecfed96577a33a
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1775079
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoplatform: nvadsp: Check input buf-size in adsp logger
Mika Andersson [Wed, 4 Jul 2018 11:46:46 +0000 (13:46 +0200)]
platform: nvadsp: Check input buf-size in adsp logger

Adsp logger's read incorrectly expected the (remaining)
size of the user-buf to be at least ADSP_TAG - 1 chars.
That has been corrected.

For simplicity there is no state machine introduced to
make sure the ADSP_TAG is always complete in the log.
In the case the tag needs to be added to user-buf without
sufficient size it gets simply truncated.

Bug: 2108805

Change-Id: Ifd137980be521ca3c0932248353f10ea0e92692a
Signed-off-by: Mika Andersson <mikaa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1770559
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Uday Gupta <udayg@nvidia.com>
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: Ajay Nandakumar M <anandakumarm@nvidia.com>
Reviewed-by: Sandeep Trasi <strasi@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocamera: increase VI overhead
Bhushan Rayrikar [Mon, 2 Jul 2018 22:24:24 +0000 (15:24 -0700)]
camera: increase VI overhead

Increase VI overhead for t194 based on empirical
observations. HW needs 15%, use an additional 5%
for some intermittencies, the reason for this additional
overhead is unknown at the moment.

Bug 200425480

Change-Id: Id38b587d15c2903ce68d074844d3683385e879d6
Signed-off-by: Bhushan Rayrikar <brayrikar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1768470
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Joshua Widen <jwiden@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aditya Tomar <adtomar@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonvadsp: Add ADMA page info in hwmbox
Hariharan Sivaraman [Mon, 8 May 2017 09:36:03 +0000 (15:06 +0530)]
nvadsp: Add ADMA page info in hwmbox

For virtualized configurations, add DMA page info
for ADSP to read via HWMBOX. Remaining DMA pages will be
unmapped by ADSP OS

Jira EMA-414
Jira EMA-415

Change-Id: I67b7b2069aca07948e63436367d80a2baeaaf6ae
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master/r/1477304
(cherry picked from commit 93f338df31af5894935754aac23bb003168f9ea0)
Signed-off-by: Hariharan Sivaraman <hariharans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1567625
Reviewed-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Pai <npai@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonvidia: gcc 7.3 warning fixes
Stephen Warren [Tue, 3 Jul 2018 17:23:56 +0000 (11:23 -0600)]
nvidia: gcc 7.3 warning fixes

Fix the code to squash various new warnings that gcc-7.3 emits to allow
the kernel to be compiled with that gcc.

Bug 2224634

Change-Id: I11dae9a585c87667b69f8d618573a8d46b295cb6
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1769565
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra: camera: rtcpu: update firmware api headers
svccamerajenkins [Mon, 9 Jul 2018 23:42:18 +0000 (16:42 -0700)]
tegra: camera: rtcpu: update firmware api headers

tag f6aeb912d8861241e98a8d3a539d2a910ab7ddc3

rtcpu@359af80
    2c05b8e vi5: increment syncpoint on frame completion as well

Bug 2060794

Change-Id: I7004126878782c399b0430233e8ba714c91a3fc4
Signed-off-by: svccamerajenkins <svccamerajenkins@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774690
GVS: Gerrit_Virtual_Submit
Tested-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-by: Mika Liljeberg <mliljeberg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: hdmi: read quantization range from BL
Ken Chang [Thu, 7 Jun 2018 06:17:57 +0000 (14:17 +0800)]
video: tegra: hdmi: read quantization range from BL

For seamless display, keep the quantization range flags set in BL
instead of querying from EDID.

This patch also fixes the bit offset of RGB/YCbCr indicator in
SOR_NV_PDISP_SOR_HDMI_AVI_INFOFRAME_SUBPACK0_LOW.

Bug 2175608

Change-Id: I95d15c91cb16d324d4aa130dcb720f232e3384e7
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit fcf09814b02c727ab629774c2aeb43d7d3a1ab23)
Reviewed-on: https://git-master.nvidia.com/r/1757733
(cherry picked from commit a7ff8b1c6c366d2180bf355c58445241072be64b)
Reviewed-on: https://git-master.nvidia.com/r/1761307
(cherry picked from commit 4ef81253b9c2ebbe661ce5595a2aa8752188b213)
Reviewed-on: https://git-master.nvidia.com/r/1774274
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: tegra: skip modeset callback for seamless display
Ken Chang [Thu, 14 Jun 2018 08:09:51 +0000 (16:09 +0800)]
video: tegra: skip modeset callback for seamless display

In case of seamless display path, kernel shall honor BL modeset configuration
and carry forward. Therefore, skip the modeset callback for seamless display.

Bug 2175608

Change-Id: Ieca2be795303499dcb85bc91720311d9a68ed2d7
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1749617
(cherry picked from commit 35b0fddbff55f9926e330df596fd7943c50363b2)
Reviewed-on: https://git-master.nvidia.com/r/1761306
(cherry picked from commit bc50ca3d25e6c378ba2fa3369345d117219c7cb2)
Reviewed-on: https://git-master.nvidia.com/r/1774273
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocpuidle: Add config for t186
Timo Alho [Fri, 6 Jul 2018 06:21:43 +0000 (09:21 +0300)]
cpuidle: Add config for t186

Add Kconfig support for t186 cpuidle

Bug 2196214

Change-Id: I36c7f335f1c7d21903fbb78eb06b47c750806aaf
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1772374
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agocpuidle: tegra: use hotplug state callbacks
Timo Alho [Fri, 6 Jul 2018 06:18:05 +0000 (09:18 +0300)]
cpuidle: tegra: use hotplug state callbacks

Recent kernel versions deprecated CPU hotplug notifier chains in favor
of hotplug state callbacks. Adapt t18x cpuidle driver to this new
interface.

While at it, update some ktime_t related prints to work on kernel
version > 4.9.

Bug 2196214

Change-Id: I57ccd531840cb2d1599f6c0b5067811160732727
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1772373
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: dc: include k4.14 headers to fix build
Anshuman Kar [Fri, 15 Jun 2018 22:07:30 +0000 (17:07 -0500)]
video: dc: include k4.14 headers to fix build

Header changes & NULL functions required for
compilation

Change-Id: I89d95a3a63a4b65158d24149687912fffa0f33b7
Signed-off-by: Anshuman Kar <anshumank@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1751365
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodevfreq: add core kernel directory to include path
Timo Alho [Mon, 9 Jul 2018 07:52:04 +0000 (10:52 +0300)]
devfreq: add core kernel directory to include path

Add include path pointing to core kernel repository in order for the
drivers to include "governor.h" and possibly other local header files
from there.

Bug 2246029

Change-Id: Ic4e31e51c6ef6fa8b2f9ef6ce19e4ae87f90a1f3
Signed-off-by: Timo Alho <talho@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774215
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
6 years agodrivers: camera: protect channel buffer count
Ian Kaszubski [Mon, 9 Jul 2018 17:53:38 +0000 (10:53 -0700)]
drivers: camera: protect channel buffer count

Operations that modify a channel's buffer count
(freeing and adding of ring buffers) are not exclusive and can cause
race conditions. This patch places these operations in critical
sections to grant exclusive modification.

This patch also modifies the logic of freeing ring buffers to only
execute when the number of buffers to free is greater than zero.
This prevents infinite freeing loops when the number of buffers to
free becomes corrupted.

Bug 200409712
Bug 200422550

Change-Id: I7646a49bf6a14c4a4f8a3597e72d4bccdc8a0336
Signed-off-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774549
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Bhushan Rayrikar <brayrikar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra: dc: fix dsi_debug_show() on T186+
Axel Feldmann [Thu, 14 Jun 2018 18:48:19 +0000 (11:48 -0700)]
tegra: dc: fix dsi_debug_show() on T186+

Added in TEGRA_DSCI_BASE and TEGRA_DSID_BASE to the
`base` array in dsi_degug_show(). This will avoid the
out of bounds errors seen on systems with dsi->max_instances > 2

Bug 200393180

Change-Id: I2c2fb0df0f7e5211f5b1b6ca339c9de7a58894f8
Signed-off-by: Axel Feldmann <afeldmann@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1750189
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Ishwarya Balaji Gururajan <igururajan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>