]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/log
sojka/nv-tegra/linux-3.10.git
9 years agovideo: tegra: nvmap: fix use-after-free race condition
Maneet Singh [Fri, 12 Sep 2014 03:12:33 +0000 (20:12 -0700)]
video: tegra: nvmap: fix use-after-free race condition

Incremented nvmap_handle ref count in utility function
nvmap_get_id_from_dmabuf_fd() before the function release reference
to dma buffer. This is required to avoid race conditions in nvmap
code where nvmap_handle returned by this function could be freed
concurrently while the caller is still using it.

As a side effect of above change, every caller of this utility
function must decrement nvmap_handle ref count after using the
returned nvmap_handle.

Bug 1553082

Change-Id: Iffc2e5819f8b493d5ed95a9d0c422ccd52438965
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/498135
(cherry picked from commit afddea745cc4f4a824be501ecbbb50f55e7e6f04)
Reviewed-on: http://git-master/r/556843
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: nvmap: cleanup redundant functions
Maneet Singh [Fri, 12 Sep 2014 00:53:42 +0000 (17:53 -0700)]
video: tegra: nvmap: cleanup redundant functions

Removed redundant function unmarshal_user_id() and replaced it with
unmarshal_user_handle() which it internally calls without any other
changes.

Bug 1553082

Change-Id: I7d998966c593f11a3322b0503ef11311fc1ae5e7
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/498103
(cherry picked from commit 4880b6c2bdf5b10e4a71b5b79e7878343b9e7e3b)
Reviewed-on: http://git-master/r/556842
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: dc: Avoid FRAME_END_INT conflict
Daniel Solomon [Fri, 15 Aug 2014 00:50:15 +0000 (17:50 -0700)]
video: tegra: dc: Avoid FRAME_END_INT conflict

Allowing for dc->lock to be acquired by the
caller in function tegra_dc_config_frame_end_intr
can result in FRAME_END_INT mask register being
overwritten if the lock is actually acquired by
another thread.

Refactor the critical section into its own function
and allow callers to call either function. Also
Change the name of tegra_dc_wait_for_frame_end
to indicate that it should be called with dc->lock
locked.

Bug 1534724

Change-Id: I87b1fc529f29f707a1bdadf18efa6bb19d6966b3
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
(cherry picked from commit ec9b7f555b9648e3aee0cd9781a92b14178a3344)
Reviewed-on: http://git-master/r/556484
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: dc: Fix and refactor FRAME_END_INT
Daniel Solomon [Tue, 5 Aug 2014 21:48:42 +0000 (14:48 -0700)]
video: tegra: dc: Fix and refactor FRAME_END_INT

- Fix a conflict with other DC interrupt masks
  when the DSI driver waits on FRAME_END_INT
- Move generic FRAME_END_INT mask/unmask and
  wait-for functions to dc.c

Bug 1534724
Bug 200036846

Change-Id: I40e26ada2f0494782979e32c1a22906361b214b5
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/451186
(cherry picked from commit 24a39c49f63eea704003ee27296f1f70d46bcbd0)
Signed-off-by: Gaurav Singh <gauravsingh@nvidia.com>
Reviewed-on: http://git-master/r/556483
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: host: pod: Tune vic scaling param
Wenjia Zhou [Thu, 11 Sep 2014 01:06:13 +0000 (18:06 -0700)]
video: tegra: host: pod: Tune vic scaling param

Tuning vic scaling parameter to make vic more sensible to load and stay longer
at a slightly higher frequency.
- This tuning does not increase power in regular use cases.
- Thie will help fix CTS1 testPreviewFpsRange.

Bug 1548383

Change-Id: Ib85f82a954bf7ee544e7e9ebd0606a2c72fc779e
Reviewed-on: http://git-master/r/497654
(cherry picked from commit 06d5f53b7984517d047948dfa5942654d91adc40)
Signed-off-by: Ruchit Sharma <ruchits@nvidia.com>
Reviewed-on: http://git-master/r/556839
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agonet: wireless: bcmdhd: synchronize 3 contexts
Bibhay Ranjan [Fri, 10 Oct 2014 12:25:53 +0000 (17:55 +0530)]
net: wireless: bcmdhd: synchronize 3 contexts

net_device and net_info is used in three different
contexts wl_event_handler, _dhd_sysioc_thread and
and within wl_dealloc_netinfo. These contexts are
getting triggered when AP association is happening
and simultaneously P2P interface deletion happens.

Because of this particular scenario, these two structs
get corrupted as they are not synchronized.

Now synchronizing them with readers/writers semaphore
makes sure, we do not free the memories in one context
while other context is still using it.

Bug 200040067

Change-Id: I6481defd14d397dd8c0a457e63ef4f8b56196152
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/555458
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sang-Hun Lee <sanlee@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
9 years agonvmap: set background allocator to SCHED_IDLE
Jon McCaffrey [Fri, 10 Oct 2014 23:08:42 +0000 (16:08 -0700)]
nvmap: set background allocator to SCHED_IDLE

Set background allocator to SCHED_IDLE, so that it only runs when no
other processes wish to.  Otherwise, it can run for 20-100ms with only
occasional interruption, signficantly disrupting other processing.

Bug 1561572

Change-Id: Id4225bafbc51ce95b760fa05a5c2979f713f6916
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: http://git-master/r/555615
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: nvmap: Fix zero page support
Alex Waterman [Mon, 14 Apr 2014 23:17:27 +0000 (16:17 -0700)]
video: tegra: nvmap: Fix zero page support

In the case that the zeroed page kernel config is set, the
userspace zeroed memory module param also required being set
otherwise non-zero memory could be placed back into the page
pools.

Change-Id: Ie4eee587134b95215e6095cb0cc2329bfb2a072f
Reviewed-on: http://git-master/r/396081
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: http://git-master/r/555614
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: nvmap: Consolidate zeroed mem config
Alex Waterman [Mon, 28 Apr 2014 18:27:17 +0000 (11:27 -0700)]
video: tegra: nvmap: Consolidate zeroed mem config

Consilidate the NVMAP_FORCE_ZEROED_USER_PAGES config to only
two locations. Both are in nvmap_handle.c and ensure that
the module param zero_memory is enabled and unchangable when
NVMAP_FORCE_ZEROED_USER_PAGES is set.

Change-Id: I54de5c6742f92eafdd8f5ca4aaf87d0f06865aaa
Reviewed-on: http://git-master/r/403038
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: http://git-master/r/555613
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: nvmap: clean cache during page allocations into page pool
Krishna Reddy [Tue, 5 Aug 2014 21:43:37 +0000 (14:43 -0700)]
video: tegra: nvmap: clean cache during page allocations into page pool

Clean cache during page allocations into page pool to
avoid cache clean overhead at the time of allocation.
Increase page pool refill size to 1MB from 512KB.

Bug 1539190

Change-Id: Idf38046c290e0d672c2b28ad4d41000defc35c21
Reviewed-on: http://git-master/r/453197
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: http://git-master/r/555612
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: nvmap: Remove old ZP support
Alex Waterman [Thu, 3 Apr 2014 01:21:18 +0000 (18:21 -0700)]
video: tegra: nvmap: Remove old ZP support

Remove the old foreground page zeroing support. This is replaced
by using the background zeroed page pool support instead. If page
pools are empty clearing happens in the allocation context.

Bug 1371433
Bug 1392833

Change-Id: I2345455112ffe046b2b4282b552522d81e53ec70
Reviewed-on: http://git-master/r/383931
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: http://git-master/r/555611
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agovideo: tegra: nvmap: Add background allocator
Alex Waterman [Thu, 3 Apr 2014 01:20:14 +0000 (18:20 -0700)]
video: tegra: nvmap: Add background allocator

Add a background kernel thread that allocates memory into the
page pool.

This allows zeroed pages to be allocated directly into the page
pool. In turn this avoids that overhead in the allocation path
itself (for page pool hits at least).

Pre-flushing the pages being placed into the page pool will be
implemented later.

Bug 1371433
Bug 1392833

Change-Id: Ic0bdc296faf3811197de061c568e92a05ea84e09
Reviewed-on: http://git-master/r/383930
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: http://git-master/r/555610
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoRevert "ARM: tegra: skip USB resume from LP0"
Todd Poynter [Mon, 13 Oct 2014 17:19:21 +0000 (10:19 -0700)]
Revert "ARM: tegra: skip USB resume from LP0"

Bug 1410165

This reverts commit f5fe58cdc8b82396699cea9ad98dc6c4d1e18daa.

Change-Id: Idf03e5225c2758f0428403bf983a1c5481140933
Signed-off-by: Todd Poynter <tpoynter@nvidia.com>
Reviewed-on: http://git-master/r/556379

