]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/log
sojka/nv-tegra/linux-3.10.git
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>
Reviewed-on: http://git-master/r/790400
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@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>
Reviewed-on: http://git-master/r/786281
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
8 years agoHID: hidraw: Fix potential memory leak in list->buffer
Ankita Garg [Tue, 25 Aug 2015 23:15:03 +0000 (16:15 -0700)]
HID: hidraw: Fix potential memory leak in list->buffer

Bug 1677312

Change-Id: I4fe6296b3d944c7ebf81f3af2aa73256688a4613
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/789231
Reviewed-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
8 years agoHID: hidraw: Fix memory leak in list->buffer
Ankita Garg [Tue, 25 Aug 2015 22:55:39 +0000 (15:55 -0700)]
HID: hidraw: Fix memory leak in list->buffer

Deallocate memory allocated to list->buffer[x].value on
release

Bug 1677312

Change-Id: Iaf320327e917b3e78b07230819d51053e43e2c25
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/789224
Reviewed-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
8 years agoplatform: tegra: emc: Fix periodic calibration bug
Alex Waterman [Tue, 23 Jun 2015 21:37:42 +0000 (14:37 -0700)]
platform: tegra: emc: Fix periodic calibration bug

Fix perdiodic write cal bug where trimmer updates from the periodic
compensation could be masked by periodic DLL calibration.

Change-Id: I751ae969af3765cf47aa65d7a7e0b6926935d628
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/761423
(cherry picked from commit 0331fc6bc444843a531e906723cc411e61212d4e)
Reviewed-on: http://git-master/r/761958
Reviewed-by: David Dastous St Hilaire <ddastoussthi@nvidia.com>
Tested-by: David Dastous St Hilaire <ddastoussthi@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agotegra: nvmap: fix the possible dead lock
Xianhui Wang [Wed, 19 Aug 2015 04:26:42 +0000 (12:26 +0800)]
tegra: nvmap: fix the possible dead lock

bug 200107851

When a process call nvmap_iovmm_get_client_mss it will hold mutex_lock(&h->lock)

and try to get down_read(&mm->mmap_sem), at the same time if the related

process is calling nvmap_vma_close, it have hold mm->mmap_sem for write when

it entering vm_munmap, and try to get mutex_lock(&h->lock). Then the problem

happen, many process become "uninterruptable sleep" with the two process.

Then bugreport will not work.

Try to fix the problem and let nvmap_iovmm_get_client_mss get mmap_sem firstly

then it will align with nvmap_vma_close.

The call stack:

<6>[68949.696132] memory_usage.sh D ffffffc000086b1c    0 2771     1 0x00000000
<7>[68949.696140] Call trace:
<7>[68949.696146] [<ffffffc000086b1c>] __switch_to+0x3c/0x48
<7>[68949.696151] [<ffffffc000b90410>] __schedule+0x4b4/0x5e0
<7>[68949.696156] [<ffffffc000b90588>] schedule+0x4c/0x68
<7>[68949.696161] [<ffffffc000b91234>] __down_read+0xb8/0xe0
<7>[68949.696166] [<ffffffc000b8f85c>] down_read+0x28/0x38
<7>[68949.696174] [<ffffffc0004705b8>] nvmap_iovmm_get_client_mss+0xf8/0x1ac
<7>[68949.696180] [<ffffffc0004706fc>] nvmap_debug_iovmm_procrank_show+0x90/0x124
<7>[68949.696185] [<ffffffc0001c8b94>] seq_read+0x178/0x3d4
<7>[68949.696190] [<ffffffc0001a30c8>] vfs_read+0x94/0x158
<7>[68949.696195] [<ffffffc0001a3a78>] SyS_read+0xbc/0x16c
<6>[68949.696870] nvtest64       D ffffffc000086b1c    0 9220     1 0x00000000
<7>[68949.696877] Call trace:
<7>[68949.696883] [<ffffffc000086b1c>] __switch_to+0x3c/0x48
<7>[68949.696888] [<ffffffc000b90410>] __schedule+0x4b4/0x5e0
<7>[68949.696893] [<ffffffc000b90588>] schedule+0x4c/0x68
<7>[68949.696898] [<ffffffc000b90a04>] schedule_preempt_disabled+0x10/0x24
<7>[68949.696904] [<ffffffc000b8f42c>] __mutex_lock_slowpath+0x19c/0x264
<7>[68949.696909] [<ffffffc000b8f534>] mutex_lock+0x40/0x60
<7>[68949.696914] [<ffffffc00046ede8>] nvmap_vma_close+0x64/0x234
<7>[68949.696919] [<ffffffc000182e64>] remove_vma+0x3c/0x6c
<7>[68949.696924] [<ffffffc000184110>] remove_vma_list+0x68/0x9c
<7>[68949.696928] [<ffffffc000184b60>] do_munmap+0x1d8/0x250
<7>[68949.696932] [<ffffffc000184c18>] vm_munmap+0x40/0x64
<7>[68949.696937] [<ffffffc000184cc8>] SyS_munmap+0x8c/0x11c

Change-Id: Icee67329c2dbbd05b10a7ddf0dcc4167191623d3
Signed-off-by: Xianhui Wang <xianhuiw@nvidia.com>
Reviewed-on: http://git-master/r/785721
Reviewed-by: Maneet Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
8 years agogpu: nvgpu: wakeup semaphores after clearing CE2 interrupt
Deepak Nibade [Mon, 17 Aug 2015 10:49:09 +0000 (16:19 +0530)]
gpu: nvgpu: wakeup semaphores after clearing CE2 interrupt

In gk20a_ce2_nonstall_isr(), we first invoke semaphore workqueue
on all channels and then clear the interrupt
This delay in clearing the interrupt can sometimes lead to
dropping of new interrupt

If that happens, we never invoke gk20a_channel_semaphore_wakeup()
for new semaphore interrupts and semaphore waiting
never completes.

Fix this by moving gk20a_channel_semaphore_wakeup() after
we clear the interrupt

Bug 200131938

Change-Id: I26d72f04a8b49f4a3ac326bf6037cd04c741a920
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/784770
(cherry picked from commit f8fb4e26c4436cd4a7ec5935f5ba12e76e21966f)
Reviewed-on: http://git-master/r/785792
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agogpu: nvgpu: wakeup semaphores after clearing the interrupt
sujeet baranwal [Tue, 11 Aug 2015 23:40:54 +0000 (16:40 -0700)]
gpu: nvgpu: wakeup semaphores after clearing the interrupt

Currently, we first invoke semaphore workqueue on all channels
and then clear the interrupt
This delay in clearing the interrupt can sometimes lead to
dropping of new interrupt

If that happens, we never invoke gk20a_channel_semaphore_wakeup()
for new semaphore interrupts and semaphore waiting
never completes.

Fix this by moving gk20a_channel_semaphore_wakeup() after
we clear the interrupt

Bug 200083084
Bug 200117718

Change-Id: I7278cb378728e3799961411c4ed71d266d178a32
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Signed-off-by: sujeet baranwal <sbaranwal@nvidia.com>
Reviewed-on: http://git-master/r/782079
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agotegra: cpc: correct length check logic
Sang-Hun Lee [Mon, 17 Aug 2015 20:32:27 +0000 (20:32 +0000)]
tegra: cpc: correct length check logic

 - as size_t is an unsigned integer, checking for
   a negative value would always fail

Bug 1416640

Change-Id: I15764e4a189b946ff7dfa56b02401e9dce4c361e
Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-on: http://git-master/r/784953
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
8 years agoandroid: drivers: workaround debugfs race in binder
Riley Andrews [Thu, 28 May 2015 19:10:05 +0000 (12:10 -0700)]
android: drivers: workaround debugfs race in binder

If a /d/binder/proc/[pid] entry is kept open after linux has
torn down the associated process, binder_proc_show can deference
an invalid binder_proc that has been stashed in the debugfs
inode.  Validate that the binder_proc ptr passed into binder_proc_show
has not been freed by looking for it within the global process list
whilst the global lock is held. If the ptr is not valid, print nothing.

Bug 19587483
Change-Id: Ice878c171db51ef9a4879c2f9299a2deb873d255
Signed-off-by: Riley Andrews <riandrews@android.com>
Reviewed-on: http://git-master/r/783278
Reviewed-by: Shawn Heo <sheo@nvidia.com>
Tested-by: Shawn Heo <sheo@nvidia.com>
8 years agoipv4: Missing sk_nulls_node_init() in ping_unhash().
David S. Miller [Sat, 2 May 2015 02:02:47 +0000 (22:02 -0400)]
ipv4: Missing sk_nulls_node_init() in ping_unhash().

