]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/log
sojka/nv-tegra/linux-3.10.git
9 years agonet: wireless: bcmdhd: Fix PM struck at 0 on AGO origin/rel-st8-l-r1-shieldtablet8 daily-2014.11.28.0_rel-st8-l-r1-partner-shieldtablet8
Shital Jaju [Tue, 18 Nov 2014 10:40:48 +0000 (16:10 +0530)]
net: wireless: bcmdhd: Fix PM struck at 0 on AGO

Issue: wlan0 interface power save got disable and
not restored on AGO create and delete within 10sec.

Reason: On AGO creation PM of wlan0 and AGO is disabled
for 10sec to renew the DHCP and this is not restored
properly on AGO remove case.

Solution: Restore the wlan0 power save on AGO delete.

Bug 200016171

Change-Id: I4b255ed5326a01fbd52e6d745e6bec6824279b55
(cherry picked from commit d72e363c0f260d2a2a66cf0f5f56516b855b3b91)
(cherry picked from commit f076ee07bfcffddff699d9b5a639351811dc7b45)
(cherry picked from commit 6940491929ad67170b861dab3a338b7d220cef22)
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: http://git-master/r/604752
(cherry picked from commit a71a6c0e827e18c41de34b3bbbd1546d7efdb44f)
Reviewed-on: http://git-master/r/605032
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agovideo: tegra: nvmap: Use new page pool funcs
Alex Waterman [Mon, 2 Dec 2013 21:42:26 +0000 (13:42 -0800)]
video: tegra: nvmap: Use new page pool funcs

Use the new page pool functions that allow large numbers of
pages to be alloced and filled at one time.

Also, fix wrong function declarations for the locked fill and
alloc funcs.

Bug 1371433
Bug t1392833
Bug 1561572

Change-Id: I795dfe9c44f84c02dbbb26a000ac3179d6355ad5
Reviewed-on: http://git-master/r/337532
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: http://git-master/r/601341
(cherry picked from commit 11d018876cedce4b993c06ca3cd95de1606e535d)
Reviewed-on: http://git-master/r/601419
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agovideo: tegra: nvmap: Move pool lock functions
Alex Waterman [Mon, 2 Dec 2013 19:07:38 +0000 (11:07 -0800)]
video: tegra: nvmap: Move pool lock functions

Move the pool lock/unlock functions to the nvmap private
header file.

Bug 1371433
Bug 1392833
Bug 1561572

Change-Id: Iea9e5aee852fc09b1db60b49db69c4471257b2fc
Reviewed-on: http://git-master/r/337531
Signed-off-by: Jon McCaffrey <jmccaffrey@nvidia.com>
Reviewed-on: http://git-master/r/601340
(cherry picked from commit 03a39add2cc7c4b679e63b2e5087fb5a6a68edf1)
Reviewed-on: http://git-master/r/601414
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoRevert "Revert "dc: tegra: disable prism at low brightness""
Robert Shih [Thu, 6 Nov 2014 05:08:11 +0000 (13:08 +0800)]
Revert "Revert "dc: tegra: disable prism at low brightness""

This reverts commit 313c1675fe3c2cadef882d84590ab0bf82c4ca8b.

bug 1536020

Change-Id: I0f4d1b4f92ed95155dd90a0970511a3fd7afc470
Signed-off-by: Robert Shih <rshih@nvidia.com>
Reviewed-on: http://git-master/r/594717
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arun Swain <arswain@nvidia.com>
Tested-by: Arun Swain <arswain@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agodc: tegra: enable/disble prism conditionally
Arun Swain [Wed, 5 Nov 2014 19:01:23 +0000 (11:01 -0800)]
dc: tegra: enable/disble prism conditionally

Enable/disbale prism depending on the brightmess
value but only if it is enabled from user space.
Otherwise it will affect test cases which require
prism to be off.

Bug 1536020

Change-Id: I1f033831392cbbf48f4067f9b14832728ea8174d
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/594473
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoarm: tegra: tn8: increase vblank time
Arun Swain [Wed, 5 Nov 2014 03:11:10 +0000 (19:11 -0800)]
arm: tegra: tn8:  increase vblank time

Increase vblank lines to spool up enough for all
windows in order to prevent underfows in 180
degrees rotated mode.

Bug 200038740