9 years agotegra: dc: Add checks for Tegra_dc_set_vblank ioctl
Anshuman Nath Kar [Thu, 9 Oct 2014 16:13:43 +0000 (09:13 -0700)]
tegra: dc: Add checks for Tegra_dc_set_vblank ioctl

Change-Id: I7518bb6632bb622f1dfdf86ea08ee5e1c985546e
Signed-off-by: Anshuman Nath Kar <anshumank@nvidia.com>
(cherry picked from commit 0e735ba723bc86c1fdedb796a2143dc79d98694a)
Reviewed-on: http://git-master/r/555079
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agovideo: tegra: dc: protect vsync code with lp_lock
Allen Yu [Mon, 21 Jul 2014 05:04:23 +0000 (13:04 +0800)]
video: tegra: dc: protect vsync code with lp_lock

There is a gap in vsycn code (wait for user vblank completion) that is not
and can not be protected by dc->lock. So there might be races between vsync
code and PM code. For example, if tegra_dsi_host_suspend() or tegra_dc_disable()
is called while vsync thread is waiting for the completion, dc clock will be
disabled as we drop all references to dc clock in _suspend() or _disable().

Fix description:
- Rename one_shot_lp_lock to lp_lock as we need it for continuous mode as well.
- Protect vsync code with lp_lock to eliminate races with PM code path.

Bug 200009462

Change-Id: I4c6c44b9550cfc62862ad5e1988869fbf7e43a77
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/440174
(cherry picked from commit 316e9431b9393290b829c7254d306d62a3ce5942)
Reviewed-on: http://git-master/r/553751
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agovideo: tegra: dc: eliminate races in vsync code
Jon Mayo [Thu, 10 Jul 2014 18:07:05 +0000 (11:07 -0700)]
video: tegra: dc: eliminate races in vsync code

Fix races in vsync code, don't touch data structure outside of locks.
Support both continous mode panels, not just one-shot panels.
Use a bit flag so we don't clobber vblank settings needed by other modules.

Bug 1532920
Bug 200009462
Bug 200016696

Change-Id: I9d6625046ff8221a9174c81d842977e6503fa5f7
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/436728
(cherry picked from commit 891f2d5a17245b387adf0f9260ebdc4efc8e40a2)
Reviewed-on: http://git-master/r/553740
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agosecurity: tlk_driver: free tmp memrefs
Scott Long [Fri, 29 Aug 2014 23:18:18 +0000 (16:18 -0700)]
security: tlk_driver: free tmp memrefs

Release temporary memory parameter references at the conclusion
of a launch operation to ensure pages are unpinned and
other resources are properly cleaned up.

Change-Id: I584e2580be487fe281a88cb16d41aa241763561d
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/494129
(cherry picked from commit 83d238778f83a34b4eed7718e962ad3a778ad25c)
Reviewed-on: http://git-master/r/555555
Tested-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agovideo: tegra: nvmap: Fix sleeping while atomic warning
Gaurav Sarode [Mon, 4 Aug 2014 21:24:04 +0000 (14:24 -0700)]
video: tegra: nvmap: Fix sleeping while atomic warning

When reading /d/nvmap/iovmm/procrank, we first take clients_lock
spin_lock and then take ref_lock mutex inside nvmap_iovmm_get_client_mss.
This creates mutex inside spin_lock situation. To fix this,
clients_lock is converted to mutex.

bug 1540937

Change-Id: I7f3b37791c119dd94a3ce65e06a2926a7e1db25c
Signed-off-by: Gaurav Sarode <gsarode@nvidia.com>
Reviewed-on: http://git-master/r/451076
(cherry picked from commit c99ccb995c8d0e52a28147af1cc8b9181c364b3d)
Reviewed-on: http://git-master/r/453636
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/555204
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: tegra: skip USB resume from LP0
Suresh Mangipudi [Mon, 6 Oct 2014 12:35:51 +0000 (18:05 +0530)]
ARM: tegra: skip USB resume from LP0

Change to skip USB resume from LP0 when wake source is other than USB

Bug 1410165

Change-Id: Iaf7b333c3803522971dad0126e04abe557dea04a
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/554933
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agoARM: dts: update battery soc range and input voltage limit
Venkat Reddy Talla [Thu, 11 Sep 2014 05:26:58 +0000 (10:56 +0530)]
ARM: dts: update battery soc range and input voltage limit

updating input voltage limit and battery soc range to configure
VINDPM(input voltage limit) based on battery soc value.

1) if SOC < 50%, then VDINDPM[3:0] = 4'b0100 = 4.20V
2) if 50% <= SOC < 60%, then VDINDPM[3:0] = 4'b0101 = 4.28V
3) if 60% <= SOC < 70%, then VDINDPM[3:0] = 4'b0110 = 4.36V
4) if 70% <= SOC < 80%, then VDINDPM[3:0] = 4'b0111 = 4.44V
5) if 80% <= SOC < 85%, then VDINDPM[3:0] = 4'b1000 = 4.52V
6) if 85% <= SOC < 90%, then VDINDPM[3:0] = 4'b1001 = 4.60V
7) if 90% <= SOC < 95%, then VDINDPM[3:0] = 4'b1010 = 4.68V
8) if 95% <= SOC <= 100%, then VDINDPM[3:0] = 4'b1011 = 4.76V

Bug 1516392

Change-Id: I09d5841fe07c7c854acc8564cc56fd5afdc7d1a9
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/542721
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agopower: lc709203f: add interface to get battery soc
Venkat Reddy Talla [Thu, 11 Sep 2014 05:06:53 +0000 (10:36 +0530)]
power: lc709203f: add interface to get battery soc

provide interface to get battery state of charge value.
charger driver need battery soc to configure input voltage
limit based on battery soc.

Bug 1516392

Change-Id: I06579e421fb05ea683bca77c69ba0596ea1d50c6
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/542720
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agopower: bq2419x: configure input voltage when charger cable connected
Venkat Reddy Talla [Thu, 11 Sep 2014 04:50:54 +0000 (10:20 +0530)]
power: bq2419x: configure input voltage when charger cable connected

configure input voltage limit based on battery soc immediately
after connecting charger cable to device.

Bug 1516392

Change-Id: I6e365abf58cf66c7993836194ac49edb5f7ea90f
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/542719
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agoUpdate the cfg layer with new channel info
Shital Jaju [Thu, 14 Aug 2014 17:13:26 +0000 (10:13 -0700)]
Update the cfg layer with new channel info

The upper layer is not notified of the change in channel after roaming.
This results in AGO creation on incorrect channel (previous AP channel)
after roaming. This change will update the cfg layer with the new channel
info after receiving romaing event.

Bug 200024418

Change-Id: Iabe7b329edc14fcc1491ec99966d06f249468105
Signed-off-by: Shital Jaju <shital.jaju@broadcom.com>
(cherry picked from commit df1e9aa0c460ee38f07a9a2ecd20006bf825c8a3)
Reviewed-on: http://git-master/r/552767
Reviewed-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Tested-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
9 years agoRevert "net: wireless: bcmdhd: handle roam indication"
Srinivas Ramachandran [Wed, 1 Oct 2014 21:07:00 +0000 (14:07 -0700)]
Revert "net: wireless: bcmdhd: handle roam indication"

This reverts commit 56e52b147181ca3489e0090072d6d5fc42be0f1d.

Change-Id: I16b47bd65ba41716667894705c9284abddd0f537
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: http://git-master/r/552766
Reviewed-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
9 years agostaging: ozwpan: consume all rx skb
Vinayak Pane [Wed, 9 Jul 2014 01:44:17 +0000 (18:44 -0700)]
staging: ozwpan: consume all rx skb

All rx skb should be consumed or dropped, if left
unconsumed it leads to netdev becoming stale situations.
Check net state before submitting tx skb.

Re-arrange oz_remove_binding() function to make sure PDs
stop before net intf packet_type callbacks are removed.

Remove old WAR to recover from enumeration failure.

Bug 1522708

Change-Id: Id13e837c9ed6941f03404762203ad2841e9af24f
Signed-off-by: Vinayak Pane <vpane@nvidia.com>
(cherry picked from commit c2022c5288c83ad3dc31987157bf152f16d85fb4)
Reviewed-on: http://git-master/r/440892
(cherry picked from commit 523f9fe8e6bdbb147a1f186fb7aca74bd49da9a1)
Reviewed-on: http://git-master/r/554511
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoarm: tegra: enable maxim wall charger support
Philip Rakity [Fri, 3 Oct 2014 10:51:05 +0000 (11:51 +0100)]
arm: tegra: enable maxim wall charger support

set maximum wall charger voltage to 16 volts