If we don't do that, then the poison value is left in the ->pprev
backlink.

This can cause crashes if we do a disconnect, followed by a connect().

Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Wen Xu <hotdog3645@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bug: 20770158
Change-Id: I944eb20fddea190892c2da681d934801d268096b
Reviewed-on: http://git-master/r/783273
Reviewed-by: Shawn Heo <sheo@nvidia.com>
Tested-by: Shawn Heo <sheo@nvidia.com>
8 years agoarm64: boot: dts: Add HDMI prod settings for Darcy
Chaitanya Bandi [Mon, 10 Aug 2015 22:43:06 +0000 (15:43 -0700)]
arm64: boot: dts: Add HDMI prod settings for Darcy

Bug 200106837

Change-Id: I70493dea516c3dec90212892e857541753a6d5be
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/781305
Reviewed-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agovideo: tegra: host: Fix the NvRmFenceWait polling
Sagar Kadamati [Tue, 23 Jun 2015 09:01:41 +0000 (14:31 +0530)]
video: tegra: host: Fix the NvRmFenceWait polling

NvRmFenceWait is entered into busy loop because of priority issue
With SCHED_FIFO policy

Bug 1652921

Change-Id: Ibb397f71954a6289f8f8f0e03405f0d0001282f4
Reviewed-on: http://git-master/r/761139
(cherry picked from commit 54e3f6f10fe560d504eb3eb504f4c1aaba37cb98)
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/762376
(cherry picked from commit ab5feb767ca4b6b8b2c99a7a2e3d0cf9addf6b45)
Signed-off-by: Xianhui <xianhuiw@nvidia.com>
Reviewed-on: http://git-master/r/776555
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agoarm64: tegra: enable AOTAG
Hyungwoo Yang [Tue, 14 Jul 2015 17:24:10 +0000 (10:24 -0700)]
arm64: tegra: enable AOTAG

- Make a darcy-common dts file for common configuration
  between Darcy EMMC and Darcy Pro.

- Enable AOTAG for darcy

Bug 1646378

Change-Id: Ie40802d626ef81f7d8e82e67491ccf0226a03ba0
Signed-off-by: Hyungwoo Yang <hyungwooy@nvidia.com>
Reviewed-on: http://git-master/r/769948
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Anshul Jain (SW) <anshulj@nvidia.com>
Tested-by: Anshul Jain (SW) <anshulj@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agomisc: tegra-fuse: read t210 a02 rev
Vinayak Pane [Tue, 21 Jul 2015 20:28:24 +0000 (13:28 -0700)]
misc: tegra-fuse: read t210 a02 rev

Read A02 chiprev and bootrom patch version

Bug 1659022

Change-Id: I55f6ae799e32a17d0a656ff8630964db399c91e0
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/773527

8 years agovideo: tegra: dc: Remove DPAUX powerdown
Aly Hirani [Tue, 14 Jul 2015 02:17:09 +0000 (19:17 -0700)]
video: tegra: dc: Remove DPAUX powerdown

This removes the explicit dpaux pad powerdown that was being called from
tegra_dc_controller_enable. Dpaux pads are meant to be refcounted using
the ddc_enable and ddc_disable functons. When the refcounts drop to
zero, they are responsible for calling the powerdown function.

For some unknown reason, dc_controller_enable was explicitly powering
down the pads (without going through the refcounting). This meant that
it is possible for the refcounting system to think that the pads are
powered, when in fact they were not.

In rel-22, it seems like it hardcodes the DPAUX (not DPAUX1) pads to be
powered off. This is a bug and we should never be doing this.

Bug 200111886
Bug 1659406
Bug 200114600

Change-Id: I6f3f8028103efbeb9d79af1adc3c5de06da2fd08
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/769599
(cherry picked from commit e182a5e823074eafe1a746d589c4c7dfccf5db54)
Reviewed-on: http://git-master/r/777430
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agovideo: fbmon: Fix and extend dmt_modes table
Aly Hirani [Tue, 28 Jul 2015 07:00:33 +0000 (00:00 -0700)]
video: fbmon: Fix and extend dmt_modes table

This change:

1. Fixes the upstream bug in the dmt_modes table. The 0x2e mode does not
have a 2-byte code of 0x9500. Instead, it is actually N/A as per the
VESA DMT v1.0 Rev 13 spec (February 8, 2013).

2. Adds all the remaining vesa_modes that were missing from the upstream
list.

Bug 1669295

Change-Id: I946e661038b10d6871258d7c6228a589da612afd
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/776394
Reviewed-by: David Ung <davidu@nvidia.com>
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
8 years agovideo: fbdev: Add additional vesa modes
Aly Hirani [Tue, 28 Jul 2015 06:54:30 +0000 (23:54 -0700)]
video: fbdev: Add additional vesa modes

Add high resolution modes to vesa_modes struct.

(This change backports the upstream commit from linux-next.
Specifically, the change is backported from the modedb.c which has
been moved from drivers/video/ to drivers/video/fbmon/core/.
Also fixes a minor whitespace issue.)

Bug 1669295

Change-Id: I302816b1e6d8550bac65d443cc62f0551aaac3e3
Signed-off-by: David Ung <davidu@nvidia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
(cherry picked from upstream commit 37715f556a0776356300391f8ac41ace91bea447)
Reviewed-on: http://git-master/r/776393
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
8 years agovideo: fbdev: Check Standard Timing against DMT
Aly Hirani [Tue, 28 Jul 2015 07:05:32 +0000 (00:05 -0700)]
video: fbdev: Check Standard Timing against DMT

Add the VESA Display Monitor Timing (DMT) table.
During parsing of Standard Timings, it compare the 2 byte STD code
with DMT to see what the VESA mode should be.  If there is no entry
in the vesa_modes table or no match found, it fallsback to the
GTF timings.

(This change backports the upstream commit from linux-next.
Specifically, the change is backported from the modedb.c which has been
moved from drivers/video/ to drivers/video/fbmon/core/)

Bug 1669295

Change-Id: Ibc99bd12667ea0f18f0918d1abdd04805a8e0f13
Signed-off-by: David Ung <davidu@nvidia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
(cherry picked from upstream commit a2eec5a5ea12fb50e073b322ca9d948818179968)
Reviewed-on: http://git-master/r/776392
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
8 years agogpu: nvgpu: remove gk20a_busy() from channel_syncpt_incr()
Deepak Nibade [Mon, 3 Aug 2015 10:16:32 +0000 (15:46 +0530)]
gpu: nvgpu: remove gk20a_busy() from channel_syncpt_incr()

gk20a_busy() is already called on all the paths to
__gk20a_channel_syncpt_incr() i.e. in gk20a_submit_channel_gpfifo()

hence remove the redundant gk20a_busy() call since it causes
deadlock scenario with VPR resize use case

Bug 200128257
Bug 1645760
Bug 200114947
Bug 200124519

Change-Id: I4cd47b7e7cdc92aaeda17256a99f2ba93833a3b3
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/778341
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
8 years agogpu: nvgpu: remove gk20a_busy() from channel_syncpt_update()
Deepak Nibade [Tue, 21 Jul 2015 13:12:41 +0000 (18:42 +0530)]
gpu: nvgpu: remove gk20a_busy() from channel_syncpt_update()

gk20a_busy() was added to gk20a_channel_syncpt_update() for possible
case of channel deletion

But API to delete a channel (i.e. gk20a_free_channel()) is already
called in paths which ensure gk20a_busy() is called before
deleting the channel

Hence, remove redundant gk20a_busy()/idle() calls

This also fixes a deadlock scenario with VPR resize use case

Bug 200128257
Bug 1645760
Bug 200114947
Bug 200124519

Change-Id: I05dc739b3be88af2ba22b0a667e5004d8100bf6f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/778340
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
8 years agostaging: ozwpan: avoid race in oz_pd_stop
Vinayak Pane [Mon, 20 Jul 2015 20:09:23 +0000 (13:09 -0700)]
staging: ozwpan: avoid race in oz_pd_stop

Handle if pd is already stopped.

Bug 200123174

Change-Id: I9a9c46f2a0a788245bf438b420174e063b452332
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-on: http://git-master/r/775903
Reviewed-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Tested-by: Spencer Sutterlin <ssutterlin@nvidia.com>
8 years agovideo: tegra: hdmi: Fix locks and race condition
Aly Hirani [Wed, 22 Jul 2015 20:52:23 +0000 (13:52 -0700)]
video: tegra: hdmi: Fix locks and race condition