Change-Id: If23ae3f3481479909556dbc696cf39727d1e6e9a
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/593560
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agosecurity: tlk_driver: lock/fault userspace pages
Mahesh Lagadapati [Fri, 31 Oct 2014 03:36:17 +0000 (20:36 -0700)]
security: tlk_driver: lock/fault userspace pages

When AF bit is zero for an user space buffer, access faults are observed
during address translation in the secure world.

Lock userspace buffers using sys_mlock to ensure that AF bit is not
cleared once they are passed to the secure world. Also invoke
fixup_user_fault API to set AF bit to 1 to handle the case when AF bit
is zero even before calling sys_mlock.

Bug 1566742

Change-Id: If1a70f7e9d8fb0e1d03a837d277e068c8ce22042
Signed-off-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-on: http://git-master/r/591946
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Chris Johnson <cwj@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoRevert "dc: tegra: disable prism at low brightness"
Robert Shih [Tue, 4 Nov 2014 05:36:31 +0000 (13:36 +0800)]
Revert "dc: tegra: disable prism at low brightness"

Break ap_graphics_submit due to override didim setting

This reverts commit 067b3da66f78315afadda282da10c19d846f14ef.

bug 1536020

Change-Id: I3377ccab16bbb808599e440199a76aba1a48bc01
Signed-off-by: Robert Shih <rshih@nvidia.com>
Reviewed-on: http://git-master/r/593085
Reviewed-by: Alka Mohite <amohite@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
9 years agodc: tegra: disable prism at low brightness
Arun Swain [Sun, 2 Nov 2014 22:30:38 +0000 (14:30 -0800)]
dc: tegra: disable prism at low brightness

Enable/disbale prism depending on the brightmess
value.

Bug 1536020

Change-Id: Idcd8f56f7d256a928f1c6e1988685cc37d20bb85
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/592380
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agodc: tegra: disable prism at low brightness
Arun Swain [Sun, 2 Nov 2014 22:22:53 +0000 (14:22 -0800)]
dc: tegra: disable prism at low brightness

Enable/disbale prism depending on the brightmess
value.

Bug 1536020

Change-Id: I73b8b0a5b3d014f63d3f28dce71e3ede8791c086
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/592379
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoarm: configs: tegra12: Set recommended andriod configs
Prafull Suryawanshi [Fri, 31 Oct 2014 13:04:11 +0000 (18:34 +0530)]
arm: configs: tegra12: Set recommended andriod configs

bug 200051123

Change-Id: Ibf510a0ef3d585535becc4b6a035a8bb35f7fc2b
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/592115
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agotegra: dc: enable emc.la clock before setting
Arun Swain [Tue, 28 Oct 2014 21:42:22 +0000 (14:42 -0700)]
tegra: dc: enable emc.la clock before setting

For the emc.la floor to have effect, enable the
emc.la clock if not enabled already.

Bug 200048302

Change-Id: I616e640ed7eec854b71fb26da60037311d9b4247
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/590924
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Chao Xu <cxu@nvidia.com>
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: tegra12: config: enable SECCOMP
Gagan Grover [Thu, 30 Oct 2014 05:50:55 +0000 (11:20 +0530)]
ARM: tegra12: config: enable SECCOMP

This is enabled for Android defconfig file as it is required by CTS
test to pass.

Bug 200046046

Change-Id: Ie1f02469471c3c2602a28a561b5c25f9423899a2
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/591533
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
9 years agogk20a: Moved bind fecs to init_gr_support
Mahantesh Kumbar [Tue, 14 Oct 2014 12:14:34 +0000 (17:44 +0530)]
gk20a: Moved bind fecs to init_gr_support

-Moved bind fecs from work queue to init_gr_support.
-It makes all CPU->FECS communication to happen before
booting PMU, and after we boot PMU, only PMU talks to
FECS. So it removes possibility to race between CPU
and PMU talking to FECS.

Bug 200032923

Change-Id: I01d6d7f61f5e3c0e788d9d77fcabe5a91fe86c84
Reviewed-on: http://git-master/r/559733
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/590405
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agovideo: tegra12: dc: fix clk_round_rate error
Arun Swain [Mon, 27 Oct 2014 21:26:32 +0000 (14:26 -0700)]
video: tegra12: dc: fix clk_round_rate error

In order to get the next emc frequency add 1 Mhz
instead of 1 to the current emc frequency.