Change-Id: I9559ca5522db7a5d439cbb5a149d468e861f5d41
Signed-off-by: Philip Rakity <prakity@nvidia.com>
Reviewed-on: http://git-master/r/553235
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Shylender Gaddamwar <sgaddamwar@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agoARM: tegra: reset short_autosuspend_delay
Neil Patel [Wed, 1 Oct 2014 18:38:47 +0000 (14:38 -0400)]
ARM: tegra: reset short_autosuspend_delay

Reset the short_autosuspend_delay. The
short_autosuspend and suspend delay will be same.

Bug 200035245

Change-Id: Ib08cf433aaf3ffa9f3ee8d9156d4689fa1e0262d
Signed-off-by: Neil Patel <neilp@nvidia.com>
Reviewed-on: http://git-master/r/552660
(cherry picked from commit 50f0fb4b0d3d4a7406be926f343a00432c4af061)
Reviewed-on: http://git-master/r/554329
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Steve Lin <stlin@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agousb: host: tegra: no delay for boost frequency
Martin Chabot [Thu, 3 Jul 2014 13:47:31 +0000 (15:47 +0200)]
usb: host: tegra: no delay for boost frequency

Apply frequency boost as soon as bus_resume is done
to avoid no scheduling situation when there is a
lot of ehci_irq
Move frequency boost after ehci_resume to keep boost
for high speed device only.

Bug 1480850
Bug 1519865

Change-Id: I7814078a07f9e9abdf3d3352a69f11a20b49332c
Signed-off-by: Martin Chabot <mchabot@nvidia.com>
Reviewed-on: http://git-master/r/552655
(cherry picked from commit 0e81d7f0f1386e416781e23181323327e66ff82c)
Reviewed-on: http://git-master/r/554328
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Neil Patel <neilp@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: Neil Patel <neilp@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoUSB: cdc-acm: fix runtime PM imbalance at shutdown
Johan Hovold [Mon, 26 May 2014 17:23:45 +0000 (19:23 +0200)]
USB: cdc-acm: fix runtime PM imbalance at shutdown

commit 5292afa657d0e790b7479ad8eef9450c1e040b3d upstream.

Make sure only to decrement the PM counters if they were actually
incremented.

Note that the USB PM counter, but not necessarily the driver core PM
counter, is reset when the interface is unbound.

Fixes: 11ea859d64b6 ("USB: additional power savings for cdc-acm devices
that support remote wakeup")

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4421a014e97c6669db6eb8600ce83d29e5484842)

Change-Id: I9038def962389acfca7f6a583e719d15f0f8d758
Signed-off-by: Neil Patel <neilp@nvidia.com>
Reviewed-on: http://git-master/r/553907
GVS: Gerrit_Virtual_Submit
Reviewed-by: Steve Lin <stlin@nvidia.com>
9 years agovideo: tegra: nvmap: track handle's mapped memory
Maneet Singh [Wed, 23 Jul 2014 00:28:04 +0000 (17:28 -0700)]
video: tegra: nvmap: track handle's mapped memory

Added new file "maps" for nvmap heaps. In addition to data given by
existing "allocations" file, this also shows the client's virtual
mappings and total amount of handle physical memory that is actually
mapped to a client's virtual address space.

This change will help in tracking nvmap memory usage of processes.

Bug 1529015

Change-Id: I85b5c221c7a7475cbc3585b130fda6a282756662
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/440942
(cherry picked from commit f23859dc88a8a6dd9346334870f8b9e1a4f2bca4)
Reviewed-on: http://git-master/r/448503
(cherry picked from commit 1f632679174cea962406980c8201d63c163635ee)
Reviewed-on: http://git-master/r/553683
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
9 years agovideo: tegra: nvmap: track handle's vma list
Maneet Singh [Tue, 22 Jul 2014 23:33:23 +0000 (16:33 -0700)]
video: tegra: nvmap: track handle's vma list

Patch includes following nvmap changes:
 - added "pid" field in nvmap_vma_list so now looking at handle's vma list,
   we can say which vma belongs to which process.
 - sorted handle's vma list in ascending order of handle offsets.

Bug 1529015

Change-Id: Ide548e2d97bab8072461c11c9b8865ab4aa01989
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/440914
(cherry picked from commit 267b61e83ebff53dc297a7e8ff5f3005f91b2276)
Reviewed-on: http://git-master/r/448493
(cherry picked from commit 37132fa461d23552b805e32d268acd14b27588c3)
Reviewed-on: http://git-master/r/553677
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
9 years agovideo: tegra: nvmap: fix unsigned comparison against zero
Deepak Nibade [Fri, 11 Apr 2014 10:39:27 +0000 (16:09 +0530)]
video: tegra: nvmap: fix unsigned comparison against zero

Fix Coverity issue of comparing unsigned variable to zero
Coverity id : 26235

Bug 1416640

Change-Id: Ie106ae57b665d01e45769a0b772ceeb940dd97f9
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/395184
(cherry picked from commit 0bca0b1dbd356866c8846f55e5ada253a7bb8829)
Reviewed-on: http://git-master/r/553652
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
9 years agovideo: tegra: nvmap: remove carveout commit accounting
Krishna Reddy [Fri, 20 Jun 2014 21:40:52 +0000 (14:40 -0700)]
video: tegra: nvmap: remove carveout commit accounting

Remove obsolete carveout commit accounting.

Change-Id: If7e25ca2ef43c036558c9c9ead5f67ee8eef6b42
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/426734
(cherry picked from commit c1ddad1b13332386857f9f2964aa8968094e7e8c)
Reviewed-on: http://git-master/r/553676
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: nvmap: unify debug stats code
Krishna Reddy [Fri, 20 Jun 2014 21:33:55 +0000 (14:33 -0700)]
video: tegra: nvmap: unify debug stats code

Unify debug stats code for iovmm and carveouts.

Change-Id: Ief800587870845ed6f566cb7afb2c91000d177ca
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/426733
(cherry picked from commit 0c0f7e5a9ef459d7940cc66af0a00321bb54d389)
Reviewed-on: http://git-master/r/553675
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: nvmap: don't count shared memory in full
Krishna Reddy [Thu, 19 Jun 2014 23:10:23 +0000 (16:10 -0700)]
video: tegra: nvmap: don't count shared memory in full

Don't count shared memory in full in iovmm stats.
Add SHARE field to allocations info to show how many
processes are sharing the handle.
Update few comments in the code.
Remove unnecessary iovm_commit accounting.

Change-Id: I49650bf081d652dedc7139f639aae6da06965ecd
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/426274
(cherry picked from commit 92d47c10fbf7a315d4c953bafb71ee23032b7f65)
Reviewed-on: http://git-master/r/553673
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: nvmap: set handle dmabuf to NULL early
Krishna Reddy [Tue, 17 Jun 2014 19:30:16 +0000 (12:30 -0700)]
video: tegra: nvmap: set handle dmabuf to NULL early

This can allow catching handle dmabuf usage during its free.

Change-Id: Ie20c7b860ca5194a190ff7005302bf50602d16ed
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/424329
(cherry picked from commit 10e648c2e2f9760c97ce55a1091d9e7097d2504d)
Reviewed-on: http://git-master/r/553669
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: nvmap: add handle share count to debug stats
Krishna Reddy [Fri, 20 Jun 2014 00:34:01 +0000 (17:34 -0700)]
video: tegra: nvmap: add handle share count to debug stats

handle share count provides info on how many processes are sharing
the handle. IOW, how many processes are holding a ref on handle.
Update the comments for umap/kmap_count.

Change-Id: I9f543ebf51842dad6ecd3bfeb7480496c98963be
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/426302
(cherry picked from commit 244c41508be0705cc232942b9403e17611f63e45)
Reviewed-on: http://git-master/r/553668
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: nvmap: support lru handle tracking
Krishna Reddy [Tue, 3 Jun 2014 23:18:31 +0000 (16:18 -0700)]
video: tegra: nvmap: support lru handle tracking

Add debugfs node for dumping lru handle allocations info.
Bug 1519700

Change-Id: I0180f59ced7d070d1952e66cc7f1b21510a53c0e
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/418555
(cherry picked from commit bb20ce7cb828f4e64c64f538cace5f414d9e74fc)
Reviewed-on: http://git-master/r/553651
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: nvmap: track kernel and user map count
Krishna Reddy [Mon, 2 Jun 2014 23:18:56 +0000 (16:18 -0700)]
video: tegra: nvmap: track kernel and user map count

Track kernel and user map counts and add these to debug info.
Bug 1519700

Change-Id: I9b06bd748737dbfe57f531af4f9b61a48429d01a
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/417980
(cherry picked from commit e57544e6a284d228548ee555e6e1aff0f0a494e8)
Reviewed-on: http://git-master/r/553650
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agovideo: tegra: nvmap: track vma for all handles
Krishna Reddy [Wed, 4 Jun 2014 21:50:05 +0000 (14:50 -0700)]
video: tegra: nvmap: track vma for all handles