The HDMI driver had a couple of race conditions that this change
attempts to fix.

1. ddc_enable/ddc_disable

tegra_hdmi_ddc_enable() and _ddc_disable() functions need to be
called before performing any ddc/i2c transactions on T210. These are
called at least from (1) edid thread, (2) scdc thread, (3) hdcp thread,
(4) from userspace by crc checker. The enable and disable functions
makes sure that the pads are powered on or powered off (with refcounting).
The hdmi driver was using a standard int with no locking around it,
causing typical race conditions and refcounting to go bad. This change
adds a new mutex to protect ddc_refcount.

2. clock_refcount_lock

The hdmi clocks are also refcounted with tegra_hdmi_get() and
tegra_hdmi_put(). They also make sure that the hdmi clocks are only
enabled and configured on the first enable() and turned off on the last
disable(). It was also using a standard int with no refcounting. This
change also adds a new mutex to protect clock_refcount_lock.

3. ddc_lock

ddc_lock was being held across some scdc transactions. However, this
is not needed. The i2c_transfer() function should be responsible for
maintaining the bus lock. Also, this is made worse by the fact that not
all ddc transactions were holding this lock.

Bug 200103101

Change-Id: Idaece90a5d7f9575c3f97e2848bcf1c605de693c
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/766759
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agommc: tegra: Update dqs trim delay for eMMC HS400/HS533 modes.
Naveen Kumar Arepalli [Mon, 27 Jul 2015 13:33:43 +0000 (19:03 +0530)]
mmc: tegra: Update dqs trim delay for eMMC HS400/HS533 modes.

Update dqs trim delay for eMMC HS400/HS533 modes.

Bug 1475512

Change-Id: I89dc3c584d648d393b234240b423ec86f50dc60d
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/774945
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agoARM64: dtsi: t210: Update dqs-trim-delay for sdmmc.
Naveen Kumar Arepalli [Mon, 27 Jul 2015 06:15:07 +0000 (11:45 +0530)]
ARM64: dtsi: t210: Update dqs-trim-delay for sdmmc.

-Update dqs-trim-delay for sdmmc.
-Set dqs trim value to 40 for HS400 mode.
-Set dqs trim delay to 24 for HS533 mode.
-http://nvbugs/1475512/96 has data from ASIC team.

Bug 1475512

Change-Id: I96fe6c0b398f409f406292e7ba75a75ba4c051ba
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/774944
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agoplatform: tegra: powergate: Fix race in refcount
Arto Merilainen [Wed, 13 May 2015 08:04:18 +0000 (11:04 +0300)]
platform: tegra: powergate: Fix race in refcount

Currently power partition refcount variable is a single integer
without any protection. This causes various possible issues:
- the refcount variable in itself may get outdated when if two
threads are making increments/decrements at the same time
- if one thread is requesting a reference while another is dropping
it, power-up may get canceled.

Bug 1634885

Change-Id: I2a35140d90f4ab24a83b8e2ca6cc37d43788956a
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/742203
Reviewed-on: http://git-master/r/774065
Tested-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agobcmdhd: Update passive/restricted channel list.
Bibhay Ranjan [Fri, 26 Jun 2015 09:13:16 +0000 (02:13 -0700)]
bcmdhd: Update passive/restricted channel list.

When scan is issued, the list of active channels
will be updated.

Bug 200045827
Bug 200076202

Change-Id: I4692d1ccdb9ff8e3dfede798cb2ae8abc5577261
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/762864
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agoconfigs: tegra21_android_defconfig: enable driver
Martin Gao [Wed, 22 Jul 2015 18:18:30 +0000 (11:18 -0700)]
configs: tegra21_android_defconfig: enable driver

- enable bootrom pmc driver

Bug 200119875

Change-Id: I02a37795ede2d20335524ec16ebe4dce0aa4fa94
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/773528
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agoplatform: tegra: pmc: add driver to configure PMC
Martin Gao [Mon, 20 Jul 2015 19:35:56 +0000 (12:35 -0700)]
platform: tegra: pmc: add driver to configure PMC

Add driver to configure PMC for bootrom command
- Tegra210 bootrom has the feature to issue i2c commands to
external device like PMIC to send commands. These commands
are needed to pass through PMC on specific format.

- Allow driver to read the required platform specific commands
from DT under PMC node and format it as per bootrom need.

- Allow driver to configure the PMC bootrom command scratch
register as per the platform specific commands to issue write
i2c commands when it boots through bootrom

Bug 200119875

Change-Id: I80c2358ec3d0db4e42ee18736960c7b0a80e0ee2
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/772447
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agoplatform: tegra: pmc: add API set bootrom commands
Laxman Dewangan [Mon, 5 Jan 2015 11:32:05 +0000 (17:02 +0530)]
platform: tegra: pmc: add API set bootrom commands

Add API to write the bootrom command to PMC scratch registers.

Bug 200119875

Change-Id: I0a48e8497128b64e2c2a2bff94d9d4ab16137d5d
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/772441
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agoplatform: tegra: pmc: initialise PMC for bootrom commands
Laxman Dewangan [Fri, 2 Jan 2015 14:35:15 +0000 (20:05 +0530)]
platform: tegra: pmc: initialise PMC for bootrom commands

Initialise the PMC register for bootrom commands which can be
sent by bootrom  during boot.

Bug 200060034
Bug 200119875

Change-Id: I9f2773f9f1a43b6e73bbc9aac23324e38d61e79b
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/772440
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agoarch64: boot: set core voltage to 1.0 V by bootrom
Martin Gao [Mon, 20 Jul 2015 20:24:09 +0000 (13:24 -0700)]
arch64: boot: set core voltage to 1.0 V by bootrom

Bootrom has capability to issue i2c command to device Provide i2c
command for PMIC to set core voltage to 1.0V before bootrom jump for
higher frequency. Add this configuration properties on power tree files
for loki and foster.

Bug 200119875

Change-Id: I3b0257c318840633e6044dd8a024d34dffabb93c
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/772455
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agomisc: tegra-profiler: add cpu notifier
Igor Nabirushkin [Wed, 29 Apr 2015 06:44:01 +0000 (10:44 +0400)]
misc: tegra-profiler: add cpu notifier

Detect when the CPU goes online/offline.

Bug 1634024

Change-Id: I989a9aefbc32a70070b37fe42ce5dcf75b18263b
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/729497
(cherry picked from commit a2eec5a5ea12fb50e073b322ca9d948818179968)
Reviewed-on: http://git-master/r/758572
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: fix stop error
Igor Nabirushkin [Mon, 13 Apr 2015 13:00:37 +0000 (17:00 +0400)]
misc: tegra-profiler: fix stop error

Do not verify the existence of profiled process after
start of session.
It fixes the stop error on non-rooted devices when
application is terminated during the profile session.

Bug 1634968

Change-Id: I5384e6de3c7ff9791033d344b02acba9a729157b
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/730898
(cherry picked from commit 79fcedbbf7fbc984ec8b95900ee49af0a9be590b)
Reviewed-on: http://git-master/r/758571
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: fix coverity issue
Igor Nabirushkin [Tue, 28 Apr 2015 06:04:15 +0000 (10:04 +0400)]
misc: tegra-profiler: fix coverity issue

Fix Coverity issue of out-of-bounds.
Coverity id: 29855

Bug 1416640

Change-Id: I112daaad55c1a2de9fdb411a0591e4ed7bf50e6e
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/730896
(cherry picked from commit 09c1b2add13aa7c6f4410c874ddad936913f5d19)
Reviewed-on: http://git-master/r/758570
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agomisc: tegra-profiler: send all frequencies
Igor Nabirushkin [Tue, 28 Apr 2015 05:58:51 +0000 (09:58 +0400)]
misc: tegra-profiler: send all frequencies

Send CPU, EMC and GPU frequencies at the start of profiling.
It is needed so that initial frequencies are also displayed
in the profiler GUI.

Bug 1635012

Change-Id: I2e850c846b110da8aa4331ac700a20930da6841b
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/730895
(cherry picked from commit a00b48ad9e012bf17e0e3f8610e2732af53b2115)
Reviewed-on: http://git-master/r/758569
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: cleanup unwinding rules
Igor Nabirushkin [Sat, 21 Mar 2015 16:33:09 +0000 (20:33 +0400)]
misc: tegra-profiler: cleanup unwinding rules

DWARF unwinding: cleanup unwinding rules for frames.
It fixes some broken backtraces.

Bug 1626528