Bug 200048302

Change-Id: I9249a472874eafd94c3d5bb99a5073b16a56f665
Signed-off-by: Arun Swain <arswain@nvidia.com>
Reviewed-on: http://git-master/r/590519
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Adeel Raza <araza@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Chao Xu <cxu@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agobcmdhd:fix kernel panic due to early free of ndev
Bibhay Ranjan [Fri, 24 Oct 2014 21:08:01 +0000 (14:08 -0700)]
bcmdhd:fix kernel panic due to early free of ndev

because of http://git-master/r/555458, net_device
structure was moved to some other context, which
eventually was doing free_netdev and an early
release of memory which resulted in kernel panic.

moving free_netdev back to it original context.

However, free_netdev has to be synchronized with
thread wl_event_handler as per Bug 200040067. So,
this syncronization has to be done by semaphore
netif_sem using a writers lock.

This ensures Bug 200040067 also remains fixed

Bug 200040067
Bug 200048503

Change-Id: Ie2c664dc747cac4fba49c5edfe7a818d1bcae7ca
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/562973
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agomedia: tegra: nvavp: fix AVP status after LP0
Prashant Gaikwad [Sat, 25 Oct 2014 02:36:01 +0000 (08:06 +0530)]
media: tegra: nvavp: fix AVP status after LP0

Halt AVP after SC7 exit. Runtime PM will take care of
enabling it whenever required.

Bug 200043848

Change-Id: I657479db74e1f0809357226ce343b6fe1f23c0f0
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/590364
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Wen Yi <wyi@nvidia.com>
Tested-by: Wen Yi <wyi@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agonet:wireless:bcmdhd: Don't enable Mon mode for p2p
Manish Bansal [Tue, 28 Oct 2014 11:55:31 +0000 (17:25 +0530)]
net:wireless:bcmdhd: Don't enable Mon mode for p2p

P2P CERT 6.1.9 test case is failing becasue monitor mode
is creating an issue in registering Action frame for P2P-GO in
firmware, this was leading an error in receiving action frames
to GO interface. Not enabling it for P2P in driver though
DUT does not support the mode.

Bug 200049414

Change-Id: I296f0c9d799d6978e946399ccc1f0da1b6d31d8d
Signed-off-by: Raghavender <kraghavender@nvidia.com>
Reviewed-on: http://git-master/r/590780
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agovideo: tegra: host: pod: increase average window
Jihoon Bang [Fri, 24 Oct 2014 16:14:40 +0000 (09:14 -0700)]
video: tegra: host: pod: increase average window

Increase running average window so that frequency doesn't
fluctuate much given instantaneous load.

Bug 1568795

Change-Id: I7483be2653671a18ecad68614c60bffc869fdf2d
Signed-off-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-on: http://git-master/r/590462
Reviewed-by: Ruchit Sharma <ruchits@nvidia.com>
Tested-by: Ruchit Sharma <ruchits@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Schalig <dschalig@nvidia.com>
Tested-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Eric Chuang <echuang@nvidia.com>
9 years agonohz: stat: Fix decreasing idle/iowait times
Sai Gurrappadi [Wed, 4 Jun 2014 00:46:23 +0000 (17:46 -0700)]
nohz: stat: Fix decreasing idle/iowait times

Always read nohz idle/iowait counters if nohz is enabled even if the cpu
is offline. This prevents a decreasing counter if a reader reads
/proc/stat before and after a cpu is offlined. Currently /proc/stat
switches between using the nohz counters and the sched-tick counters
both of which are updated independently and could therefore be out of
sync.

Commit "7386cdb nohz: Fix idle ticks in cpu summary line of /proc/stat"
introduced the check to fall back onto using the sched-tick counters
because the nohz counters updated incorrectly when a cpu was offlined.
However, commit "4b0c0f2 tick: Cleanup NOHZ per cpu data on cpu down"
properly fixes the issue by clearing nohz state on cpu-down thereby
preventing faulty nohz counter updates. So we can now safely remove the
cpu_online() checks introduced by 7386cdb.

Bug 200007081
Bug 1512875