Clean up the code related to mmap and handle nvmap_map_info_caller_ptr
failures graciously.
Initilize h->vmas at right place.
Add sanity checks in nvmap_vma_open/_close.

Bug 1519700

Change-Id: Iede355b8a500a787992fcb23a72cf334a737ec49
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/419168
(cherry picked from commit c18228c5de319d74f68deff9c5d402ca17b64e95)
Reviewed-on: http://git-master/r/553649
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Harry Lin <harlin@nvidia.com>
Tested-by: Harry Lin <harlin@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoarm: tegra: Don't place CSIC/D IOs in DPD mode
Preetham Chandru R [Thu, 12 Jun 2014 09:07:41 +0000 (14:37 +0530)]
arm: tegra: Don't place CSIC/D IOs in DPD mode

According to TRM placing CSIC/D IOs in DPD mode
is no longer available

Bug 200010066

Change-Id: Ic389dba406b06a7c821fa8399ae1854f3ebcac98
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Reviewed-on: http://git-master/r/422677
(cherry picked from commit 6708ac77f5f81ab3eca61c568e8d5a3ad73392f9)
Reviewed-on: http://git-master/r/423755
(cherry picked from commit 3cc39667b932a9ccf3d73f00c1e4ed5583dac4c9)
Reviewed-on: http://git-master/r/553321
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoDNI: ardbeg: rename e1733-a03 to align with main/tnspec
Robert Shih [Fri, 3 Oct 2014 03:30:07 +0000 (11:30 +0800)]
DNI: ardbeg: rename e1733-a03 to align with main/tnspec

bug 1558147

Change-Id: I5308d2c79b23709588999c273b56626fd0f1b4bd
Signed-off-by: Robert Shih <rshih@nvidia.com>
Reviewed-on: http://git-master/r/553142
Reviewed-by: Eric Chuang <echuang@nvidia.com>
Tested-by: Eric Chuang <echuang@nvidia.com>
9 years agoRevert "ARM: tegra: skip USB resume from LP0"
Mitch Luban [Mon, 22 Sep 2014 22:58:37 +0000 (15:58 -0700)]
Revert "ARM: tegra: skip USB resume from LP0"

This reverts commit 55837bf3e100bc3db1e839cfbaf326201991abd3.

Bug 1556894

Change-Id: If0ff720f7f9025ae1ddc914ffee5a66c306e38fa
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/501392
(cherry picked from commit f3c3a8ab24509b08fb7bd432cc5d28710a63069f)
Reviewed-on: http://git-master/r/552306
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Eric Chuang <echuang@nvidia.com>
9 years agoardbeg: Dts rename to align with tnspec/main
Robert Shih [Thu, 2 Oct 2014 05:14:34 +0000 (13:14 +0800)]
ardbeg: Dts rename to align with tnspec/main

bug 1558147

Change-Id: I883890d770804ba3ebd592d2e78910ecb759e3c6
Signed-off-by: Robert Shih <rshih@nvidia.com>
Reviewed-on: http://git-master/r/552794
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agodrivers: video: tegra: vi: implement probe/remove
Arto Merilainen [Wed, 28 May 2014 18:30:45 +0000 (21:30 +0300)]
drivers: video: tegra: vi: implement probe/remove

add probe/remove callback functions for tegra_vi to keep and release
regulator properly.

bug 200003367

Change-Id: I790d7d1822cacd1d8b01913ecedf6d73d83a8786
Signed-off-by: Charlie Huang <chahuang@nvidia.com>
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/416306
Reviewed-on: http://git-master/r/552474
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Eric Chuang <echuang@nvidia.com>
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
9 years agomedia: tegra: nvavp: Add tracing support for nvavp
Somasundaram S [Mon, 1 Sep 2014 12:11:29 +0000 (17:41 +0530)]
media: tegra: nvavp: Add tracing support for nvavp

Add run-time tracing support for NVAVP driver

Bug 200018378

Change-Id: I1e786e52295d387a4d60991aac125aaa097e5950
Signed-off-by: Somasundaram S <somasundaram@nvidia.com>
Reviewed-on: http://git-master/r/494479
(cherry picked from commit a149aa766cf33a0edd798d331d213589b1983f61)
Reviewed-on: http://git-master/r/504669
(cherry picked from commit f2c62cf27fa14a1334727f8f765f3d9afe141ceb)
Reviewed-on: http://git-master/r/540022
Reviewed-by: Eric Chuang <echuang@nvidia.com>
Tested-by: Eric Chuang <echuang@nvidia.com>
9 years agoARM: tegra: correct ispb irq number
Ming Wong [Fri, 1 Aug 2014 17:58:55 +0000 (10:58 -0700)]
ARM: tegra: correct ispb irq number

Bug 1441127

Change-Id: I87fa2957bfc7e40f143f97cc1e1f5d0c6e1c4c12
Signed-off-by: Ming Wong <miwong@nvidia.com>
Reviewed-on: http://git-master/r/450402
(cherry picked from commit 7c20b69da6eb22fa4834dfaa234262f30e55528a)
Reviewed-on: http://git-master/r/542866
(cherry picked from commit 759c996c0b93d5bce76614fa2ee840c56ae2ce80)
Reviewed-on: http://git-master/r/552268
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agomach-tegra: add t12x ispb irq
Ming Wong [Fri, 1 Aug 2014 18:01:14 +0000 (11:01 -0700)]
mach-tegra: add t12x ispb irq

Bug 1441127

Change-Id: I8db457b0a4c0b90ff2192055207f4b50130776c5
Signed-off-by: Ming Wong <miwong@nvidia.com>
Reviewed-on: http://git-master/r/450403
(cherry picked from commit 1c72f4a122e5c64c94d57a08d64f29d21a299084)
Reviewed-on: http://git-master/r/542867
(cherry picked from commit be18918e63afd9958bd465dc8eeb063efdf86571)
Reviewed-on: http://git-master/r/552267
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Schalig <dschalig@nvidia.com>
Tested-by: David Schalig <dschalig@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agostaging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig
Weijie Yang [Fri, 14 Feb 2014 06:03:56 +0000 (14:03 +0800)]
staging: android: lowmemorykiller: set TIF_MEMDIE before send kill sig

Set TIF_MEMDIE tsk_thread flag before send kill signal to the
selected thread. This is to fit a usual code sequence and avoid
potential race issue.

Bug 200031574

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 6bc2b856bb7c49f238914d965c0b1057ec78226e)
Change-Id: Ibdc893be497802dd72bc410492dfa174985b6776
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/497232
(cherry picked from commit becc8ef9ee68c3be7d89b70df80a087d37f6c0b5)
(cherry picked from commit 677d405c088e10df79b5ec67a1a6fc09d4ce8368)
Reviewed-on: http://git-master/r/539293
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agostaging: android: lowmemorykiller: neglect swap cached pages in other_file
Vinayak Menon [Wed, 26 Feb 2014 19:06:22 +0000 (00:36 +0530)]
staging: android: lowmemorykiller: neglect swap cached pages in other_file

With ZRAM enabled it is observed that lowmemory killer
doesn't trigger properly. swap cached pages are
accounted in NR_FILE, and lowmemorykiller considers
this as reclaimable and adds to other_file. But these
pages can't be reclaimed unless lowmemorykiller triggers.
So subtract swap pages from other_file.

Bug 200031574

Signed-off-by: Vinayak Menon <vinayakm.list@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 058dbde928597e7a8bd04e28e77e5cfc4270591d)
Change-Id: Ic268437b65e89496244289adffa8bac80df88c28
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/497231
(cherry picked from commit 1eec4665e479908911713705e384da8a6d5b66b1)
(cherry picked from commit 29ed5bc606765584b30fa7d025c0d49a02a6e7e4)
Reviewed-on: http://git-master/r/539291
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoRevert "lowmemorykiller: zram space available should be accounted"
Sri Krishna chowdary [Wed, 3 Sep 2014 11:25:51 +0000 (16:55 +0530)]
Revert "lowmemorykiller: zram space available should be accounted"

This reverts commit b0a90d9e2cbca96e755f7e385665f1be97fa9a69.

Processes reciding in memory are much faster than processes
in swap. For better user experience in a multiprocessing
environment it is preferable not to allow too many processes
to recide in memory.

So, do not consider swap_free in other_free.

Bug 200031574