Change-Id: Iaa62528cc0b6b97f1763934ef641791f196897b0
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/720600
(cherry picked from commit 3d68bdc1d81dce7176a8efec54dc5501e55e5eb5)
Reviewed-on: http://git-master/r/727510
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: fix broken backtraces
Igor Nabirushkin [Sat, 21 Mar 2015 15:39:55 +0000 (19:39 +0400)]
misc: tegra-profiler: fix broken backtraces

Unwinding based on arm32 ehabi: fix broken backtraces when
all unwind entries are located in exidx section and
extab section is not exist.

Bug 1625585

Change-Id: I800e1347b04aa2c2c8802b81478931985c19feb2
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/720598
(cherry picked from commit dfc9e9e4ce081b3116e457711e2f4a67fabb169c)
Reviewed-on: http://git-master/r/727509
Reviewed-by: Andrey Trachenko <atrachenko@nvidia.com>
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agommc: tegra: Issue cmd,data reset lines.
Naveen Kumar Arepalli [Fri, 17 Jul 2015 06:01:46 +0000 (11:31 +0530)]
mmc: tegra: Issue cmd,data reset lines.

Issue cmd,data reset lines when trimmer supply is changed to
BG(from VAUX to BG).

Bug 1661508

Change-Id: Ia4c76d25ca80360f877d88f18e0d207b5fe845e8
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/771502
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agosecurity: tlk_driver: fix te_open_session
Scott Long [Wed, 27 May 2015 16:44:46 +0000 (09:44 -0700)]
security: tlk_driver: fix te_open_session

If do_smc() fails in te_open_session() we free
the session pointer but then reference it after
that point when freeing temp mem buffers which
can lead to a crash.

Bug 200108299

Change-Id: I2360e389182ffeb5d3cc9944f4edcd2da7c1643b
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/747819
(cherry picked from commit db190003e70da2b25d0ae78ec5c7ed61c729f9a9)
Reviewed-on: http://git-master/r/751102
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agogpu: nvgpu: fix channel close sequence
Deepak Nibade [Tue, 14 Jul 2015 12:48:05 +0000 (18:18 +0530)]
gpu: nvgpu: fix channel close sequence

In gk20a_cde_remove_ctx(), current sequence is as below
- gk20a_channel_close()
- gk20a_deinit_cde_img()
  - gk20a_free_obj_ctx()

But gk20a_free_obj_ctx() needs reference to channel and hence
below crash is seen :

[ 3901.466223] Unable to handle kernel paging request at virtual address
00001624
...
[ 3901.535218] PC is at gk20a_free_obj_ctx+0x14/0xb0
[ 3901.539910] LR is at gk20a_deinit_cde_img+0xd8/0x12c

Fix this by closing the channel after gk20a_deinit_cde_img()

Bug 1625901

Change-Id: Ic2dc5af933b6d6ef8982c2b9f0caa28df204051f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/769888
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agogpu: nvgpu: add per-channel refcounting
Konsta Holtta [Fri, 6 Mar 2015 14:33:43 +0000 (16:33 +0200)]
gpu: nvgpu: add per-channel refcounting

Add reference counting for channels, and wait for reference count to
get to 0 in gk20a_channel_free() before actually freeing the channel.
Also, change free channel tracking a bit by employing a list of free
channels, which simplifies the procedure of finding available channels
with reference counting.

Each use of a channel must have a reference taken before use or held
by the caller. Taking a reference of a wild channel pointer may fail, if
the channel is either not opened or in a process of being closed. Also,
add safeguards for protecting accidental use of closed channels,
specifically, by setting ch->g = NULL in channel free. This will make it
obvious if freed channel is attempted to be used.

The last user of a channel might be the deferred interrupt handler,
so wait for deferred interrupts to be processed twice in the channel
free procedure: once for providing last notifications to the channel
and once to make sure there are no stale pointers left after referencing
to the channel has been denied.

Finally, fix some races in channel and TSG force reset IOCTL path,
by pausing the channel scheduler in gk20a_fifo_recover_ch() and
gk20a_fifo_recover_tsg(), while the affected engines have been identified,
the appropriate MMU faults triggered, and the MMU faults handled. In this
case, make sure that the MMU fault does not attempt to query the hardware
about the failing channel or TSG ids. This should make channel recovery
more safe also in the regular (i.e., not in the interrupt handler) context.

Bug 1530226
Bug 1597493
Bug 1625901
Bug 200076344
Bug 200071810

Change-Id: Ib274876908e18219c64ea41e50ca443df81d957b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/448463
(cherry-picked from commit 3f03aeae64ef2af4829e06f5f63062e8ebd21353)
Reviewed-on: http://git-master/r/665078
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agoDNI: printk: add loglevel for messages from /dev/kmsg
Eric Miao [Thu, 11 Jun 2015 17:37:42 +0000 (10:37 -0700)]
DNI: printk: add loglevel for messages from /dev/kmsg

Bug 1644887

Allow messages to /dev/kmsg to have a different loglevel other than
the default_message_loglevel, which is the one kernel printk() uses
when no loglevel is specified.

Change-Id: I340d20693d87cfea9aaea51845caf32b4cbd62fa
Signed-off-by: Eric Miao <emiao@nvidia.com>
Reviewed-on: http://git-master/r/756603
Reviewed-by: Li Li (SW-TEGRA) <lli5@nvidia.com>
Tested-by: Li Li (SW-TEGRA) <lli5@nvidia.com>
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
8 years agoarm64: configs: enable connector
David Lock [Thu, 7 May 2015 20:09:57 +0000 (13:09 -0700)]
arm64: configs: enable connector

Enable connector feature for tegra21 config.

Bug 1643998

Change-Id: I4e36f125ff7029251b1fbaaea8e69893970c749c
Signed-off-by: David Lock <dlock@nvidia.com>
Reviewed-on: http://git-master/r/740427
Reviewed-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-by: Roopa Ranganathan <rranganathan@nvidia.com>
Tested-by: Roopa Ranganathan <rranganathan@nvidia.com>
8 years agodrivers: cpuquiet: Change hotplug core order
David Lock [Fri, 17 Apr 2015 21:59:31 +0000 (14:59 -0700)]
drivers: cpuquiet: Change hotplug core order

Turn cores off in reverse order in which we turn them on
from last core to first.  This makes hotplug behavior more
predicatable to system components trying to optimize
scheduling.

Bug 1643998

Change-Id: I4040337bca3affb2ac311f5481a2f959da85e2ac
Signed-off-by: David Lock <dlock@nvidia.com>
Reviewed-on: http://git-master/r/740426
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agodrivers: cpuquiet: Plug/unplug CPUs in order
Sai Gurrappadi [Wed, 22 Apr 2015 00:20:30 +0000 (17:20 -0700)]
drivers: cpuquiet: Plug/unplug CPUs in order

When satisfying the min/max constraints on online cpus, plug/unplug the
CPUs in order to make system behavior more predictable. There is
slightly higher penalty for the max case now as we need to find the last
online CPU but this shouldn't be significant. Also cleanup some code
while at it.

Change-Id: Ief4e4a76bbb960e476d6534bab30118b7326c91f
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/740425
Tested-by: David Lock <dlock@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agoi2c: tegra: enable multi-master mode
Shardar Shariff Md [Thu, 9 Apr 2015 14:23:41 +0000 (19:53 +0530)]
i2c: tegra: enable multi-master mode

Enable multi-master mode in I2C_CNFG reg
using single/multi-master mode bit introduced
for T210, whereas multi-master mode is
enabled by default in HW for T124 and earlier
SOC.

Bug 200077847
Bug 200103101

Change-Id: Idcb50355884fc52d44b12ecfecb779e366fbb733
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
Reviewed-on: http://git-master/r/729792
(cherry picked from commit 87fce4168fa6ed861891bebf2330490909d50904)
Reviewed-on: http://git-master/r/767558
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agoRevert "loki:foster: emc update to 980 v09"
Ray Poudrier [Fri, 10 Jul 2015 22:58:35 +0000 (15:58 -0700)]
Revert "loki:foster: emc update to 980 v09"

This reverts commit f2f67140e17aa289b9442cabf44890fa28aeae7b.

This table was accidentally pushed as the derated table.

Bug 1541472
Bug 1636958
Bug 1662413

Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com>
Change-Id: Ief12b8f7f6db3c249ea2e12d4b37763f50d3a095
Reviewed-on: http://git-master/r/769048

8 years agoclock: tegra21: Replace clk_prepare_enable
Hoang Pham [Wed, 8 Jul 2015 18:54:48 +0000 (11:54 -0700)]
clock: tegra21: Replace clk_prepare_enable