Change-Id: I7182f2cc9f36e2019c72522f76cac44a59e8b913
Reviewed-on: http://git-master/r/384495
(cherry picked from commit e08c1abfbe4d7c140185fc3483eabb6645adfa58)
Signed-off-by: Gaurav Singh <gauravsingh@nvidia.com>
Reviewed-on: http://git-master/r/558218
Reviewed-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoAdd missing default route changes
Harshavardhan Nalajala [Fri, 24 Oct 2014 00:00:31 +0000 (17:00 -0700)]
Add missing default route changes

Default route changes were missing as part of
dbed723911c6ce4c1b9b3d3b8a9ac7ed681b646a. So,
ipv6 global address acquisition fails most of times.
Adding the missing default route changes resolved the issue.

Bug 1568030

Change-Id: Ida443281757e6feb3c35e1a7744cba6465e23bb9
Signed-off-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Reviewed-on: http://git-master/r/562657
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoARM: tegra:increase input current limit to 3A
Venkat Reddy Talla [Fri, 8 Aug 2014 17:03:20 +0000 (22:33 +0530)]
ARM: tegra:increase input current limit to 3A

to increase typical hardware current limit from 1.8A to 2.0A,
setting input current limit to 3A through BQ register.

Bug 1540302

Change-Id: I2b6302935bb46dceb888158ab62fce04fa0360bc
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/542726
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agoWAR - skipping CMU update once during booting
Robert Shih [Tue, 5 Aug 2014 09:47:42 +0000 (17:47 +0800)]
WAR - skipping CMU update once during booting

Skip and stick to what BL set during boot

bug 200021304

Change-Id: I98e44ac3278641f9ba2c250f774400cb386bf4ae
Signed-off-by: Robert Shih <rshih@nvidia.com>
Reviewed-on: http://git-master/r/559347
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Eric Chuang <echuang@nvidia.com>
9 years agovideo: tegra: dc: Add TEGRA_DC_EXT_SET_CMU_ALIGNED
Daniel Solomon [Mon, 28 Jul 2014 21:14:01 +0000 (14:14 -0700)]
video: tegra: dc: Add TEGRA_DC_EXT_SET_CMU_ALIGNED

This ioctl is intended to be used for the purpose
of changing the panel gamma and saturation  while the
panel is on, without the visual artefacts that would
result from disabling CMU during the update, and while
minimizing risk of CPU/DC CMU access collisions.

The ioctl TEGRA_DC_EXT_SET_CMU_ALIGNED updates only
the entries in CMU CSC and LUT2 that have changed since
the last CMU update, keeps CMU enabled while doing
so, and aligns the update with the next FRAME_END_INT.

Bug 1535044

Change-Id: Ibe758f94eccfff72c85e299107b3053378127805
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/556485
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agodma: coherent: fix VPR dma allocation path
Vandana Salve [Mon, 20 Oct 2014 16:32:20 +0000 (22:02 +0530)]
dma: coherent: fix VPR dma allocation path

Fixed VPR allocation path by passing DMA_MEMORY_EXCLUSIVE
which will only allocate memory from the VPR region.
Do not allow dma_alloc_coherent() to fall back to
system memory when it's out of memory in the VPR region

bug 1560078
bug 1567143

Change-Id: I0752b3a8cd4d97f93fe54f08b1e9a1963d3410b9
Signed-off-by: Vandana Salve <vsalve@nvidia.com>
Reviewed-on: http://git-master/r/559471
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
9 years agovideo: tegra: dc: Keep shadow syncpt vals in sync.
Michael Frydrych [Thu, 10 Jul 2014 11:13:07 +0000 (14:13 +0300)]
video: tegra: dc: Keep shadow syncpt vals in sync.

dc keeps its own shadow copy of max syncpt value stored
by nvhost. Both copies must be kept in sync, otherwise
dc may advance a syncpt beyond the value which it will
return for subsequent flip.

Theoretically, only one copy of the syncpt needs to be
maintained. This fix adds a mantanance of the second copy
rather then removing one copy altogether to stay consistent
with original code.

bug 200015374

Change-Id: I03b1aa4bfe6d972e6b0a36c18cbacef9c56b4ebb
Signed-off-by: Michael Frydrych <mfrydrych@nvidia.com>
Reviewed-on: http://git-master/r/436618
(cherry picked from commit bc061221aef9da4d278aed576c58a53d00682881)
Reviewed-on: http://git-master/r/437142
(cherry picked from commit 75e2f542dd02cb0f1112b6d89ccb10bf466d7f51)
Reviewed-on: http://git-master/r/559883
Reviewed-by: Francis Hart <fhart@nvidia.com>
Tested-by: Francis Hart <fhart@nvidia.com>
Reviewed-by: Eric Chuang <echuang@nvidia.com>
9 years agopower: bq2419x:donot enable charging when OTG cable connected
Venkat Reddy Talla [Mon, 13 Oct 2014 09:55:37 +0000 (15:25 +0530)]
power: bq2419x:donot enable charging when OTG cable connected