Change-Id: I1db3a25d44b55e90fde1e770a6c2ec846c1c6a4e
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/497230
(cherry picked from commit d3fbb2a8f9bdfe9d408a939a39bdb5477fbaee79)
(cherry picked from commit ddc0451a3e8b77799cda71a109821d9416a0f3fa)
Reviewed-on: http://git-master/r/539290
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: configs: tegra: enable cgroups for zram
Sri Krishna chowdary [Mon, 1 Sep 2014 16:23:14 +0000 (21:53 +0530)]
ARM: configs: tegra: enable cgroups for zram

Enable CONFIG_MEMCG and CONFIG_MEMCG_SWAP

Bug 200031574

Change-Id: I99d189866d503bc4dc289f8e50bb68498d16b328
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/497229
(cherry picked from commit 61aa3389106123728075515ae0b770a57881865d)
(cherry picked from commit cd787e9454f356916ed07f87121d4a7e32f8cf16)
Reviewed-on: http://git-master/r/539289
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agomedia: tegra: nvavp: avoid racing in nvavp_uninit
Allen Yu [Wed, 20 Aug 2014 03:39:59 +0000 (11:39 +0800)]
media: tegra: nvavp: avoid racing in nvavp_uninit

nvavp_init() might be called when open_lock is dropped in nvavp_uninit(),
which will mess up the _init/_uninit sequence. To eliminate the racing,
removes the unnecessary cancel_work_sync() and also the _unlock/_lock
around it. It is safe to do so since nvavp_uninit() sets nvavp->pending
to false in nvavp_halt_vde(), and the work handler will do nothing if
nvavp->pending is false.

Bug 200013513

Change-Id: If0a84545815c61388ba351e6cd1cc78bd99f809e
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/482340
(cherry picked from commit f9abd9e6de2092b0b98dbc1f01b17e4d49b61457)
Reviewed-on: http://git-master/r/542553
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agomedia: tegra: nvavp: Fix invalid user pointer dereference
Sri Krishna chowdary [Wed, 17 Sep 2014 08:44:42 +0000 (14:14 +0530)]
media: tegra: nvavp: Fix invalid user pointer dereference

user_hdr pointer should not be dereferenced directly.
Instead, use the hdr pointer to get the address of __user syncpt *.

Bug 200037971

Change-Id: If7922193e3e7551139fda6f163dc9f2140399689
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/499709
(cherry picked from commit 6a2817f5e8e5c371138b647b6a8a96cdce22acb7)
(cherry picked from commit fc2621ea893856bcdd1ccc84e4a4cd298fcdf3a6)
Reviewed-on: http://git-master/r/539295
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoarm: tegra: Improve LP1 Low voltage core
Karthik Ramakrishnan [Tue, 20 Aug 2013 22:39:47 +0000 (15:39 -0700)]
arm: tegra: Improve LP1 Low voltage core

This change adds the LP1 Low Core Voltage feature to all platforms.
Enables the Core voltage to be lowered during voice call(LP1)
state. Also rearranges the sequence during reducing the core voltage.

Bug 1344148

(cherry picked from commit 596a34bc195bc911aa898386f80a273cdcb74048)
Reviewed-on: http://git-master/r/264411
Signed-off-by: Karthik Ramakrishnan <karthikr@nvidia.com>
Change-Id: Ia0c72c83a80f970ec58f5fa754ab9bd69449b65e
Reviewed-on: http://git-master/r/413116
(cherry picked from commit 89cccea416368e73a3b752befd8f90d50a40f213)
Reviewed-on: http://git-master/r/454389
(cherry picked from commit 6df0c7ca50fd9829fd49f9813279c6ea408e9950)
Reviewed-on: http://git-master/r/539955
Reviewed-by: Aaron Huang <aaronh@nvidia.com>
Tested-by: Aaron Huang <aaronh@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoarm: tegra: ardbeg: Lower the SOC Voltage in LP1
Hunk Lin [Wed, 30 Apr 2014 10:10:01 +0000 (18:10 +0800)]
arm: tegra: ardbeg: Lower the SOC Voltage in LP1

Lower the SOC Voltage to 0.95V in LP1 to save power.
VDD_SOC min is 800mV if temperature is above 20C,
and 950mV otherwise.

PMIC ADC is used to sense SOC temperature, with no
support of preselected threshold. Thus 950mV is set
as a safe value.

Bug 200000704
Bug 200001134

Change-Id: Ic0f1b89de347e1cb65e1dbedb0b4c15d363aaf20
Signed-off-by: Hunk Lin <hulin@nvidia.com>
Reviewed-on: http://git-master/r/403568
(cherry picked from commit 9d936f7c52929b6e201ad333b2b2cffff4dfd47d)
Reviewed-on: http://git-master/r/454391
(cherry picked from commit fadbec5910b3e34c2fdd44e3639ca608b13f3080)
Reviewed-on: http://git-master/r/539954
Reviewed-by: Aaron Huang <aaronh@nvidia.com>
Tested-by: Aaron Huang <aaronh@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoarm: tegra: enable t124 TEGRA_LP1_LOW_COREVOLTAGE
Aaron Huang [Thu, 22 May 2014 09:16:47 +0000 (09:16 +0000)]
arm: tegra: enable t124 TEGRA_LP1_LOW_COREVOLTAGE

Enabling the config for T124 to set the SOC voltage in LP1 to a
lower value to save power.

Bug 200000704
Bug 200001134

Change-Id: Ib52476e4a89bc715174490af848cc00a1c4dcada
Signed-off-by: Aaron Huang <aaronh@nvidia.com>
Reviewed-on: http://git-master/r/413108
(cherry picked from commit d5977f8a338e2d8939166355f13c3bcedce2e096)
Reviewed-on: http://git-master/r/454390
(cherry picked from commit 010500e7dcd071755acf3eab80b6996caa862aa3)
Reviewed-on: http://git-master/r/539952
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agobcmdhd: set p2p bw 20MHz if wlan0 is on 20MHz.
Parth Bera [Tue, 2 Sep 2014 07:18:33 +0000 (12:48 +0530)]
bcmdhd: set p2p bw 20MHz if wlan0 is on 20MHz.

Default bw will be 40MHz on 5GHz band.
In 2.4 Ghz default bw will be 20 MHz.

Bug 200025947

Change-Id: I28c33c260e0dd8574ea06009b1e817ae843969fb
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/494605
(cherry picked from commit 7792e05aa097b1f73c8e7b5c5457e55006cba66a)
Reviewed-on: http://git-master/r/497308
(cherry picked from commit b231dcd7f0cff50199462890750c13c1d2c648ae)
Reviewed-on: http://git-master/r/539884
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agotegra-se: Unregister algs support from tegra-se
Amith Ramachandra [Sat, 20 Sep 2014 21:45:12 +0000 (14:45 -0700)]
tegra-se: Unregister algs support from tegra-se

Owing to lower perf, prefer CPU over SE HW for crypto
operations. However, we may still need SE for save/restore
key context across Lp0 so keep the driver to do this.

Change-Id: I16ffaf64400e70615cdb0d4326f5480d172f6be6
Signed-off-by: Amith Ramachandra <aramachan@nvidia.com>
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/501214
(cherry picked from commit 9bc76d18fe31233e6aad5ab9b142725b9d0a3875)
Reviewed-on: http://git-master/r/539875
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: otg: tegra: Notify vbus event in resume to otg wakelock
Rakesh Bodla [Mon, 4 Aug 2014 15:22:22 +0000 (20:52 +0530)]
usb: otg: tegra: Notify vbus event in resume to otg wakelock

When device cable is inserted in LP0, display should
wakeup. For this, uevent should be sent to framework
(sent in power supply extcon driver for charger)
before the system initiates system suspend.
Notifying the VBUS event to otg wakelock in driver resume
will make sure system does not goes back to suspend,
so display wakes up.

Bug 200023041

Change-Id: Ie3957b217ed22e62f9acd4fc887acf0557724da4
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/452932
(cherry picked from commit f8a2d1fc284b2e057e83bdb997fd62d1870e0e75)
(cherry picked from commit 51bbc9aebdaa9c23704cc8d0158e63a505ff49c9)
Reviewed-on: http://git-master/r/539879
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: tegra: skip USB resume from LP0
Suresh Mangipudi [Fri, 13 Jun 2014 05:39:13 +0000 (11:09 +0530)]
ARM: tegra: skip USB resume from LP0

Change to skip USB resume from LP0 when wake source is other than USB

Bug 1410165

Change-Id: I8fd177a128aca837dee8f737a783b59a5925e3c2
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/454002
(cherry picked from commit 6ea5e7c896c547cf23d1e0e8d54ff87503db92f1)
Reviewed-on: http://git-master/r/539882
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: phy: tegra: Increase Y-cable current limit to 1.2A
Rakesh Babu Bodla [Fri, 12 Sep 2014 06:59:16 +0000 (12:29 +0530)]
usb: phy: tegra: Increase Y-cable current limit to 1.2A