Replace clk_prepare_enable() by tegra_clk_prepare_enable()
that checks if clock enable actually can sleep

Bug 200121781

Change-Id: I398f87f0487f0c26f0f7b49dc0931220a83f7f22
Signed-off-by: Hoang Pham <hopham@nvidia.com>
Reviewed-on: http://git-master/r/768091
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Vinayak Pane <vpane@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agommc: tegra: reset cmd_data after programming sel_vreg
Naveen Kumar Arepalli [Wed, 24 Jun 2015 07:08:10 +0000 (12:38 +0530)]
mmc: tegra: reset cmd_data after programming sel_vreg

-Issue cmd and data reset when sel_vreg is programmed.

Bug 1661508

Change-Id: Ib7062511572be7f110d306f665b9979ec8045bdd
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/764680
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
Tested-by: Manish Tuteja <mtuteja@nvidia.com>
8 years agommc: tegra: Use correct quirk for E_INPUT_VOL.
Naveen Kumar Arepalli [Wed, 8 Jul 2015 09:12:01 +0000 (14:42 +0530)]
mmc: tegra: Use correct quirk for E_INPUT_VOL.

-NVQUIRK2_SET_PAD_E_INPUT_VOL is defined in nvquirks2.
-currently NVQUIRK2_SET_PAD_E_INPUT_VOL is compared in nvquirks
we need to check in nvquirks2.

Bug 1661867

Change-Id: I907b4f39a0231235b2011dcf01cf07f5eb7cb8d2
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/767024
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
Tested-by: Raymond Poudrier <rapoudrier@nvidia.com>
8 years agommc: tegra: Add 5msec delay after voltage switch.
Naveen Kumar Arepalli [Thu, 25 Jun 2015 09:59:14 +0000 (15:29 +0530)]
mmc: tegra: Add 5msec delay after voltage switch.

-Add 5msec delay after voltage switch.
-corresponding pwrdet value for 1.8V should be set only after
stabilizing the sdmmc io rail voltage to 1.8V.

Bug 1662457
Bug 200121369

Change-Id: I2307b479562ab084386c5763e676a0b4d0d89d08
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/762284
GVS: Gerrit_Virtual_Submit
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
8 years agomisc: tegra-profiler: fix sparse warning
Igor Nabirushkin [Tue, 16 Jun 2015 12:43:06 +0000 (15:43 +0300)]
misc: tegra-profiler: fix sparse warning

Tegra Profiler: fix sparse static warning.

Bug 200067946

Change-Id: I2223c276b9412747d1f5e536ca94fe0de3701654
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/672325
(cherry picked from commit 82967e9b9363e7a2a8b5484164d0151b6e7a856e)
Reviewed-on: http://git-master/r/736694
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: simpler task status checking
Dmitry Antipov [Tue, 16 Jun 2015 12:41:38 +0000 (15:41 +0300)]
misc: tegra-profiler: simpler task status checking

Use PF_EXITING to check task status and simplify argument checking
in read_all_sources, adjust hrtimer_handler accordingly.

Bug 1625611

Signed-off-by: Dmitry Antipov <dantipov@nvidia.com>
Change-Id: Ida8f9e7ed5492f17868988e05328bfa8432a31e9
Reviewed-on: http://git-master/r/719460
(cherry picked from commit 316d507f4aaa04e9c91da3faa25c861260d6b194)
Reviewed-on: http://git-master/r/727508
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: add unwind entry checking
Dmitry Antipov [Tue, 16 Jun 2015 12:40:44 +0000 (15:40 +0300)]
misc: tegra-profiler: add unwind entry checking

Use simple disassembler to verify unwind table entry against function code.

Bug 1618651

Signed-off-by: Dmitry Antipov <dantipov@nvidia.com>
Change-Id: Ib75b50f1bb753b7358fcc08107bfefc3133b4f0c
Reviewed-on: http://git-master/r/714784
(cherry picked from commit 3a68f6164a4652d027fd2e62d7eb7d5ec5906dbc)
Reviewed-on: http://git-master/r/727507
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: add unwind reason codes
Igor Nabirushkin [Tue, 16 Jun 2015 12:39:26 +0000 (15:39 +0300)]
misc: tegra-profiler: add unwind reason codes

Unwinding: store individual URC codes for each method.

Bug 1624134

Change-Id: I3b2045f9c9147354f3440e326fd3aeccb5e0458d
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/717848
(cherry picked from commit e5ceff53d63e668a19d36196823f6c185ce48e88)
Reviewed-on: http://git-master/r/727506
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: add task states
Igor Nabirushkin [Tue, 16 Jun 2015 12:38:54 +0000 (15:38 +0300)]
misc: tegra-profiler: add task states

* Add task states into sched samples.
* Store task exit_state field.

Bug 1624099

Change-Id: I4a25aa6c15b59da987688342478127dccc5c0a1c
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/717839
(cherry picked from commit 9c512cace5ad5d8719a5a8df553cd313e41f4402)
Reviewed-on: http://git-master/r/727505
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: prevent infinite loop
Igor Nabirushkin [Tue, 16 Jun 2015 12:38:23 +0000 (15:38 +0300)]
misc: tegra-profiler: prevent infinite loop

* Prevent false recursion in mixed mode.
* Unwinding based on frame pointers: do not save lr address
  if previous frame is incorrect.

Bug 1619030

Change-Id: Iadeb8ca87ead576b18821964878cddf7aa94cf27
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/715291
(cherry picked from commit d8e79953332c96786da5f57475013b045d7ef817)
Reviewed-on: http://git-master/r/727504
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: add cpufreq notifier
Igor Nabirushkin [Tue, 16 Jun 2015 12:37:45 +0000 (15:37 +0300)]
misc: tegra-profiler: add cpufreq notifier

Add cpufreq notifier into the profiler.

Bug 1618622

Change-Id: I06352c515c64f524fb88898dadefe1d07cedfe0f
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/714765
(cherry picked from commit b93eebf3afb92cfa97eb66067e5a5ef252a20ae8)
Reviewed-on: http://git-master/r/727503
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: add unwind reason codes
Igor Nabirushkin [Tue, 16 Jun 2015 12:37:16 +0000 (15:37 +0300)]
misc: tegra-profiler: add unwind reason codes

Add unwind reason codes for dwarf unwinding.

Bug 1611073

Change-Id: Ic7f324f526ba34505e3b9bbedae7b98c29ce097d
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/711654
(cherry picked from commit ea2a41fa9056145e3f1cbe6f97c7725f51a08f3e)
Reviewed-on: http://git-master/r/727502
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: fix broken call chains
Igor Nabirushkin [Tue, 16 Jun 2015 12:36:40 +0000 (15:36 +0300)]
misc: tegra-profiler: fix broken call chains

Fix broken call chains for thumb code with dwarf and
arm ehabi information simultaneously.

Bug 1615165

Change-Id: If34ecfac26657546170121c363cf89b8b7256dbb
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/711611
(cherry picked from commit 7d98345d6f2f1ba476161d91853dd82b23a92d1d)
Reviewed-on: http://git-master/r/727501
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: fix return value check
Igor Nabirushkin [Tue, 16 Jun 2015 12:36:03 +0000 (15:36 +0300)]
misc: tegra-profiler: fix return value check

Tegra System Profiler: device is frozen when using clk events.
Fix return value check.

Bug 1611412

Change-Id: Ic9da6f02b222aaf0b3e5e84156103be39a28168b
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/708066
(cherry picked from commit d7f72918dd2c210fd991e61414da3b5f95916f25)
Reviewed-on: http://git-master/r/727500
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: support debug frame sections
Igor Nabirushkin [Tue, 16 Jun 2015 12:35:18 +0000 (15:35 +0300)]
misc: tegra-profiler: support debug frame sections

DWARF unwinding: support debug frame sections (AArch32/AArch64).

Bug 1611073

Change-Id: Ia7a01c61843d35d8c5466623be7d8e44fc70f5a1
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/707910
(cherry picked from commit d39c08f5f586453c55c42a91bccd8452343c5236)
Reviewed-on: http://git-master/r/727499
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agomisc: tegra-profiler: support eh_frame sections
Igor Nabirushkin [Tue, 16 Jun 2015 12:34:12 +0000 (15:34 +0300)]
misc: tegra-profiler: support eh_frame sections

Support dwarf unwinding for arm32 files (based on eh_frame sections).

Bug 1611069