donot enable charging when OTG cable connected to device
while device entering into suspend mode.

Bug 200044210

Change-Id: Ia9173a1f04fa86cf6da8f0432f4efba8369415d4
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/556242
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agoextcon: palmas:disable vbus irq at device suspend
Venkat Reddy Talla [Sat, 11 Oct 2014 17:51:07 +0000 (23:21 +0530)]
extcon: palmas:disable vbus irq at device suspend

disable vbus irq at device suspend if OTG cable connected
and re-enable vbus irq while device resume.
set extcon usb state to false if VBUS state is disconnect
in resume.

Bug 200044210

Change-Id: I5742e2fab709779aea4fa8edf3f26ba063673a9a
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/555724
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
9 years agommc: sdhci: check remaining len when creating ADMA descriptor
Frank Shi [Tue, 10 Jun 2014 09:14:14 +0000 (17:14 +0800)]
mmc: sdhci: check remaining len when creating ADMA descriptor

If len < 4, the extra transfer for alignment can do all job.
No need to creating another descriptor for aligned transfer.

Bug 200007889
Bug 1559166

Reviewed-on: http://git-master/r/421562
(cherry picked from commit 934db2fba344e1977c434ee91a89e3c25908d367)
Change-Id: I0a3a001600e6f752961955adebb43f688dede412
Signed-off-by: Frank Shi <fshi@nvidia.com>
Reviewed-on: http://git-master/r/557234
Reviewed-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Tested-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
9 years agommc: tegra: disable card clk before setting tap
Naveen Kumar Arepalli [Wed, 15 Oct 2014 05:35:38 +0000 (11:05 +0530)]
mmc: tegra: disable card clk before setting tap

-disable card clk.
-update the tap value.
-enable card clk.

Bug 1559166

Change-Id: I4b0586535248b36cfa1522e1c69c45282f1f903f
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/557203
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
9 years agonet: ipv6: autoconf routes into per-device tables
Lorenzo Colitti [Wed, 26 Mar 2014 10:35:41 +0000 (19:35 +0900)]
net: ipv6: autoconf routes into per-device tables

Currently, IPv6 router discovery always puts routes into
RT6_TABLE_MAIN. This causes problems for connection managers
that want to support multiple simultaneous network connections
and want control over which one is used by default (e.g., wifi
and wired).

To work around this connection managers typically take the routes
they prefer and copy them to static routes with low metrics in
the main table. This puts the burden on the connection manager
to watch netlink to see if the routes have changed, delete the
routes when their lifetime expires, etc.

Instead, this patch adds a per-interface sysctl to have the
kernel put autoconf routes into different tables. This allows
each interface to have its own autoconf table, and choosing the
default interface (or using different interfaces at the same
time for different types of traffic) can be done using
appropriate ip rules.

The sysctl behaves as follows:

- = 0: default. Put routes into RT6_TABLE_MAIN as before.
- > 0: manual. Put routes into the specified table.
- < 0: automatic. Add the absolute value of the sysctl to the
       device's ifindex, and use that table.

The automatic mode is most useful in conjunction with
net.ipv6.conf.default.accept_ra_rt_table. A connection manager
or distribution could set it to, say, -100 on boot, and
thereafter just use IP rules.

Change-Id: I82d16e3737d9cdfa6489e649e247894d0d60cbb1
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
(cherry picked from commit a03f539b1636dd97e7f4f78da08b5e2e02e6cb6d)
Reviewed-on: http://git-master/r/558593
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Tested-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agonet: support marking accepting TCP sockets
Lorenzo Colitti [Wed, 26 Mar 2014 04:03:12 +0000 (13:03 +0900)]
net: support marking accepting TCP sockets

When using mark-based routing, sockets returned from accept()
may need to be marked differently depending on the incoming
connection request.

This is the case, for example, if different socket marks identify
different networks: a listening socket may want to accept
connections from all networks, but each connection should be
marked with the network that the request came in on, so that
subsequent packets are sent on the correct network.