Increase the y-cable current limit to 1.2A.

Bug 200004368

Change-Id: Idd533ea7ce27eb4600ba3a3bbb7ea2328d2c83a3
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/498249
(cherry picked from commit 81f5a42d4a6e78a8cd786ce81a32ce622bf215a0)
Reviewed-on: http://git-master/r/538421
(cherry picked from commit 7fabd3371dc466f5e725f8b93f7c411afd1e63ce)
Reviewed-on: http://git-master/r/539284
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: phy: otg: flush_work for the work to finish
Rohith Seelaboyina [Wed, 10 Sep 2014 13:49:30 +0000 (19:19 +0530)]
usb: phy: otg: flush_work for the work to finish

flush_work to wait for the scheduled work to finish
before going to LP0.

Change-Id: Ib26e3c6bec09681b1c2d614bcccbab09fff8547b
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/497867
(cherry picked from commit 24a873a7d6a1838f069c71c8806190b073b2ac77)
(cherry picked from commit 43cf9409a0eb036086c2a388226a502fbeac00e7)
Reviewed-on: http://git-master/r/539275
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: Tegra: TN8: add otg as consumer for usb_bat_chg
Rakesh Babu Bodla [Mon, 1 Sep 2014 15:51:21 +0000 (21:21 +0530)]
ARM: Tegra: TN8: add otg as consumer for usb_bat_chg

Adding otg device to consumer list of usb battery
charging regulator to support Y cable.

Bug 200004368

Change-Id: I99d861f5234a79c2f4ff758aca7750ca8f8de83b
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/494513
(cherry picked from commit 323cee7e9c2b034a8778058d33789cf8340341f4)
Reviewed-on: http://git-master/r/538420
(cherry picked from commit 6670547046ae8500fcfb3c38563364a025063274)
Reviewed-on: http://git-master/r/539282
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoextcon: palmas: remove mutually exclusive property
Rakesh Babu Bodla [Fri, 22 Aug 2014 10:10:52 +0000 (15:40 +0530)]
extcon: palmas: remove mutually exclusive property

When Y-cable is connected both vbus and id status
should be notified. So, removing mutually
exclusive property for vbus and id cables.

Bug 200004368

Change-Id: I61143b05036ce63a28663df4a1487ae29ee28427
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/487660
(cherry picked from commit a705c790d3a5fa87d14e29b2c2e908ab23e52852)
Reviewed-on: http://git-master/r/538418
(cherry picked from commit d87ddb74ff065b9e30b6a2360ff1bd49c5775231)
Reviewed-on: http://git-master/r/539280
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: tegra: increase delay for y-cable detection on tn8
Rakesh Babu Bodla [Mon, 25 Aug 2014 10:26:33 +0000 (15:56 +0530)]
usb: tegra: increase delay for y-cable detection on tn8

On TN8 due to palmas pmic h/w limitation takes more time
to notify the id status. Increasing the delay enables
y-cable detection on TN8. Also, for faster
notification of charging icon reordering the sequence
of charging icon notification and setting current.

Bug 200004368

Change-Id: Ia3940d78e1e87a3483064de3fb8e683be22a348d
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/487661
(cherry picked from commit 5f391f0d892e4cabfc093252873cad75426897a8)
Reviewed-on: http://git-master/r/538419
(cherry picked from commit 5f55a3a44fb47aa5b2c44f5bf9fdbe23638df19e)
Reviewed-on: http://git-master/r/539281
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agopower: bq2419x: change input voltage for entire SOC
Laxman Dewangan [Mon, 8 Sep 2014 13:35:31 +0000 (19:05 +0530)]
power: bq2419x: change input voltage for entire SOC

Provide the input voltage configuration for entire range of SoC
so that value can be set properly as per table on charging/discharging
path.

Change-Id: I25eab5815f19763fd604f07af497d3d3aba08645
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
(cherry picked from commit 0ed9641cbc015cee258ab4136c8768f5671ac4c0)
Reviewed-on: http://git-master/r/497041
(cherry picked from commit 7a7207b9782a03b917f388b81954d40b69aa99d8)
Reviewed-on: http://git-master/r/539883
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agost8:gpio-tegra: add irq_disable() callback fn
wahsu [Tue, 26 Aug 2014 02:57:11 +0000 (10:57 +0800)]
st8:gpio-tegra: add irq_disable() callback fn

Add callback function so tegra gpio interrupt can really be disabled
when irq_disable() invoked.
bug 1545184

Change-Id: I15b9bfcbeefca81d638fa43acdde88ded98c4a03
Signed-off-by: wahsu <wahsu@nvidia.com>
Reviewed-on: http://git-master/r/487966
(cherry picked from commit 33583bb85ffdacebc2827a339c79d2c463cd9dcb)
Reviewed-on: http://git-master/r/539229
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoconfigs: tegra12: Disable usage of HW SE Engine
Shravani Dingari [Mon, 15 Sep 2014 07:26:50 +0000 (12:56 +0530)]
configs: tegra12: Disable usage of HW SE Engine

Do not use HW SE Engine for crypto operations.
As dm-crypt passes 512bytes to SE, using low
data buffer sizes cannot make use of the SE HW
data pipe-lining efficiently. Changing to 4k
bytes is showing good numbers with SE. So,
working with Google to increase buffer size to
4kbytes in dm-crypt is the solution left.

Bug 200021901

Change-Id: I095ed4621ccf832ad90e3210ebe296f712cf802f
Signed-off-by: Shravani Dingari <shravanid@nvidia.com>
Reviewed-on: http://git-master/r/498768
(cherry picked from commit 5d72f884d7050525a9b346346ef3769c57288687)
Reviewed-on: http://git-master/r/500547
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agousb: gadget: f_fs: support superspeed gadgets
JC Kuo [Tue, 21 Jan 2014 13:07:41 +0000 (21:07 +0800)]
usb: gadget: f_fs: support superspeed gadgets

This commit add superspeed gadgets support to f_fs gadget.

Change-Id: I16a540098cfcd157e25b0e81d7cf2533ced2ae39
Signed-off-by: JC Kuo <jckuo@nvidia.com>
Reviewed-on: http://git-master/r/436303
(cherry picked from commit 7b3de28db5d3a14838c8a31eb189bcb8e3fcc513)
Reviewed-on: http://git-master/r/499235
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agovideo: tegra: host: ioctl to set fence name
Deepak Nibade [Tue, 1 Apr 2014 10:53:19 +0000 (16:23 +0530)]
video: tegra: host: ioctl to set fence name

Add ioctl NVHOST_IOCTL_CTRL_SYNC_FENCE_SET_NAME to set
name for a sync fence

Bug 1473041

Change-Id: Iabc1c472f6fddc87dac75d3a37b75a83a834dc1e
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/391271
(cherry picked from commit 44702c84acd2a8d67db29842bfbba5488755ea46)
Reviewed-on: http://git-master/r/498692
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agovideo: tegra: enable NVMAP_FORCE_ZEROED_USER_PAGES
Season Li [Mon, 14 Apr 2014 20:39:43 +0000 (13:39 -0700)]
video: tegra: enable NVMAP_FORCE_ZEROED_USER_PAGES

Enable NVMAP_FORCE_ZEROED_USER_PAGES by default

Bug 1392833
Bug 200032104

Change-Id: I217361c1e3d97e6f5ccc26e5f8e1435f2a261550
Reviewed-on: http://git-master/r/396046
(cherry picked from commit 9c2241675127332508856566138f689094ebcc37)
Signed-off-by: Season Li <seasonl@nvidia.com>
Reviewed-on: http://git-master/r/495829
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agosecurity: tlk_driver: remove legacy IRQ/SS support
Varun Wadekar [Mon, 21 Jul 2014 06:57:43 +0000 (12:27 +0530)]
security: tlk_driver: remove legacy IRQ/SS support

- Delete the legacy IRQ handler registration
- Delete the legacy SS handler registration

Change-Id: I852ed100ebe8257d922645ae53824ba885ab4436
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/440228
(cherry picked from commit ae73170f81c6a90ee62d83ef6cfa61dca0280d2a)
Reviewed-on: http://git-master/r/488999
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk_driver: new ss protocol support
Scott Long [Tue, 8 Jul 2014 18:43:10 +0000 (11:43 -0700)]
security: tlk_driver: new ss protocol support

The new secure storage protocol design allows the tlk daemon
to exchange data directly with the secure storage TA.

The only role the tlk_driver now plays is in the scheduling path
between the tlk daemon and the secure storage TA.