Change-Id: Ie057ebcfcff75ccb2d3e62aa7cb85ac4b090930c
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/707903
(cherry picked from commit 950855f44e647b22508f2d31fe373fffd9e0642f)
Reviewed-on: http://git-master/r/727498
Tested-by: Andrey Trachenko <atrachenko@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
8 years agoarch: arm64: configs: enable r8168 driver
marting [Fri, 3 Jul 2015 01:44:28 +0000 (18:44 -0700)]
arch: arm64: configs: enable r8168 driver

- disable r8169 driver
- enable r8168 driver and its default features

Change-Id: If6fe5298cc2bd740921c7bc8e098faa104e92569
Signed-off-by: marting <marting@nvidia.com>
Reviewed-on: http://git-master/r/765554
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agovideo: tegra: dc: Skip HDCP i2c for virtual edid
Ivan Raul Guadarrama [Tue, 23 Jun 2015 11:48:15 +0000 (14:48 +0300)]
video: tegra: dc: Skip HDCP i2c for virtual edid

When virtual edid is active, skip HDCP i2c transfers
and report them as failed. This prevents any possible
security issue as using virtual edid does not allow
the possibility of secured content playback.

Bug  1613815

Change-Id: I6ff91f3d802b379318da22c9f78329878d6279d6
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-on: http://git-master/r/761242
(cherry picked from commit 547f2811ea9cd8f6069da53e267fe03563aefc03)
Reviewed-on: http://git-master/r/764756
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agovideo: tegra: hdmi: Skip SCDC for virtual edid
Ivan Raul Guadarrama [Tue, 23 Jun 2015 11:19:35 +0000 (14:19 +0300)]
video: tegra: hdmi: Skip SCDC for virtual edid

When virtual edid is activate, skip SCDC i2c transfers
and report them as successful.

Bug 1613815

Change-Id: Ie15e8bfb713255a911489c88546715d8f36c4b27
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-on: http://git-master/r/761241
(cherry picked from commit ab7d9e7335bfe512cce9866dad879f7959f1c224)
Reviewed-on: http://git-master/r/764755
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agotegra: disp: dc: add persistence to virtual edid
Ivan Raul Guadarrama [Tue, 23 Jun 2015 10:52:56 +0000 (13:52 +0300)]
tegra: disp: dc: add persistence to virtual edid

Change virtual edid to persist across software hotplugs.
Before, the virtual edid was lost after an unplug event.
Only initialize the virtual edid state on probe.

Bug 1613815

Change-Id: Ied7ed73d4267f880e62e0ac35fe11c1297032a5f
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-on: http://git-master/r/761240
(cherry picked from commit 073a1adb11c6d327e32270c6600c47b00296a53e)
Reviewed-on: http://git-master/r/764754
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agommc: tegra: Enable regulator only if card is present
Naveen Kumar Arepalli [Sun, 5 Jul 2015 07:25:49 +0000 (12:55 +0530)]
mmc: tegra: Enable regulator only if card is present

-http://git-master/r/765348 missed condition to
check card presence status before enabling regulators.

Bug 1661867

Change-Id: Iabad6d15c5dc48089d20314199787c2873c6f9b4
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/766400
Reviewed-by: Anubhav Jain <anubhavj@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agommc: tegra: Don't enable regulator with default voltage.
Naveen Kumar Arepalli [Thu, 2 Jul 2015 13:19:10 +0000 (18:49 +0530)]
mmc: tegra: Don't enable regulator with default voltage.

-When SD card is inserted(hot plug), calling regulator_enable
will set the default voltage value.
-Move the regulator_enable call to tegra voltage api.

Bug 1661867

Change-Id: I9cd4adaee51c7ba95627ad3e1e5ebe3ef94ed945
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/765348
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agodrivers: net: ethernet: r8168 realtek driver
marting [Tue, 30 Jun 2015 01:49:27 +0000 (18:49 -0700)]
drivers: net: ethernet: r8168 realtek driver

combine pgdrv with vendor driver r8168-8.039.00
enable the following configurations for r8168 driver:
- R8168_NAPI enabled by default
- R8168_VLAN enabled by default
- R8168_ASPM enabled by default
- R8168_S5WOL enabled by default

Bug 1594478

Change-Id: Ief611eb47f533dd33311d96dfcf6e6421fc82150
Signed-off-by: marting <marting@nvidia.com>
Reviewed-on: http://git-master/r/740414
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agoarm64: tegra: Remove loki emc dts from darcy
Chaitanya Bandi [Mon, 15 Jun 2015 22:17:15 +0000 (15:17 -0700)]
arm64: tegra: Remove loki emc dts from darcy

Remove including loki emc dt files from darcy
dts files

Change-Id: Ib339b2cadc7298b05e80ecc898cc439707583fb4
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/758235
(cherry picked from commit 3cebcc7f598cd91a73c4e1b14c55841ff2dde2e3)
Reviewed-on: http://git-master/r/764896
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Tested-by: Vinayak Pane <vpane@nvidia.com>
8 years agoarm64: tegra: Update Darcy emc dtsi
Chaitanya Bandi [Wed, 24 Jun 2015 07:19:41 +0000 (00:19 -0700)]
arm64: tegra: Update Darcy emc dtsi

Updated Darcy emc DVFS tables to v9.8.3 and also
added derated tables.

Bug 1643458

Change-Id: I9df338894ab69fce1d7014851b617113c542e7a4
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/762019
(cherry picked from commit afbb309a7832a333931d7144df70f145ad817015)
Reviewed-on: http://git-master/r/764895
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agoRevert "arch: arm64: tegra21: t210: enable BCMDHD_ENCRYPTED_NVRAM"
Om Prakash Singh [Mon, 1 Jun 2015 12:08:49 +0000 (17:38 +0530)]
Revert "arch: arm64: tegra21: t210: enable BCMDHD_ENCRYPTED_NVRAM"

This reverts commit 2e323ab8c3ba38df87dfb34600d9fb2617675019.

Bug 1641546

Change-Id: I3cd034ccda0ce9d1f30334d903039f979f94f9c2
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/750839
Reviewed-by: Kasturi Raghavender <kraghavender@nvidia.com>
Tested-by: Kasturi Raghavender <kraghavender@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agommc: tegra: Enable E_Input before setting the voltage
Naveen Kumar Arepalli [Tue, 30 Jun 2015 09:04:01 +0000 (14:34 +0530)]
mmc: tegra: Enable E_Input before setting the voltage

-Currently E_Input is enabled only before setting 3.3V
and not enabled for 1.8V
-Enabling E_Input before setting any voltages for sdmmc1 and sdmmc3.

Bug 1645608

Change-Id: I18a504be5c4b0d5f95970aa828a704d43663d5b0
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/764086
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agotegra: disp: dc: fake edid init monspec properly
Sam Payne [Wed, 22 Apr 2015 20:59:24 +0000 (13:59 -0700)]
tegra: disp: dc: fake edid init monspec properly

fix fake edid interface to initialize monspec
datastructure properly.

Change-Id: Ie69a692ffcfd7192439887a190050abb70553f64
Signed-off-by: Sam Payne <spayne@nvidia.com>
Reviewed-on: http://git-master/r/734409
(cherry picked from commit 458d9a3bf7c5870b75c5f6496e7383580bc1f091)
Reviewed-on: http://git-master/r/761859
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agodisp: edid: fixes extended edid debugfs read
Sam Payne [Fri, 5 Dec 2014 00:39:38 +0000 (16:39 -0800)]
disp: edid: fixes extended edid debugfs read

the first block was read in repeatedly while
writing extended edids to debugfs.
User may now disable virtual edid by writing
0 to /d/tegradc.x/edid

Change-Id: I0910dbc6fec434c0ca1d1e6fc17e2a18d152aee3
Signed-off-by: Sam Payne <spayne@nvidia.com>
Reviewed-on: http://git-master/r/659778
(cherry picked from commit 1693b0535528bae9cb36f1478f19e49338ec2ed3)
Reviewed-on: http://git-master/r/745814
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
8 years agoarch: arm64: boot: add pcie controller for darcy
Martin Gao [Thu, 18 Jun 2015 02:26:09 +0000 (19:26 -0700)]
arch: arm64: boot: add pcie controller for darcy

Change-Id: If01037f45bece54161d54fd7e052d8f3e55dfbc8
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/759422
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit 83935ec58669e9d4505d76d6c9f10300f75a54b8)
Reviewed-on: http://git-master/r/762789
Reviewed-by: Darren Sun <darrens@nvidia.com>
Tested-by: Darren Sun <darrens@nvidia.com>
8 years agopstore: Removed id from console-ramoops
Gagan Grover [Fri, 29 May 2015 07:06:23 +0000 (12:36 +0530)]
pstore: Removed id from console-ramoops