This patch adds a sysctl to mark TCP sockets based on the fwmark
of the incoming SYN packet. If enabled, and an unmarked socket
receives a SYN, then the SYN packet's fwmark is written to the
connection's inet_request_sock, and later written back to the
accepted socket when the connection is established.  If the
socket already has a nonzero mark, then the behaviour is the same
as it is today, i.e., the listening socket's fwmark is used.

Black-box tested using user-mode linux:

- IPv4/IPv6 SYN+ACK, FIN, etc. packets are routed based on the
  mark of the incoming SYN packet.
- The socket returned by accept() is marked with the mark of the
  incoming SYN packet.
- Tested with syncookies=1 and syncookies=2.

Change-Id: I26bc1eceefd2c588d73b921865ab70e4645ade57
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
(cherry picked from commit 6ba3a0e3b112bdb47858e97aa763706ba26ca5ea)
Reviewed-on: http://git-master/r/558590
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Tested-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agonet: add a sysctl to reflect the fwmark on replies
Lorenzo Colitti [Tue, 18 Mar 2014 11:52:27 +0000 (20:52 +0900)]
net: add a sysctl to reflect the fwmark on replies

Kernel-originated IP packets that have no user socket associated
with them (e.g., ICMP errors and echo replies, TCP RSTs, etc.)
are emitted with a mark of zero. Add a sysctl to make them have
the same mark as the packet they are replying to.

This allows an administrator that wishes to do so to use
mark-based routing, firewalling, etc. for these replies by
marking the original packets inbound.

Tested using user-mode linux:
 - ICMP/ICMPv6 echo replies and errors.
 - TCP RST packets (IPv4 and IPv6).

Change-Id: I6873d973196797bcf32e2e91976df647c7e8b85a
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
(cherry picked from commit 5a87fa6a43733e241406e8d62fe28fdc0735bf93)
Reviewed-on: http://git-master/r/558581
GVS: Gerrit_Virtual_Submit
Reviewed-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Tested-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agonet: wireless: bcmdhd: enable TDLS
Om Prakash Singh [Mon, 13 Oct 2014 06:19:06 +0000 (11:49 +0530)]
net: wireless: bcmdhd: enable TDLS

Bug 1533863

Change-Id: I1c7b6f5c917430bb26fca10ef63104868599a996
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/555860
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
Tested-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agousb: Add support for rndis uplink aggregation
xerox_lin [Thu, 14 Aug 2014 06:48:44 +0000 (14:48 +0800)]
usb: Add support for rndis uplink aggregation

RNDIS protocol supports data aggregation on uplink and can help
reduce mips by reducing number of interrupts on device. Throughput
also improved by 20-30%. Aggregation is disabled by setting
aggregation packet size to 1. To help better UL throughput, set
as ul aggregation support to 3 rndis packets by default. It can be
configured via module parameter: rndis_ul_max_pkt_per_xfer.

Bug 1445536

Change-Id: I0b62a21a5c3ceb6b04933d0d6da33301dbafe493
Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
Signed-off-by: Xerox Lin <xerox_lin@htc.com>
(cherry picked from commit a327898fa354ae18e9fe07d3e203304f4ef5c0d2)
Reviewed-on: http://git-master/r/554491
Reviewed-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Tested-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
9 years agofutex-prevent-requeue-pi-on-same-futex.patch
Gagan Grover [Thu, 16 Oct 2014 07:25:15 +0000 (12:55 +0530)]
futex-prevent-requeue-pi-on-same-futex.patch

futex: Forbid uaddr == uaddr2 in futex_requeue(..., requeue_pi=1)
If uaddr == uaddr2, then we have broken the rule of only requeueing
froma non-pi futex to a pi futex with this call.  If we attempt this,
then dangling pointers may be left for rt_waiter resulting in an
exploitable condition.

This change brings futex_requeue() in line with
futex_wait_requeue_pi() which performs the same check as per
commit 6f7b0a2a5c0f
("futex: Forbid uaddr == uaddr2 in futex_wait_requeue_pi()")

[ tglx: Compare the resulting keys as well, as uaddrs might be
   different depending on the mapping ]

Fixes CVE-2014-3153.