A summary of the corresponding changes:

 * add support for persistent mem buffer parameter type (the
   mapping to these buffers persist for the duration of the
   session); persistent mem buffers are kept on a separate
   shared memory descriptor list and are tracked by session id

 * modified ioctl interface between tlk daemon and tlk_driver to
   involve only a single command; the integer value passed down
   by the tlk daemon indicates whether it is ready for a new
   request or has just completed the last request

 * fixed up various warnings

Note that support for old protocol will be left intact until the
corresponding changes are applied to the TLK components.

Change-Id: Ibcaad4f0e00c8b1f107af5c1e82ea0aa4dd57398
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/435709
(cherry picked from commit 69dd1cf5ba1687fc1f13ecb9b79b1f5a286ec15a)
Reviewed-on: http://git-master/r/488998
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk_driver: Pin user space page(s).
Sharif Inamdar [Tue, 3 Jun 2014 11:09:58 +0000 (16:39 +0530)]
security: tlk_driver: Pin user space page(s).

Pin user space pages based on the type of memory i.e.
read or write.

TE_PARAM_TYPE_MEM_RO or TE_PARAM_TYPE_MEM_RW param
indicates whether the TLK kernel will setup a RO/RW
mapping for the TA to this buffer.

Based on the type of memory we should pin the pages
using get_user_pages() as RO/RW.

Bug 1519770

Change-Id: Ib937433b64602f10cd1114f19845e9f6b4f8bf06
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/418897
(cherry picked from commit a37d707aff592dc868ae554b026191bd9f4951a5)
Reviewed-on: http://git-master/r/488997
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agoRevert "security: tlk_driver: delete te_pin_user_pages() and its usage"
Sharif Inamdar [Tue, 3 Jun 2014 04:48:11 +0000 (10:18 +0530)]
Revert "security: tlk_driver: delete te_pin_user_pages() and its usage"

We are reverting this as we want to add support of
te_pin_user_pages(). TA can have dynamic mappings
created as part of an OpenSession or LaunchOperation
command.

If either of these specify a buffer as an argument
(with virt addr and length as params), the TLK kernel
will create a mapping to it. This happens for things
that go between TAs (no pin issue there) and between
the NS and S worlds.

In the case of NS buffers being passed in, we need
phys memory to stay where it is, because the secure
world has a mapping to it that Linux is unaware of,
which is why we pin it.

Bug 1519770

This reverts commit f4a063081552617e72cbdda5596ae7bd537696f7.

Change-Id: I7676f7786cef469f6cbb39a76a05541b417dc5f7
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/418890
(cherry picked from commit 951a14bd40482c7082c3fa75ebec955c1d444433)
Reviewed-on: http://git-master/r/488996
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk: enable logging only if secure firmware supports it
Varun Wadekar [Wed, 9 Apr 2014 05:34:10 +0000 (11:04 +0530)]
security: tlk: enable logging only if secure firmware supports it

We send an SMC to the secure firmware to see if it supports logging.
If it returns failure, then we disable it from the kernel too.

Change-Id: Icc59fc221f6f59d1806815333f3e71a35a45ea90
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/393217
(cherry picked from commit ae19265e71df6e7aacd157b7d012c8833ee7e060)
Reviewed-on: http://git-master/r/488995
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk_driver: modify secure storage glue
Varun Wadekar [Wed, 23 Apr 2014 05:04:00 +0000 (10:34 +0530)]
security: tlk_driver: modify secure storage glue

The secure world now sends a PREEMPT_BY_FS error code as a result
of OpenSession/LaunchOp call. This indicates a pending FS request
from the secure world which we need to handle and send the
FS_COMPLETION SMC on completion.

Until the secure firmware and the linux driver get in sync, we keep
legacy SS handling alive to avoid incomaptibility issues. Once the
secure firmware switches to the new handling, we would remove the
legacy support from the linux driver as well.

Bug 1500621

Change-Id: I9e84cd5a87d820107b1c2279c9d89dcd5c31b44b
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/375994
(cherry picked from commit 433d8d1687725ab7db23eef27e5a073e8d88e862)
Reviewed-on: http://git-master/r/488950
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agosecurity: tlk: Move program VPR smc to SIP call
Aaron Gamble [Tue, 11 Mar 2014 18:00:55 +0000 (11:00 -0700)]
security: tlk: Move program VPR smc to SIP call

Change-Id: Ibd1dcd64c990b284926a15891902d2364df66c8e
Signed-off-by: Aaron Gamble <jgamble@nvidia.com>
Reviewed-on: http://git-master/r/#/c/380437/
(cherry picked from commit 0f9ce68950035bac649ed44de07c4cbf3e1e43b0)
Reviewed-on: http://git-master/r/488947
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Chris Johnson <cwj@nvidia.com>
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agovideo: tegra: dc: implement vblank event
Michael I. Gold [Mon, 30 Jun 2014 08:42:23 +0000 (01:42 -0700)]
video: tegra: dc: implement vblank event

Implement TEGRA_DC_EXT_EVENT_VBLANK for user space notification of
vblank events.  Implement TEGRA_DC_EXT_SET_VBLANK to enable/disable
vblank notification per display.

bug 200016696

Change-Id: Idf8d02b71976a32e06fe972cfb69b838183bcf02
Signed-off-by: Michael I. Gold <gold@nvidia.com>
Reviewed-on: http://git-master/r/432658
Reviewed-on: http://git-master/r/455981
(cherry picked from commit 2945dc94788a450ba5c9d09ec0ecc5c4fe2f3528)
Reviewed-on: http://git-master/r/488542
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wayne Hsu <wahsu@nvidia.com>
Tested-by: Wayne Hsu <wahsu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoarm: tn8: build sensor as input driver
Steven Kao [Thu, 14 Aug 2014 08:18:39 +0000 (16:18 +0800)]
arm: tn8: build sensor as input driver

Change-Id: I5898735ca290307704f4f51cfdfeab3cb14b8c3d
Reviewed-on: http://git-master/r/456610
(cherry picked from commit 378b097e326453ce21bff2f6ef731572d4227d11)
Signed-off-by: wahsu <wahsu@nvidia.com>
Reviewed-on: http://git-master/r/488583
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Steven Kao <skao@nvidia.com>
Reviewed-by: Steven Kao <skao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoARM: tegra: config: enable camera drivers
Gary Fitzer [Tue, 25 Feb 2014 19:20:48 +0000 (11:20 -0800)]
ARM: tegra: config: enable camera drivers

Enable camera driver support in needed builds

Bug 1441127.
Bug 1440706.

Signed-off-by: Gary Fitzer <gfitzer@nvidia.com>
Reviewed-on: http://git-master/r/374378
(cherry picked from commit e76b0cd0df6b144f1845c34797d757db0d0b3a77)
Change-Id: Ia14175d4c819d1ef22fed8fa48a215ebb21f753f
Signed-off-by: Phoenix Jung <pjung@nvidia.com>
Reviewed-on: http://git-master/r/379875
Reviewed-on: http://git-master/r/456104
(cherry picked from commit 1a65ab6d808620adfdbd51d1168d4b6424dad796)
Reviewed-on: http://git-master/r/488574
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wayne Hsu <wahsu@nvidia.com>
Tested-by: Wayne Hsu <wahsu@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>
9 years agomedia: tegra: nvavp: fix deadlock in nvavp_uninit
Allen Yu [Sat, 9 Aug 2014 07:02:48 +0000 (15:02 +0800)]
media: tegra: nvavp: fix deadlock in nvavp_uninit

nvavp_uninit() should be called with open_lock held. And open_lock
needs to be released before flushing clock_disable_work since the
work handler needs the same lock.

Bug 200013513

Change-Id: I70ddd2e04876e21071a81c5f45fc4a0eb310f840
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/454723
(cherry picked from commit 6b1258194d7cae7b09286744793195f45a1937ab)
Reviewed-on: http://git-master/r/455328
(cherry picked from commit 895aa8fdccaa29951032cc1ca63f6ed22f5c0875)
Reviewed-on: http://git-master/r/457563
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Robert Shih <rshih@nvidia.com>
Tested-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agowatchdog: tegra: enable suspend/resume recovery
Arun Kannan [Tue, 12 Aug 2014 01:48:03 +0000 (18:48 -0700)]
watchdog: tegra: enable suspend/resume recovery

Enable suspend/resume hang recovery using watchdog

Change-Id: If8fd147b2f30db6c73dfef9023843606c4a2ea33
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/455323
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoHACK: enable nvdumper always
Mitch Luban [Mon, 11 Aug 2014 00:28:25 +0000 (17:28 -0700)]
HACK: enable nvdumper always

Change-Id: I90431ace43eea17b9899c91c855f2824bfd8bf58
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/454857
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yifei Wan <ywan@nvidia.com>
9 years agowatchdog: tegra: enable wdt0
Mitch Luban [Sun, 10 Aug 2014 23:15:10 +0000 (16:15 -0700)]
watchdog: tegra: enable wdt0