There are many places in the code, where we
look for file "console-ramoops". We don't
find any match due to entened ID in the name.
Due to which ramoops are skipped from
dropbox and bugreport.

In HE and ST8 we are maintaining only one
session's ramoops and so no need to have ID.

Bug 1646380

Change-Id: Ib4fcd33bc30e144210adb2e13ce486234c06aea4
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/748586
(cherry picked from commit ebae2d30dccac46a340568a276e50d2c1cbcfa86)
Reviewed-on: http://git-master/r/754609
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
Tested-by: Raymond Poudrier <rapoudrier@nvidia.com>
(cherry picked from commit 8baf4fad0bb728d1da6e53caa4b7bcf132b0ba96)
Reviewed-on: http://git-master/r/758452
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
GVS: Gerrit_Virtual_Submit

8 years agommc: sdhci: Fix Card presence status update.
Naveen Kumar Arepalli [Wed, 17 Jun 2015 13:43:27 +0000 (19:13 +0530)]
mmc: sdhci: Fix Card presence status update.

-Use sdhci_tegra call back to know the card presence status.

Bug 200118843

Change-Id: I44c4f6230f3d9a7f957bb3cec567401f652da1fb
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/759163
(cherry picked from commit 7bf513efbd2a43f08ddc9409b3107a929c53ff7c)
Reviewed-on: http://git-master/r/763418
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agonet: wireless: bcmdhd: Donot abort scan results
Harshavardhan Nalajala [Thu, 11 Jun 2015 07:09:50 +0000 (12:39 +0530)]
net: wireless: bcmdhd: Donot abort scan results

During a full scan, if STA gets disconnected from AP, scan request
is aborted. Only few BSS were given to upper layer due to scan
being aborted.

Bug 200113944

Change-Id: I05c269425de30894670478a855dcf9f3a0628298
Signed-off-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Reviewed-on: http://git-master/r/756049
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
8 years agodrivers: video: tegra: dc: Fix dpaux seq
Aly Hirani [Wed, 3 Jun 2015 21:52:10 +0000 (14:52 -0700)]
drivers: video: tegra: dc: Fix dpaux seq

This change fixes the dpaux programming sequence. Specifically, the tegrashell
scripts recommend to program the mode before powering on the pad. In the
current state of code, we were turning on the pad first (in the default dpaux
mode) and then switching the mode.

This specifically led to an issue with certain ddc transactions where the
voltage on SDA lines would hover at ~1.0 V (instead of 0 V/5 V high).
Changing this programming sequence helps remove this hover voltage with
certain sinks.

Bug 1652890

Change-Id: I70ef3f351b9fe2a4126f05a0b546e4360365071a
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/754684
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shu Zhong <shuz@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agoRevert "net: wireless: bcmdhd2: Add 2nd instance of bcmdhd"
kraghavender [Wed, 17 Jun 2015 07:04:10 +0000 (12:34 +0530)]
Revert "net: wireless: bcmdhd2: Add 2nd instance of bcmdhd"

This reverts commit a1bf3e9bd74d8fdce71bb318520b9886bc278604.
Removing the support of the second Wi-Fi chip as of now although
it may be supported in future as this driver is going to be
obsolete for future need. Currently, code is having the coverity
issue and decided to remove the driver from code tree instead of
fixing anything on this as this is obsolete driver.

Bug 200093532

Change-Id: I79da1720af992ad8a4f1a3cc054c31c87e280d5e
Signed-off-by: Raghavender <kraghavender@nvidia.com>
Reviewed-on: http://git-master/r/759017
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agommc: tegra: use sdhci-tegra voltage api's to set voltage
Naveen Kumar Arepalli [Tue, 23 Jun 2015 13:11:42 +0000 (18:41 +0530)]
mmc: tegra: use sdhci-tegra voltage api's to set voltage

-In probe Use tegra_sdhci_signal_voltage_switch api to set voltage.
-tegra_sdhci_signal_voltage_switch has sdhci register read/writes, hence
the regulator code is moved after enabling necessary clocks.

Bug 200117771

Change-Id: If5644031a1f70cd4bf5213ae9902bf068954d871
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/761300
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agodrivers: video: tegra: Remove EDID clockrate check
Aly Hirani [Sat, 13 Jun 2015 00:46:54 +0000 (17:46 -0700)]
drivers: video: tegra: Remove EDID clockrate check

This change removes the mode-filtering which used to remove the
modes from the modedb based on the max TMDS clock rate suggested
by the EDID.

From the HDMI 2.0 spec, Section 10.3.2, with regards to
Max_TMDS_Character_Rate: "This field may be set by the Sink to a
value below the TMDS Character Rate corresponding to the maximum
Pixel clock rate at the maximum color depth". HDMI 1.4 has a same
clause for Max_TMDS_Clock.

This means that the actual maximum TMDS rate supported by the TV
can be higher than the value suggested in the EDID. This filter
should have never been added in the first place since it can
remove actually supported modes.

Bug 1653863

Change-Id: I087b7a4efc3e43de4dfb34071adb88dc9cc6b3e1
Signed-off-by: Aly Hirani <ahirani@nvidia.com>
Reviewed-on: http://git-master/r/757615
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
8 years agoata: ahci: Place SATA in reset before uphy init
Preetham Chandru R [Thu, 18 Jun 2015 15:19:38 +0000 (20:49 +0530)]
ata: ahci: Place SATA in reset before uphy init

Place SATA, SATA cold and SATA OOB in reset state
before uphy is initialized.

Bug 200107569

Change-Id: Ia9c9175012406079182e5533856886c45e358bd0
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Signed-off-by: Venkata Jagadish <vjagadish@nvidia.com>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/759448
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
8 years agoloki:foster: emc update to 980 v09
David DSH [Wed, 3 Jun 2015 00:58:39 +0000 (17:58 -0700)]
loki:foster: emc update to 980 v09

·        Update emc_reg_calc to P980
o   Update MRW command to use MRS_SHORT_WAIT_CNT for bug 200099624
o   Fix GSC for bug 1628471
o   Fix W2W/R2R for lp4 dual rank usage for bug 1616889
o   Add 5 new lp4 mappings
o   Reduce PutermExtra by 2
o   Fix unterminated CA/DQ vref to 42%
·        DVFS_gen_script update to V1.4 from V1.3 for Vcore(mV)

Bug 1541472
Bug 1636958

Change-Id: I02c23b4508c06e455ced5e448960271eba360968
Signed-off-by: David DSH <ddastoussthi@nvidia.com>
Reviewed-on: http://git-master/r/751608
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
8 years agoarch: arm64: boot: separate VDDIO_GPIO_AP settings
Martin Gao [Thu, 28 May 2015 02:33:37 +0000 (19:33 -0700)]
arch: arm64: boot: separate VDDIO_GPIO_AP settings

Separate VDDIO_GPIO_AP rail settings for 930 and 032 SKU to
fix power leakage.

Bug 1649974

Change-Id: I9d356d2ce624c0d54462263b162dccd5fba0ce25
Signed-off-by: Martin Gao <marting@nvidia.com>
Reviewed-on: http://git-master/r/748085
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agotty: Replace ldisc locking with ldisc_sem
Peter Hurley [Sat, 15 Jun 2013 11:04:48 +0000 (07:04 -0400)]
tty: Replace ldisc locking with ldisc_sem

Line discipline locking was performed with a combination of
a mutex, a status bit, a count, and a waitqueue -- basically,
a rw semaphore.

Replace the existing combination with an ld_semaphore.

Fixes:
 1) the 'reference acquire after ldisc locked' bug
 2) the over-complicated halt mechanism
 3) lock order wrt. tty_lock()
 4) dropping locks while changing ldisc
 5) previously unidentified deadlock while locking ldisc from
    both linked ttys concurrently
 6) previously unidentified recursive deadlocks

Adds much-needed lockdep diagnostics.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 36697529b5bbe36911e39a6309e7a7c9250d280a)

Bug 200106032

Change-Id: Idf70810ce6a56630700fcfb8ad8c129c3efea4a0
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/750829
(cherry picked from commit 4c699ed133aee43d4bd58e6a7df9ec2c4b891e03)
Signed-off-by: Xianhui <xianhuiw@nvidia.com>
Reviewed-on: http://git-master/r/758499
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agotty: Add lock/unlock ldisc pair functions
Peter Hurley [Sat, 15 Jun 2013 11:04:47 +0000 (07:04 -0400)]
tty: Add lock/unlock ldisc pair functions