Reported-by: Pinkie Pie
Signed-off-by: Will Drewry <wad@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: I47c30a493a2e750ce0a91a8606f602c15f381415
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: http://git-master/r/558301
Reviewed-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Gaurav Singh <gauravsingh@nvidia.com>
9 years agoinput: touchscreen: raydium: update to 66.9
Jordan Nien [Wed, 8 Oct 2014 09:10:41 +0000 (17:10 +0800)]
input: touchscreen: raydium: update to 66.9

66.9 Change list:
[1]. base on firmware 66.7.
[2]. Fixed Line broken with palm
[3]. Keep the original setting of event report mode after
     suspend/resume.
[4]. System Suspend / Resume with palm, will not enter the Auto Scan.
[5]. Fix Touch reported speed is not matching the actual speed in some
     particular area which is 3 to 5mm away from edge [6]. Fix deadlock between rm_tch_cmd_process and rm_timer_work_handler
     during lp0.
[6]. add solution for rm_ts_server issues with SELinux domain.

Bug 1525056
Bug 1541410

Change-Id: I160dc2a8ecfccf58f9672d09afdfffffd12989fc
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/554547
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
Tested-by: Todd Poynter <tpoynter@nvidia.com>
9 years agodrivers: input: Boost CPU & GPU
Arun Gona [Wed, 15 Oct 2014 18:55:45 +0000 (11:55 -0700)]
drivers: input: Boost CPU & GPU

Increaing the CPU & GPU boost values as recommended
in the Tablet shiproom meeting

bug 200040953

Change-Id: I171e3301acd10ac207d180f2a09d76ed5c45c859
Signed-off-by: Arun Gona <agona@nvidia.com>
Reviewed-on: http://git-master/r/558054
Reviewed-by: Donghan Ryu <dryu@nvidia.com>
Tested-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-by: Todd Poynter <tpoynter@nvidia.com>
9 years agoCeres: usb: usb gadget driver
Phil Luo [Mon, 17 Mar 2014 08:15:20 +0000 (16:15 +0800)]
Ceres: usb: usb gadget driver

fix a kernel panic when removing usb cable

Bug 1437976
Bug 200040945

Change-Id: Ie9f947c1a829f5b5bc44127d4856d408f97f8057
Signed-off-by: Phil Luo <phluo@nvidia.com>
Reviewed-on: http://git-master/r/382446
Signed-off-by: Gaurav Singh <gauravsingh@nvidia.com>
Reviewed-on: http://git-master/r/556799
Reviewed-by: Rick Song <ricks@nvidia.com>
Reviewed-by: Robert Shih <rshih@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoinput: touchscreen: raydium: Disable slowscan
Jordan Nien [Thu, 16 Oct 2014 05:48:21 +0000 (13:48 +0800)]
input: touchscreen: raydium: Disable slowscan

- 'slowscan' mode is not supported on ST8.

Bug 200045928

Change-Id: I527b2cb618bb4d63c14c0e5b9f1c74f91a82749f
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/558236
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Alex Chen <alchen@nvidia.com>
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Vincent Chen <zochen@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
9 years agoARM: tegra12: defconfig: disable TEGRA_NVDUMPER
Prafull Suryawanshi [Thu, 16 Oct 2014 05:50:44 +0000 (11:20 +0530)]
ARM: tegra12: defconfig: disable TEGRA_NVDUMPER

bug 200043978

Change-Id: I8dd365a3274d3edb1c343b7071db302d795445c0
Signed-off-by: Prafull Suryawanshi <prafulls@nvidia.com>
Reviewed-on: http://git-master/r/558237
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>
9 years agovideo: tegra: nvmap: remove support for Deprecated GET_ID/FROM_ID ioctl's
Maneet Singh [Fri, 12 Sep 2014 03:12:33 +0000 (20:12 -0700)]
video: tegra: nvmap: remove support for Deprecated GET_ID/FROM_ID ioctl's

Remove support and add warning message for deprecated IOCTL's -
NVMAP_IOC_FROM_ID and NVMAP_IOC_GET_ID. These ioctl calls
are deprecated by corresponding FD ioctl calls.

Bug 1553082

Change-Id: I3cd531422293f19496687f346692fa91ebe58a40
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: http://git-master/r/498045
(cherry picked from commit 420dce0a99231453ebbd091f110d0de816e4885e)
Reviewed-on: http://git-master/r/556844
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
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>