Enable watchdog in T124
WDT0 is enabled using TMR7 as reference.

Change-Id: Ia0d72aaf851ce7289f5f935dea718dba065eb443
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/454850
Reviewed-by: Arun Kannan <akannan@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: Fix a linker issue
Arun Kannan [Wed, 2 Jul 2014 18:25:09 +0000 (11:25 -0700)]
watchdog: tegra: Fix a linker issue

Fix a linker issue with div and modulo operations
which caused linker to throw an undefined reference to
__aeabi_uldivmod using gcc 4.7.
Fix by typecast to int after division.

Reviewed-on: http://git-master/r/433783
(cherry picked from commit 082010793cfe9f05805162d601daa08362944128)

Change-Id: Iea100e9ae4bc6e53312af66f2abf97b4431346e0
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454849
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: move init to subsys_initcall
Colin Cross [Tue, 13 May 2014 21:50:30 +0000 (14:50 -0700)]
watchdog: tegra: move init to subsys_initcall

Move watchdog to subsys init to allow it to catch issues during
probing later devices.

Reviewed-on: http://git-master/r/433782
(cherry picked from commit fb1ee3a0aba6d06ea2732e804f3a41448731a4bb)

Change-Id: I972a4177445f0050ca50433b3fdaea80e0cf28c3
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454848
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: Add device tree support.
Arve Hjønnevåg [Tue, 6 May 2014 04:41:55 +0000 (21:41 -0700)]
watchdog: tegra: Add device tree support.

Add compatible string.
Compute timer reg from timer regs base addr instead of device id.

Reviewed-on: http://git-master/r/433781
(cherry picked from commit ae30129714b1f9327e5f4b085413800bfbcbb194)

Change-Id: Ida3e00eff28244a1857fe43c479d7baed667c524
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454847
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: fix warnings
Colin Cross [Fri, 25 Apr 2014 00:29:38 +0000 (17:29 -0700)]
watchdog: tegra: fix warnings

Remove an incorrect & in suspend and resume handlers.
Remove MODULE_ALIAS_MISCDEV, its not a misc device any more.

Reviewed-on: http://git-master/r/433780
(cherry picked from commit 530ace346e0262c9381c9b7a45af908ce27509ed)

Change-Id: I622adc5378aa487f087d4ae837e907d7908345f9
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454846
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: rewrite on top of watchdog_core.c
Colin Cross [Tue, 15 Apr 2014 00:21:41 +0000 (17:21 -0700)]
watchdog: tegra: rewrite on top of watchdog_core.c

Get rid of all the miscdevice and ioctl handling, and reuse
what is provided by watchdog_core.c.

Reviewed-on: http://git-master/r/433779
(cherry picked from commit 6c82b3e80bf1df8586474132617f7ea02674b74b)

Change-Id: I682db9bd2e32268ce40d09e0a39495d43ed54b20
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454845
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: remove reboot notifier
Colin Cross [Mon, 14 Apr 2014 22:42:28 +0000 (15:42 -0700)]
watchdog: tegra: remove reboot notifier

We don't want to disable the watchdog on reboot, it will catch
cases where reboot fails.  On power down, tegra_wdt_remove will
be called and will disable the watchdog.

Reviewed-on: http://git-master/r/433778
(cherry picked from commit c857e334d19a74bf100dc4a8e4f99f3666bd6aad)

Change-Id: I7ae61b3193c7689a8201e3b6ff49df7989859fcb
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454844
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: modify enable on probe
Colin Cross [Fri, 18 Apr 2014 00:08:20 +0000 (17:08 -0700)]
watchdog: tegra: modify enable on probe

Enable on probe no longer pets the watchdog from the interrupt, it
still expects userspace to boot and start petting the watchdog
before it barks.

There is now a module parameter, tegra_wdt.enable_on_probe, to
turn on enable_on_probe even if CONFIG_TEGRA_WATCHDOG_ENABLE_ON_PROBE
is not set.

Reviewed-on: http://git-master/r/433777
(cherry picked from commit 429a1693b24daf58059bca9bc7dbc99a31d39c24)

Change-Id: I7e19a6e780eaa81788aacef72ec30e3692d8451c
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454843
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agowatchdog: tegra: Add support back for tegra 12x
Colin Cross [Mon, 14 Apr 2014 22:25:24 +0000 (15:25 -0700)]
watchdog: tegra: Add support back for tegra 12x

Commit 459d61d7fc74baf77408f892a2e14f5457d1a04a
("arm: tegra: support for FIQ debugger with secure OS"), now
reverted, also added support for CONFIG_ARCH_TEGRA_12x_SOC.
Put the required #ifdef change back.

Reviewed-on: http://git-master/r/433776
(cherry picked from commit cb0c263767f610eaf0acfcb5c625b9c3b5f3811e)

Change-Id: I7225a5df5140cc79a1d120301c1b421dafffe994
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454842
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: Add support for FIQ debugger"
Colin Cross [Mon, 14 Apr 2014 22:14:20 +0000 (15:14 -0700)]
Revert "watchdog: tegra: Add support for FIQ debugger"

This reverts commit cef3ced89dcd2f00532a5e7b023aeaacfd716f56.

"FIQ debugger support" is a hack that disables the real uses of
the FIQ debugger.

Reviewed-on: http://git-master/r/433775
(cherry picked from commit a96ce5e48bd7e71f323c054a5d5181c11ab0f20d)

Change-Id: Ia081e5a02980f1e38b66e78471903ba94d95722e
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454841
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: enable compile warning as error"
Colin Cross [Mon, 14 Apr 2014 22:14:15 +0000 (15:14 -0700)]
Revert "watchdog: tegra: enable compile warning as error"

This reverts commit e18b7c37710cb0538678e1005fb2b7d1aa3db324.

-Werror often breaks when switching compilers, and this code isn't
even warning-clean under all configurations.

Reviewed-on: http://git-master/r/433774
(cherry picked from commit df81517bdcfedaba2c4331ce139729e780a14010)

Change-Id: I4592bbca16e2b212f29efa5d93349f4fa882af03
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454840
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: fix reboot reason"
Colin Cross [Mon, 14 Apr 2014 22:14:00 +0000 (15:14 -0700)]
Revert "watchdog: tegra: fix reboot reason"

This reverts commit eeb81888c41ebce8f6822fd241934e582c13a773.

The reset reason is already avaiable through other sources,
no reason for the watchdog device to print it.

Reviewed-on: http://git-master/r/433773
(cherry picked from commit 50eb2ae7b0c66458259d4c21f382d6dc6814dab9)

Change-Id: I160d7035ace88cb65f59bfb8b45aab8674901469
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454839
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra: Only support one wdt device"
Colin Cross [Mon, 14 Apr 2014 22:13:51 +0000 (15:13 -0700)]
Revert "watchdog: tegra: Only support one wdt device"

This reverts commit b44525f85fedebb6f7a8f89a8690a51163180391.

There is no reason to restrict to a single wdt device any more.

Reviewed-on: http://git-master/r/433772
(cherry picked from commit e3ffe9d51cde76fbd1f37ec08dedb0928b59a03e)

Change-Id: I8df85c956cabd963d42b8d3bc42627c15b718511
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454838
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "arm: tegra: support for FIQ debugger with secure OS"
Colin Cross [Mon, 14 Apr 2014 22:06:08 +0000 (15:06 -0700)]
Revert "arm: tegra: support for FIQ debugger with secure OS"

This reverts commit 459d61d7fc74baf77408f892a2e14f5457d1a04a.

The reverted patch hacks stacktraces on watchdog resets into the
fiq debugger, making the fiq debugger useless for anything else.

Reviewed-on: http://git-master/r/433771
(cherry picked from commit 8cbdc2172a4a05ad5970a152f446bf9308be4321)

Change-Id: I54a5e053fa1f56cf275b9b93bf3d6379acb8c014
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454837
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit

9 years agoRevert "watchdog: tegra_wdt: trigger FIQ if any CPU hangs"
Colin Cross [Mon, 14 Apr 2014 22:01:00 +0000 (15:01 -0700)]
Revert "watchdog: tegra_wdt: trigger FIQ if any CPU hangs"

This reverts commit 61c80149c7ade9564245bfb4e7f3151119b2bc8f.

Dependency for a later revert.

Reviewed-on: http://git-master/r/433770
(cherry picked from commit af13424775faa411548217a46ec5464668972015)

Change-Id: I2182ac2cde66541088983adb532a1bbfa057b394
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Arun Kannan <akannan@nvidia.com>
Reviewed-on: http://git-master/r/454836
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
GVS: Gerrit_Virtual_Submit