Just as the tty pair must be locked in a stable sequence
(ie, independent of which is consider the 'other' tty), so must
the ldisc pair be locked in a stable sequence as well.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit d2c438905f9f718b3d9f5d89ce163fc22bd33995)

Bug 200106032

Change-Id: I349198281d6c8843192020f19c5c4931e3593797
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/750828
(cherry picked from commit b92f97686847258ed855cb3f0f0308d782e266a6)
Signed-off-by: Xianhui <xianhuiw@nvidia.com>
Reviewed-on: http://git-master/r/758497
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agotty: Fix tty_ldisc_lock name collision
Peter Hurley [Sat, 15 Jun 2013 11:04:46 +0000 (07:04 -0400)]
tty: Fix tty_ldisc_lock name collision

The file scope spinlock identifier, tty_ldisc_lock, will collide
with the file scope lock function tty_ldisc_lock() so rename it.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 137084bbaddf4f6dde948ef3a14e18ba0754cc0d)

Bug 200106032

Change-Id: Idd65d54311350cebf79f4f46ef8f40612adaaed4
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/750827
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit d656f9abdc43df1741d1fc3d80c105afc54a9491)
Signed-off-by: Xianhui <xianhuiw@nvidia.com>
Reviewed-on: http://git-master/r/758496
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agotty: Add timed, writer-prioritized rw semaphore
Peter Hurley [Tue, 16 Apr 2013 10:15:50 +0000 (06:15 -0400)]
tty: Add timed, writer-prioritized rw semaphore

The semantics of a rw semaphore are almost ideally suited
for tty line discipline lifetime management;  multiple active
threads obtain "references" (read locks) while performing i/o
to prevent the loss or change of the current line discipline
(write lock).

Unfortunately, the existing rw_semaphore is ill-suited in other
ways;
1) TIOCSETD ioctl (change line discipline) expects to return an
   error if the line discipline cannot be exclusively locked within
   5 secs. Lock wait timeouts are not supported by rwsem.
2) A tty hangup is expected to halt and scrap pending i/o, so
   exclusive locking must be prioritized.
   Writer priority is not supported by rwsem.

Add ld_semaphore which implements these requirements in a
semantically similar way to rw_semaphore.

Writer priority is handled by separate wait lists for readers and
writers. Pending write waits are priortized before existing read
waits and prevent further read locks.

Wait timeouts are trivially added, but obviously change the lock
semantics as lock attempts can fail (but only due to timeout).

This implementation incorporates the write-lock stealing work of
Michel Lespinasse <walken@google.com>.

Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4898e640caf03fdbaf2122d5a33949bf3e4a5b34)

Bug 200106032

Change-Id: I7c3c091cda2cd74dd8eacbf2625498bd8b9505a0
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/750826
(cherry picked from commit 8c03c5895b88db83edc6b4ba1b6659994ff11006)
Signed-off-by: Xianhui <xianhuiw@nvidia.com>
Reviewed-on: http://git-master/r/758495
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
8 years agovideo: tegra: hdmi: read yuv flag bit from bl
Santosh Reddy Galma [Tue, 19 May 2015 15:40:42 +0000 (21:10 +0530)]
video: tegra: hdmi: read yuv flag bit from bl

read yuv mode flag bit from bootloader for seamless hdmi support
in yuv 4:2:0 8 bit mode and set AVI infoframe parameters.
Also skip disabling avi infoframe before configuring for seamless case.

Bug 200105508

Change-Id: I316b9edf1896b405c40f71e4011c3d4b731c710f
Signed-off-by: Santosh Reddy Galma <galmar@nvidia.com>
Reviewed-on: http://git-master/r/744418
Reviewed-by: Manish Tuteja <mtuteja@nvidia.com>
Tested-by: Manish Tuteja <mtuteja@nvidia.com>
8 years agoloki: Allow to enter fastboot without USB
David DSH [Wed, 3 Jun 2015 20:24:53 +0000 (13:24 -0700)]
loki: Allow to enter fastboot without USB

Add a property that let you enter fastboot without
usb cable plugin in the device.

Bug 1648610

Change-Id: I5130b9cf52f290111aad2dbbd4f20ed581a76cc0
Signed-off-by: David DSH <ddastoussthi@nvidia.com>
Reviewed-on: http://git-master/r/752065
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>
Tested-by: Raymond Poudrier <rapoudrier@nvidia.com>
8 years agoplatform: ape: add tegra_pd_ops for power domains
Nitin Kumbhar [Fri, 24 Apr 2015 12:09:08 +0000 (17:39 +0530)]
platform: ape: add tegra_pd_ops for power domains

Add tegra_pd_ops for ape and adsp power domains so
that driver's *runtime_suspend() and *runtime_resume()
routines are called as part of stop_dev() and
start_dev() and not at the last when power domain is
being powered off.

Remove power down delay for APE power domain.

Bug 200090996

Change-Id: Ie7d69964d647b0392728b9f5b147818f4a525928
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/735632
(cherry picked from commit 37ca24d340ddf0b70b406d04bf98ee686ad280a7)
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/744933
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Darren Sun <darrens@nvidia.com>
Tested-by: Darren Sun <darrens@nvidia.com>
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
(cherry picked from commit bb87d641b2c93577a3f1e2453331d79da121b1c8)
Reviewed-on: http://git-master/r/752302

8 years agoplatform: ape: add adsp sub-domain
Nitin Kumbhar [Fri, 24 Apr 2015 11:11:24 +0000 (16:41 +0530)]
platform: ape: add adsp sub-domain

Add adsp sub-domain for nvadsp and adsp_audio drivers. This
ensures that adsp can be handled differently compared to  ape.

Bug 200090996

Change-Id: Ic7222606db977c46120370ea98f665fd2ba58ecf
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/735615
(cherry picked from commit 8b5ce0eb1f754373f848892a5c23c82269e18a19)
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/744932
(cherry picked from commit 1d340f8628a5f67c3adb069eeb2a814596dd81f8)
Reviewed-on: http://git-master/r/746482
Reviewed-by: Automatic_Commit_Validation_User
8 years agonet: wireless: bcmdhd: NULL checks in dhd_wl_host_event
Mohan Thadikamalla [Wed, 10 Jun 2015 12:19:16 +0000 (17:49 +0530)]
net: wireless: bcmdhd: NULL checks in dhd_wl_host_event

Check for iflist and net NULL values before processing
the cfg80211 event.

Bug 200105092

Change-Id: I589b900427f6df02cdad7cf73b1edefb933f4093
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: http://git-master/r/753619
(cherry picked from commit 91bbd3e7e18f464c14060635c7b21f9d31d6d8c7)
Reviewed-on: http://git-master/r/755564
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agousb: hid: Disable auto-suspend for all HID devices
Petlozu Pravareshwar [Mon, 8 Jun 2015 13:21:09 +0000 (18:51 +0530)]
usb: hid: Disable auto-suspend for all HID devices

Disable auto-suspend for all HID devices

Bug 200113464

Change-Id: I867285a6c7a9a6bb61aaafc8605953843306f685
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: http://git-master/r/754713
(cherry picked from commit 5e1d9a351899810395cda415693195f5e858742d)
Reviewed-on: http://git-master/r/754518
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
8 years agodrivers:misc: Setup gamepad_reset gpio only on loki
Ankita Garg [Thu, 22 Jan 2015 21:29:54 +0000 (13:29 -0800)]
drivers:misc: Setup gamepad_reset gpio only on loki

Bug 1587415

Change-Id: I304bd5f92918e0dc9c1632f9abed66721c62ff17
Signed-off-by: Ankita Garg <ankitag@nvidia.com>
Reviewed-on: http://git-master/r/745798
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Reviewed-by: Spencer Sutterlin <ssutterlin@nvidia.com>
Tested-by: Spencer Sutterlin <ssutterlin@nvidia.com>
8 years agoT210: dc: hdmi: Disable cmu on DPAUX power toggle
Anshuman Nath Kar [Fri, 12 Dec 2014 22:05:06 +0000 (14:05 -0800)]
T210: dc: hdmi: Disable cmu on DPAUX power toggle

We disable dpaux power down during hdmi crc check
In order to ensure that crc from native image
is calculated, cmu is also disabled

Bug 1504795

Change-Id: Ie3994b28a0d1b3fb2820bdb5d290f87ef22962fa
Signed-off-by: Anshuman Nath Kar <anshumank@nvidia.com>
Reviewed-on: http://git-master/r/663409
Reviewed-by: Vinayak Pane <vpane@nvidia.com>
Tested-by: Vinayak Pane <vpane@nvidia.com>