]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/log
hercules2020/nv-tegra/linux-4.4.git
6 years agoWAR:media:i2c:ov5693: add flip and mirror setting l4t/l4t-r28.1 l4t/l4t-r283.1
Wenjia Zhou [Sat, 15 Jul 2017 02:35:59 +0000 (19:35 -0700)]
WAR:media:i2c:ov5693: add flip and mirror setting

mode table enable mirror, WAR by unmirror it.

Bug 200292212

Change-Id: I17ab87946c17d45813f9b76cf5ebb2918d00da03
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1520873
Reviewed-by: Michelle Bourland <msoult@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sean Pieper <spieper@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agoxhci-hcd: support soft retry on SS transfer error
TW Chiu [Wed, 12 Jul 2017 03:48:25 +0000 (11:48 +0800)]
xhci-hcd: support soft retry on SS transfer error

Handle the case where Stop EP Command is issued during
soft retry.

Bug 200217649
Bug 200235489
Bug 200326615

Change-Id: I785696833e5ce36a846efec8a4240e2b5d4c20aa
Signed-off-by: TW Chiu <twchiu@nvidia.com>
Signed-off-by: Hans Yang <hansy@nvidia.com>
(cherry picked from commit 71c69da3dfaeb9911c144af410a14253538d0d7f)
Reviewed-on: https://git-master.nvidia.com/r/1517708
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agowatchdog: tegra: add support for enable-on-init
Allen Yu [Wed, 21 Jun 2017 13:36:52 +0000 (19:06 +0530)]
watchdog: tegra: add support for enable-on-init

This change is highly based on below work by Allen Yu

    watchdog: tegra: revmap support for enable-on-init

    To recover device from early hang before userspace watchdog daemon starts,
    WDT needs to be enabled on init and a kernel WDT petting routine is preferable
    since the time to userspace boot is non-deterministic and it is possible that
    userspace may not provide a watchdog daemon. This change does following:

    - Request a threaded irq (WDT_IRQ) if enable-on-init is provided in DT
    - Reload WDT in the threaded interrupt context to probe CPU lockup
    - Remove the IRQ handler once userspace watchdog daemon takes over WDT

    For legacy chips like t124 and t132, WDT_IRQ is not available for WDT petting
    since it's used for FIQ debugger. So they still expect userspace to boot and
    start petting the watchdog.

    Bug 200100035

Bug 200314562

Change-Id: Ie33cd9256aeaa47b6662264f562cc9a5115cf6b8
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master/r/1515197
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agowatchdog: tegra: select timer based on timer base
Shreshtha SAHU [Mon, 5 Jun 2017 14:11:44 +0000 (19:41 +0530)]
watchdog: tegra: select timer based on timer base

Remove hardcoding of timer ID and select watchdog timer source
based on timer base provided in DT timer resource property

Bug 200314562

Change-Id: Ic12b881663b48b5ad260b39b3985ffdd505873bf
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master/r/1515196
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agowatchdog: tegra: revamp timeout calculation and usage
Shreshtha SAHU [Mon, 5 Jun 2017 08:18:29 +0000 (13:48 +0530)]
watchdog: tegra: revamp timeout calculation and usage

 - update calculation of timeout for TIMER_PTV,
 - update watchdog ping to first disable timer, update timeut value
   and then restart the timer.
 - init watchdog timeout using watchdog_init_timeout
 - program default trigger period in watchdog configuration regiter

Bug 200314562

Change-Id: Iec9e5a94c995653e5a3c653eccfa23a0877ae2e9
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master/r/1515195
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agowatchdog: tegra: get expiry count from DT
Allen Yu [Mon, 5 Jun 2017 06:57:28 +0000 (12:27 +0530)]
watchdog: tegra: get expiry count from DT

The total expiry count of Tegra WDTs is limited to HW design and depends
on skip configuration if supported. This change adds support to get the
expiry count through device tree. To be safe, we set the default expiry
count to 1, in case device tree doesn't provide the value.

(adapted from commit 9a947bd96bd93cd8e81217fc9ad5eeb0bb2e1e9f)

Bug 200314562

Change-Id: I50316bf34df8d63fe660c46c6baecc85276859e2
Signed-off-by: Allen Yu <alleny@nvidia.com>
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master/r/1515194
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agodt-binding: tegra: add timer source documentation
Shreshtha SAHU [Tue, 20 Jun 2017 15:14:26 +0000 (20:44 +0530)]
dt-binding: tegra: add timer source documentation

Add documentation of possible methods to provide WDT timer sources,
their priorities of selection and restriction in usage of each
method.

Bug 200314562

Change-Id: Ib19c9962e181301b9b3b373c7e079c211a6e09e8
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master/r/1515193
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agodrivers: tegra_wdt: use DT based registration
Shreshtha SAHU [Mon, 5 Jun 2017 05:37:22 +0000 (11:07 +0530)]
drivers: tegra_wdt: use DT based registration

Make DT only based registration and read properties
from "nvidia,tegra-wdt" node.

Bug 200314562

Change-Id: I36ad32d6ad7376e603aa335944e488abd3e0b37d
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master/r/1515091
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agodt-binding: add Tegra WDT dt-binding document
Allen Yu [Mon, 5 Jun 2017 07:06:22 +0000 (12:36 +0530)]
dt-binding: add Tegra WDT dt-binding document

This is based on below commits:
    commit 9c20740436f06f4b5af4b7805df25ef0dec5dfb2
    Author: Allen Yu <alleny@nvidia.com>
    Date:   Wed Apr 29 15:10:51 2015 +0800

    ARM: tegra: add DT properties for tegra WDT <Allen Yu>

    Add "interrupts" and "nvidia,expiry-count" DT properties
    for tegra WDT to better support enable WDT on probe.

    Bug 200100035

    commit 7224891dff785257defbadfc5fc88257ddb49426
    Author: Robert Shih <rshih@nvidia.com>
    Date:   Mon Feb 9 17:34:59 2015 +0800

    dt-binding: add Tegra WDT dt-binding document <Robert Shih>

Bug 200314562

Change-Id: I3a7409571f80c0f815164d1b371d76e86d61025b
Signed-off-by: Allen Yu <alleny@nvidia.com>
Signed-off-by: Robert Shih <rshih@nvidia.com>
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master/r/1515090
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agoRevert "pcie: host: tegra: add shutdown hook"
Manikanta [Fri, 30 Jun 2017 09:42:43 +0000 (15:12 +0530)]
Revert "pcie: host: tegra: add shutdown hook"

This reverts commit b5fd77bf3dcb04625c4ba741eed888e538e362cc.

Issue: After rtl_shutdown, tegra_pcie_shutdown is invoking
rtl driver call(rtl8169_do_counters) which is accessing
chip registers. This is causing hard hang.

Fix: Remove tegra_pcie_shutdown handler

bug 1878690

Change-Id: I41268e9f66bdaa63fbc4ca92ba45546eda7d991e
Reviewed-on: https://git-master/r/1511917
GVS: Gerrit_Virtual_Submit
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Tested-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
6 years agomedia:camera Fix PHY_CIL_COMMAND value
Ian Kaszubski [Thu, 29 Jun 2017 00:09:45 +0000 (17:09 -0700)]
media:camera Fix PHY_CIL_COMMAND value

The value derived and written to the PHY_CIL_COMMAND register is not
reliant on its current state (i.e. reading from and building on the
registers current value). Doing so can cause CSI issues when certain
timing conditions are met.

Removes dependency on PHY_CIL_COMMAND read and makes explicit NOP writes
for clarity.

Bug 200291915

Change-Id: I932b164c4ce065de9998800313f6982ddeaf2a76
Signed-off-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-on: https://git-master/r/1510765
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Tested-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agomedia: camera: WAR for IMX185 launch error
Jaspreet Kaur [Wed, 28 Jun 2017 14:53:25 +0000 (20:23 +0530)]
media: camera: WAR for IMX185 launch error

This is a WAR which helps in IMX185 launch error seen on few
TX2 platforms.

Bug 200301178

Change-Id: Ie81a857d37ebdb7e4190459171a4569507adeaae
Signed-off-by: Jaspreet Kaur <jkaur@nvidia.com>
Reviewed-on: https://git-master/r/1511534
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agomailbox: Add get_max_txsize() to mbox_chan_ops
Akhilesh Reddy Khumbum [Wed, 21 Jun 2017 19:23:55 +0000 (12:23 -0700)]
mailbox: Add get_max_txsize() to mbox_chan_ops

Add mbox_get_max_txsize() API to the mailbox client API's as
currently there is no provision for the client to get the max
tx message size that can be sent. This API queries the controller
driver and returns the max tx message size.

Bug 200278347

Change-Id: I533f9d137c7eba473b9004ad1000fb85b50c33d7
Signed-off-by: Akhilesh Reddy Khumbum <akhumbum@nvidia.com>
Reviewed-on: https://git-master/r/1511159
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Tested-by: Rohit Vaswani <rvaswani@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
6 years agomm: larger stack guard gap, between vmas
Sri Krishna chowdary [Fri, 23 Jun 2017 06:26:03 +0000 (11:56 +0530)]
mm: larger stack guard gap, between vmas

commit 1be7107fbe18eed3e319a6c3e83c78254b693acb upstream.

Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage in
userspace. E.g. glibc uses as large as 64kB alloca() in many commonly
used functions. Others use constructs liks gid_t buffer[NGROUPS_MAX]
which is 256kB or stack strings with MAX_ARG_STRLEN.

This will become especially dangerous for suid binaries and the default
no limit for the stack size limit because those applications can be
tricked to consume a large portion of the stack and a single glibc call
could jump over the guard page. These attacks are not theoretical,
unfortunatelly.

Make those attacks less probable by increasing the stack guard gap
to 1MB (on systems with 4k pages; but make it depend on the page size
because systems with larger base pages might cap stack allocations in
the PAGE_SIZE units) which should cover larger alloca() and VLA stack
allocations. It is obviously not a full fix because the problem is
somehow inherent, but it should reduce attack space a lot.

One could argue that the gap size should be configurable from userspace,
but that can be done later when somebody finds that the new 1MB is wrong
for some special case applications.  For now, add a kernel command line
option (stack_guard_gap) to specify the stack gap size (in page units).

Implementation wise, first delete all the old code for stack guard page:
because although we could get away with accounting one extra page in a
stack vma, accounting a larger gap can break userspace - case in point,
a program run with "ulimit -S -v 20000" failed when the 1MB gap was
counted for RLIMIT_AS; similar problems could come with RLIMIT_MLOCK
and strict non-overcommit mode.

Instead of keeping gap inside the stack vma, maintain the stack guard
gap as a gap between vmas: using vm_start_gap() in place of vm_start
(or vm_end_gap() in place of vm_end if VM_GROWSUP) in just those few
places which need to respect the gap - mainly arch_get_unmapped_area(),
and and the vma tree's subtree_gap support for that.

Bug 1946430

Change-Id: I9a66aabc34b687996fb971e01bb0ef30a3d4de7d
Original-patch-by: Oleg Nesterov <oleg@redhat.com>
Original-patch-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Tested-by: Helge Deller <deller@gmx.de> # parisc
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[wt: backport to 4.11: adjust context]
[wt: backport to 4.9: adjust context ; kernel doc was not in admin-guide]
[wt: backport to 4.4: adjust context ; drop ppc hugetlb_radix changes]
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: https://git-master/r/1507817
(cherry picked from commit 407857ae0db857374423e8e87f8417f23609c71b)
Reviewed-on: https://git-master/r/1509739
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
6 years agoASoC: tegra-alt: dmic rate control override
Mohan Kumar [Tue, 20 Jun 2017 09:56:26 +0000 (15:26 +0530)]
ASoC: tegra-alt: dmic rate control override

Support sampling rate override mixer control for dmic.

Bug  1936866

Change-Id: I9a1930bda5220e4668a32f142fa07c1dc4759883
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1505570
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
6 years agouphy: t210: clean up PLLs deinit functions
BH Hsieh [Thu, 8 Jun 2017 02:47:42 +0000 (10:47 +0800)]
uphy: t210: clean up PLLs deinit functions

UPHY driver should not assert reset or update regs of
PLLE and PEX/SATA PLLs when they're in HW control.

Removed PLLs deinit functions to avoid it.
Invoking clk_disable_unprepare(uphy->plle) in
suspend_noirq only updates PLLE enable_count as
clk_plle_tegra210_enable won't update PLLE regs if
it's in HW control.

PLLE enable_count is not balanced if system didn't
reach SC7, added check in tegra21x_padctl_uphy_resume
to hadle it properly.

Bug 200305623
Bug 200305881

Change-Id: I6e1726beeba8e361e8556c91ab70e661b8b9b529
Signed-off-by: BH Hsieh <bhsieh@nvidia.com>
(cherry picked from commit 116565fcc2af8262c834cc80d59e891df435f4af)
Reviewed-on: http://git-master/r/1499128
Reviewed-by: Hans Yang <hansy@nvidia.com>
Tested-by: Hans Yang <hansy@nvidia.com>
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: ChihMin Cheng <ccheng@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agoinput: touch: raydium: reduce the wake_lock hold time to 0.5s
Darren Sun [Wed, 21 Jun 2017 14:34:59 +0000 (22:34 +0800)]
input: touch: raydium: reduce the wake_lock hold time to 0.5s

For Bug 200317440, we increase the wake lock hold
time in resume function from 1s to 0.5s which is
unneccesary.
The increased wake lock will break the systemsw
test for L4T because the test time is more than
the threshold.
Change the wake lock hold time to 0.5s back.

Bug 200317440

Change-Id: Ib26d32193a7c79cac691c5b84014cd977abd6195
Signed-off-by: Darren Sun <darrens@nvidia.com>
(cherry picked from commit e4d2c1a5e4e0cca71882502718972ca7f8717494)
Reviewed-on: http://git-master/r/1506488
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jordan Nien <jnien@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agoinput: touch: raydium: wait in suspend if driver is resuming
Darren Sun [Tue, 20 Jun 2017 09:18:42 +0000 (17:18 +0800)]
input: touch: raydium: wait in suspend if driver is resuming

If we press power button to enable/disable touch
within a short period, the driver will send
suspend command via spi when the resume step is
still processing. This will lead to a crash.

Add a check before we do suspend process and
set the timeout to 1 second.

Bug 200317440

Change-Id: Id72045856793f726ac5a6c644945dc7325097c8b
Signed-off-by: Darren Sun <darrens@nvidia.com>
(cherry picked from commit 0550360fcf3c352516e5f99912e4190c768e8e5b)
Reviewed-on: http://git-master/r/1506233
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jordan Nien <jnien@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agotegra-alt: dmic: Add output bit-width control
Viswanath L [Fri, 9 Jun 2017 11:48:31 +0000 (17:18 +0530)]
tegra-alt: dmic: Add output bit-width control

"output bit format" ctl added to set TX CIF bit-width

Bug 1936284

Change-Id: Ifeec48c9c8adc50c5ec16c237b39451511a8ceb0
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: http://git-master/r/1505598
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
6 years agotegra-alt: mvc: Updated mixer controls
Viswanath L [Wed, 7 Jun 2017 12:41:04 +0000 (18:11 +0530)]
tegra-alt: mvc: Updated mixer controls

Following updates:
 - "input bit format" ctl to set RX CIF bit-width
 - 100x scaling to "Vol" ctl for more granularity
 - Fixes in mixer ctl "get" functions so that current value is read
 - Fix in "Curve Type" ctl so that default volume gets set

Bug 1936284

Change-Id: Ib54b17266c7c3a3e9e42cab13195389c5fa1fbe7
Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-on: http://git-master/r/1505597
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
6 years agoBluetooth: hidp: fix possible might sleep error in hidp_session_thread
Jeffy Chen [Thu, 8 Jun 2017 02:00:07 +0000 (19:00 -0700)]
Bluetooth: hidp: fix possible might sleep error in hidp_session_thread

1/ Fix could not wake up by wake attempts on original wait queues.
2/ Remove unnecessary memory barrier before wake_up_* functions.

1/ Make hidp_session_wake_function static.
2/ Remove unnecessary default_wake_function.

Bug 200313399
Bug 200316957

Change-Id: I406345dcb9ba2289a4693600c5641c415fb732ef
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Shobek Sam Attupurath <sattupurath@nvidia.com>
Reviewed-on: http://git-master/r/1498057
Tested-by: Rohit Vaswani <rvaswani@nvidia.com>
Reviewed-by: Gaurav Asati <gasati@nvidia.com>
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agonet: eqos: handle rollover of PHC
abhijit [Tue, 13 Jun 2017 17:17:41 +0000 (22:47 +0530)]
net: eqos: handle rollover of PHC

Issue: ptp get_systime is not handling the rollover of nsec counter.

Fix: Handle the nsec rollover by reading the nsec counter twice. if
second read value is lower than first value, read the sec counter
again to handle rollover.

Bug 200317864

Change-Id: Ie9d09203d388656ebf8c18dd263d2d08e5c52467
Reviewed-on: http://git-master/r/1500673
(cherry picked from commit 567d97e7bfeec20cb6a196b0d874d2e0f14f3fa9)
Reviewed-on: http://git-master/r/1503234
GVS: Gerrit_Virtual_Submit
Tested-by: Abhijit . <abhijit@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
6 years agonet: eqos: Register PTP callback at correct place
abhijit [Mon, 29 May 2017 09:31:36 +0000 (15:01 +0530)]
net: eqos: Register PTP callback at correct place

Issue: CAN HW timestamp information is incorrect in case one of the
Tegra is made PTP master.

Fix: CAN HW timestamp is based on get_ptp_hwtime function which is
exported by PTP notifier framework. Above function relies on callback
registered by eqos driver. This callack was registered when adjust
PTP time was called. But adjust is not called for PTP master. Moved
the callback registration to set HWTSTAMP ioctl which is required by
both PTP master and slave.

Bug 1887016

Change-Id: Iaad1d7cdff4fc2aaf3e015ddf7b8c5ef189add3f
Reviewed-on: http://git-master/r/1491662
(cherry picked from commit 1593119045757decc0e3d71fc733d678df8637aa)
Reviewed-on: http://git-master/r/1503233
GVS: Gerrit_Virtual_Submit
Tested-by: Abhijit . <abhijit@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
6 years agonet: eqos: Add ioctl for Timestamp information
abhijit [Fri, 19 May 2017 12:19:36 +0000 (17:49 +0530)]
net: eqos: Add ioctl for Timestamp information

Issue: Required a way to read both HW PTP time and kernel time (either
CLOCK_REALTIME or CLOCK_MONOTONIC) atomically. This read will be done
with periodicity of 1 second.

Fix: Added private ioctl to get the above information. Reading of these
time values is protected by raw spinlock. Also modified ptp_lock spinlock
to be raw spinlock to prevent race conditions under RT kernel.

Bug 1927680

Change-Id: I56bca4f9d1641276b94490e6f98d8e898fda8ccf
Reviewed-on: http://git-master/r/1485916
(cherry picked from commit 13873eece3e22dc6b8cb9d96e20969ba0d6d5507)
Reviewed-on: http://git-master/r/1503232
GVS: Gerrit_Virtual_Submit
Tested-by: Abhijit . <abhijit@nvidia.com>
Reviewed-by: Sumeet Gupta <sumeetg@nvidia.com>
6 years agomedia:platform:tegra Stop duplicate singleshot
Ian Kaszubski [Thu, 15 Jun 2017 22:43:38 +0000 (15:43 -0700)]
media:platform:tegra Stop duplicate singleshot

Issue: When a capture session is complete an extra singleshot is
sometimes issued causing syncpt timeouts in subsequent sessions.

Fix: When a capture is complete do not issue a single shot if there
is already an active one.

Bug 200291915

Change-Id: I0616978b2144a0539980087fd356d8c30299bcd0
Signed-off-by: Ian Kaszubski <ikaszubski@nvidia.com>
Reviewed-on: http://git-master/r/1503374
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jaspreet Kaur <jkaur@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agomedia: tegra: camera: fix embedded data error
Ahung Cheng [Wed, 10 May 2017 08:33:30 +0000 (16:33 +0800)]
media: tegra: camera: fix embedded data error

Consider the case like HDMI input bridge. There
is no default modes from device tree. It's no
need to allocate memory for embedded data.

bug 200303250

Change-Id: I64efc6a1a81bfb6e6da6912f0cb413739caaf70c
Reviewed-on: http://git-master/r/1478950
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
(cherry picked from commit 9a82905d7de752dda320f4d84133c5850a856b65)
Reviewed-on: http://git-master/r/1495750
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonet: eqos: start phy interrupts after MAC reset.
Narayan Reddy [Wed, 14 Jun 2017 05:38:00 +0000 (11:08 +0530)]
net: eqos: start phy interrupts after MAC reset.

Issue: After PHY reset through the GPIO, autonegotion
will start from the PHY side which results in triggering
the PHY interrupts. Through the IRQ handler phy_change
workqueue will be scheduled and which will be trying to
access the PHY registers through MDIO bus. While accessing
the MDIO address/data registers in workqueue context EQOS
MAC is in reset mode which results in APB timeout.

Fix: start phy interrupts once EQOS MAC is out of reset

Bug 200284385

Change-Id: Ia5b48f2b163463f6b4f1f3c0b319b5da0ebccb3e
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: http://git-master/r/1502069
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agolocking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write()
Peter Zijlstra [Thu, 11 Aug 2016 16:54:13 +0000 (18:54 +0200)]
locking, rcu, cgroup: Avoid synchronize_sched() in __cgroup_procs_write()

The current percpu-rwsem read side is entirely free of serializing insns
at the cost of having a synchronize_sched() in the write path.

The latency of the synchronize_sched() is too high for cgroups. The
commit 1ed1328792ff talks about the write path being a fairly cold path
but this is not the case for Android which moves task to the foreground
cgroup and back around binder IPC calls from foreground processes to
background processes, so it is significantly hotter than human initiated
operations.

Switch cgroup_threadgroup_rwsem into the slow mode for now to avoid the
problem, hopefully it should not be that slow after another commit:

  80127a39681b ("locking/percpu-rwsem: Optimize readers and reduce global impact").

We could just add rcu_sync_enter() into cgroup_init() but we do not want
another synchronize_sched() at boot time, so this patch adds the new helper
which doesn't block but currently can only be called before the first use.

Bug 200300548

Reported-by: John Stultz <john.stultz@linaro.org>
Reported-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Colin Cross <ccross@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rom Lemarchand <romlem@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Todd Kjos <tkjos@google.com>
Link: http://lkml.kernel.org/r/20160811165413.GA22807@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from upstream commit 3942a9bd7b5842a924e99ee6ec1350b8006c94ec)

Conflicts:
kernel/cgroup.c

Change-Id: Ic43990317727692975699676775ca7b1ea0dd9b9
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1494853
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agolocking/percpu-rwsem: Optimize readers and reduce global impact
Peter Zijlstra [Thu, 14 Jul 2016 18:08:46 +0000 (20:08 +0200)]
locking/percpu-rwsem: Optimize readers and reduce global impact

Currently the percpu-rwsem switches to (global) atomic ops while a
writer is waiting; which could be quite a while and slows down
releasing the readers.

This patch cures this problem by ordering the reader-state vs
reader-count (see the comments in __percpu_down_read() and
percpu_down_write()). This changes a global atomic op into a full
memory barrier, which doesn't have the global cacheline contention.

This also enables using the percpu-rwsem with rcu_sync disabled in order
to bias the implementation differently, reducing the writer latency by
adding some cost to readers.

Bug 200300548

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
[ Fixed modular build. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from upstream commit 80127a39681bd68c959f0953f84a830cbd7c3b1c)

Change-Id: I5636ef98f2bc7ed6143fadffc6fb76e0d2dee5f8
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/1494852
Tested-by: Mubushir Rahman <mubushirr@nvidia.com>
Reviewed-by: Mubushir Rahman <mubushirr@nvidia.com>
Reviewed-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agodrivers: media: camera: Add sync op support
Bhanu Murthy V [Fri, 10 Jun 2016 23:17:52 +0000 (16:17 -0700)]
drivers: media: camera: Add sync op support

Add sync file op support in VI driver.
Sub devices will be synchronized when the MFI interrupt
arrives to VI driver. At present this interrupt is
configured when the ROI of focus area ends during the
current frame capture.

Fix vi2 and vi4 differences using fops in addition to
the original commit.
Cleanup MFI code in the active isr flow.

Bug 1754305

Change-Id: I7e96d413e79dbab17c7c4349cef9ef6b78ab983d
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1162764
(cherry picked from commit 8c7c212927f1b1703fe0bf95086605fef48ff89d)
Reviewed-on: http://git-master/r/1327223
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agodrivers: media: lc898212: Focuser sync support
Bhanu Murthy V [Fri, 10 Jun 2016 19:49:17 +0000 (12:49 -0700)]
drivers: media: lc898212: Focuser sync support

Add support for synchronized focuser position writes
w.r.t sensor capture.
Add external sync CID for focuser to enable/disable
external synchronization to set position.

Bug 1754305

Change-Id: Ia41770b960a1f9b3013355983ea074b1c19f55df
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-on: http://git-master/r/1162763
(cherry picked from commit f2ec481a564305d7036c83faebef871b890d09f5)
Reviewed-on: http://git-master/r/1327222
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agov4l2-core: Add sync op to subdev_core_ops
Bhanu Murthy V [Fri, 10 Jun 2016 23:09:45 +0000 (16:09 -0700)]
v4l2-core: Add sync op to subdev_core_ops

If multiple sub devices need to be synchronized w.r.t one
sub device state, then this op can be used.

For example in camera system, configuring focuser position and
sensor capture have to be synchronized when the ROI for focuser
ends. Writing focus position on improper boundary causes unexpected
output.

Bug 1754305

Change-Id: I09140cac1c2e3a06de78f08b90c35562d2ec2880
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-on: http://git-master/r/1162762
(cherry picked from commit 03ea0e3544d6768cc84d2ff4b90a218caee6d208)
Reviewed-on: http://git-master/r/1327221
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agoplatform: auto: Initialize pwm as NULL
Junghyun Kim [Thu, 18 May 2017 19:49:03 +0000 (12:49 -0700)]
platform: auto: Initialize pwm as NULL

Initialize pwm variable to NULL and qualify it
before using PWM functions when pwm is not defined
in DT.

Bug 1926727

Change-Id: I2a7ab201645f4a4d3158bbfc281adea19ffd6cb5
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: http://git-master/r/1485097
(cherry picked from commit b9f147d439b6f5b0bf28f5f4791ca0e6e862bdcd)
Reviewed-on: http://git-master/r/1485345
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Gajanan Bhat <gbhat@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
6 years agoplatform: auto: disable pwm when isc-mgr released
Junghyun Kim [Tue, 2 May 2017 23:15:00 +0000 (16:15 -0700)]
platform: auto: disable pwm when isc-mgr released

Bug 1926727

Change-Id: I0cb51ce3f2c7df6ede12764deb6abeffcced53f7
Signed-off-by: Junghyun Kim <juskim@nvidia.com>
Reviewed-on: http://git-master/r/1474817
(cherry picked from commit 4f755907fe8a95d36abb0c357a3eb05d66e3f84e)
Reviewed-on: http://git-master/r/1484218
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Songhee Baek <sbaek@nvidia.com>
Reviewed-by: Gajanan Bhat <gbhat@nvidia.com>
Reviewed-by: Arun Shamanna Lakshmi <aruns@nvidia.com>
6 years agofbcon: use mode from fbconsole to enable dc
Naveen Kumar S [Thu, 8 Jun 2017 14:34:42 +0000 (20:04 +0530)]
fbcon: use mode from fbconsole to enable dc

fbconsole takes over when a userspace entity (Xorg) gets
killed. But in this scenario, DC was getting enabled
with X's mode instead of using fbconsole's mode. This
lead to DC and fbconsole having different modes if X had
updated its mode earlier. Updated fbconsole unblanking logic
to use fbconsole's mode to enable DC during a switch from
graphical to text mode.

bug 1885932

Change-Id: I8aa63c950fefc23aa2ec1b062ed6648688b6f4bb
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/1498522
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoRevert "fbcon: update mode before enabling controller"
Naveen Kumar S [Thu, 8 Jun 2017 14:27:53 +0000 (19:57 +0530)]
Revert "fbcon: update mode before enabling controller"

This reverts commit 5bdda4518527d11c7e690e39a1ae6a1a9b1bb56a.
This change helped in updating dc mode when a userspace
client got killed abruptly. But it was observed that display
was not unblanking during hotplug. Hence reverting this patch.

bug 200299134
bug 1885932

Change-Id: I5981b08f0fc9c70ce14f895bd66a127a2998147a
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/1498521
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoRevert "net: eqos: fix timeout error"
Rajkumar Kasirajan [Sat, 3 Jun 2017 01:01:02 +0000 (09:01 +0800)]
Revert "net: eqos: fix timeout error"

This reverts commit 27cba59ebedd9ea62947ca697e706926837b2c45 as
it increased osidle power when Ethernet is disabled by software.

Bug 200314903
Bug 200284385

Change-Id: Ibb75e0d72d790ce8239b0beeb989a03d1fede42a
Signed-off-by: Rajkumar Kasirajan <rkasirajan@nvidia.com>
Reviewed-on: http://git-master/r/1495165
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ninad Malwade <nmalwade@nvidia.com>
Tested-by: Ninad Malwade <nmalwade@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agotegra210-emc: Get max temperature of two DDR die
Shreshtha SAHU [Tue, 9 May 2017 06:30:17 +0000 (12:00 +0530)]
tegra210-emc: Get max temperature of two DDR die

DDR temperature is polled to decide the refresh rate
of DDR during high temperatures. In case of two die
solution, each die can have different temperature.

Hence take max temperature of two DDR die to detemine
DDR refresh speed next action.

Bug 1915944
Bug 200306741

Change-Id: I52e9f5507445043545a384a31a02595bd69506a3
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1477999
GVS: Gerrit_Virtual_Submit
Reviewed-by: Martin Chi <mchi@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agotegra-se: Set IV in UIV slot
Konduri Praveen [Fri, 2 Jun 2017 09:33:21 +0000 (15:03 +0530)]
tegra-se: Set IV in UIV slot

Set IV in UIV slot so that when an IV is not set,
Engine will use updated IV from UIV which is
calculated from previous AES operation.

Bug 200225148

Change-Id: I6f44504d1d21fe8f128ea34fadbfeb32348b0d90
Signed-off-by: Konduri Praveen <kondurip@nvidia.com>
Reviewed-on: http://git-master/r/1494656
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agofbcon: Block rounding off mode for VT running X.
Saket Sinha [Fri, 26 May 2017 05:55:28 +0000 (11:25 +0530)]
fbcon: Block rounding off mode for VT running X.

When X is active i.e. GNOME/Ubuntu Desktop is running, fb_display
does not get updated and still contain stale values of unplug event.
Rounding mode of stale values causes wrong resolution being picked up
on hotplugging HDMI.

Bug 200295792

Change-Id: Icdd4d1ea06044ac63e3b76d881e4d7ccc65bf5fd
Signed-off-by: Saket Sinha <sakets@nvidia.com>
Reviewed-on: http://git-master/r/1490339
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoarm64: mm: remap dma contiguous memory as non executable
Krishna Reddy [Thu, 9 Feb 2017 06:13:32 +0000 (22:13 -0800)]
arm64: mm: remap dma contiguous memory as non executable

Dma buffers shouldn't have executable code. To ensure the security,
Map dma contiguous memory as non executable in kernel.

Bug 1859649

Change-Id: I8b4b6d574477f560e9a43b07287014ed981092d3
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/1301854
(cherry picked from commit e910098f1d91ce82c18de8b5986be0856e5bc942)
Reviewed-on: http://git-master/r/1497681
Reviewed-by: Kamal Balagopalan <kbalagopalan@nvidia.com>
Tested-by: Kamal Balagopalan <kbalagopalan@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agotegra: camera: fix ENUM_FRAMESIZES/INTERVALS
Ahung Cheng [Tue, 25 Apr 2017 05:13:09 +0000 (13:13 +0800)]
tegra: camera: fix ENUM_FRAMESIZES/INTERVALS

The compliance test breaks since these always return 0 when they
should return -ENOTTY.

bug 200294896

Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Change-Id: I3f3e1084aefa4e77a6ed83126947c8ea946c7beb
Reviewed-on: http://git-master/r/1456977
Reviewed-on: http://git-master/r/1469190
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
(cherry picked from commit 556422aa1a75f6a44c5a9265bbfd532a8c15b7dd)
Reviewed-on: http://git-master/r/1496501

6 years agoarm64: tegra18: disable CONFIG_TEGRA_PTP_NOTIFIER
Shreshtha SAHU [Mon, 5 Jun 2017 13:23:05 +0000 (18:53 +0530)]
arm64: tegra18: disable CONFIG_TEGRA_PTP_NOTIFIER

Bug 200301929

Change-Id: I04253a2f3a85ec83c3ea65369246dabd850ba1e4
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1496062
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ruicheng Dai <rdai@nvidia.com>
Tested-by: Ruicheng Dai <rdai@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agomisc: nct1008: fix NULL ptr access in get_trend
Srikar Srimath Tirumala [Wed, 24 May 2017 02:10:07 +0000 (19:10 -0700)]
misc: nct1008: fix NULL ptr access in get_trend

Return a stable trend when trend is queried during boot before
all the pointers are initialized.

Bug 200311672

Change-Id: I6b03b266b868ac1bd6e39ea63078d24e273bc327
Signed-off-by: Srikar Srimath Tirumala <srikars@nvidia.com>
Reviewed-on: http://git-master/r/1488401
(cherry picked from commit f507b9b74fede1e1adac02c295e0f3666c4a7674)
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1492084
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
6 years agomedia:camera: Fix s_stream and s_power sequence
Wenjia Zhou [Mon, 5 Jun 2017 23:05:00 +0000 (16:05 -0700)]
media:camera: Fix s_stream and s_power sequence

Bug 1920440
Bug 200295634

Change-Id: I1f268b709821f327aad9d426e0544370824beae3
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-on: http://git-master/r/1479671
(cherry picked from commit 37351f2e9ad9056755b949a59f5c817cddcbb606)
Reviewed-on: http://git-master/r/1490063
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agomedia:i2c: enter sw standby mode after reset
Wenjia Zhou [Thu, 25 May 2017 23:11:09 +0000 (16:11 -0700)]
media:i2c: enter sw standby mode after reset

Bug 1920440

Change-Id: I02815655b7ff817b543a8ded2929b5d2cf22593b
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-on: http://git-master/r/1490060
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agonet: wireless: bcmdhd: check for kthread_run error
Manikanta [Thu, 1 Jun 2017 10:05:54 +0000 (15:35 +0530)]
net: wireless: bcmdhd: check for kthread_run error

Issue: wifiloader service loads bcmdhd module.
During encryption wifiloader service is kiiled,
when bcmdhd driver is loading. In this scenario
bcmdhd driver is crashing because kthread_run()
failure is not handled.

Fix: Return error code if kthread_run() fails.

bug 200313463

Change-Id: Iac66146f314305940b65060558908b34831696ce
Signed-off-by: Manikanta <mmaddireddy@nvidia.com>
Reviewed-on: http://git-master/r/1493916
(cherry picked from commit c08ef77295c22793baacb6edcf42ce662269f169)
Reviewed-on: http://git-master/r/1496717
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
6 years agofbcon: update mode before enabling controller
Naveen Kumar S [Mon, 5 Jun 2017 09:14:03 +0000 (14:44 +0530)]
fbcon: update mode before enabling controller

When switching from a graphical mode (X) to text mode (fbconsole),
fbconsole enables display controller and then updates screen
resolution. If the previous graphical userspace client's mode was
different from fbconsole's mode, DC and fbconsole will get enabled
with different modes. Hence, first update screen with fbconsole's
resolution and then unblank/enable DC.

bug 1885932

Change-Id: I6772ebf075f5448381a8c8df65da1fd6daec689f
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/1495926
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>
6 years agoufs: tegra: Init mphy_force_ls_mode clock handle.
Naveen Kumar Arepalli [Mon, 5 Jun 2017 09:18:42 +0000 (14:48 +0530)]
ufs: tegra: Init mphy_force_ls_mode clock handle.

-Init mphy_force_ls_mode clock handle before using it.

Bug 200278112

Change-Id: I20c1565f7365285539ed7799a2e40102ace09d56
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/1495911
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agodrivers: camera: Mode selection logic
Bhanu Murthy V [Fri, 19 Aug 2016 00:08:21 +0000 (17:08 -0700)]
drivers: camera: Mode selection logic

Segregate mode selection logic into standard
and special types. Standard mode selection
will be based on pixel format and special type
selection will depend on sensor settings defined
by controls.

Bug 200214096
Bug 200227485

Change-Id: Ic020017ddf635aa5662370903efd660150d319be
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1204713
(cherry picked from commit f551889dd77b04b095cb4064eea33bf8151fa57a)
Reviewed-on: http://git-master/r/1483448
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Frank Chen <frankc@nvidia.com>
Tested-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Hu He <hhe@nvidia.com>
Reviewed-by: Shantanu Nath <snath@nvidia.com>
6 years agovideo: fbmem: assign bpp value for var_screeninfo
Naveen Kumar S [Wed, 31 May 2017 10:07:45 +0000 (15:37 +0530)]
video: fbmem: assign bpp value for var_screeninfo

bits per pixel is not specified in few scenarios.
E.g.: Modes set through nvdisp_setmode.
In such cases, fbconsole fails during subsequent
operations. Hence assign bpp value from previous mode
if bpp is not set.

bug 200277699

Change-Id: I154ce70b9c67c0ca99b0efc71b2c0cf120b07ef3
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/1492910
GVS: Gerrit_Virtual_Submit
Reviewed-by: Tow Wang <toww@nvidia.com>
Reviewed-by: Santosh Galma <galmar@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agodmaengine: tegra-adma: Fix system suspend handling
Jon Hunter [Tue, 23 May 2017 15:51:25 +0000 (16:51 +0100)]
dmaengine: tegra-adma: Fix system suspend handling

If ADMA is active when system suspend occurs, it is not suspended and
hence, the state and clock configuration is not handled correctly in
the suspend path.

Add proper system suspend and resume callbacks to ensure that the ADMA
is suspended and resumed if active when system suspend occurs.

Finally, make the system suspend callbacks for the ADMA late suspend
callbacks to ensure that the sound core has suspended any on-going
activity, including stopping the ADMA if active, before we attempt to
suspend the ADMA.

Bug 200275736

Change-Id: I7f24b5f21ad8ec76e5c129a1d384d11f6fc040a8
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: http://git-master/r/1488954
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agoASoC: tegra-alt: Fix system suspend handling
Jon Hunter [Tue, 23 May 2017 15:44:28 +0000 (16:44 +0100)]
ASoC: tegra-alt: Fix system suspend handling

There are a couple issues with system suspend handling in the Tegra
ASoC codec drivers which are:

1. Most drivers the system suspend callback does nothing and this
   means that if the codec device is active when suspend occurs then
   the codec will not be suspended correctly. This has been seen to
   cause system crashes in the I2S driver when the system is suspended
   and resuming while audio playback is active.

2. The codec suspend handlers may be called twice when entering
   suspend. Suspend handlers should only be called once, but currently
   they are called twice; once by the PM core and once when the APE
   power-domain is turned off (if it is on when suspend occurs).

Fix the above two problems by:

a). Adding proper system suspend and resume handlers for all codec
    drivers, to suspend and resume the device if not runtime PM
    suspended on entering suspend.
b). Remove the code to call the PM callbacks from the APE power-domain
    code.

Finally, make the system suspend callbacks for these codec drivers
late suspend callbacks to ensure that the sound core has suspended
any on-going activity, before we attempt to suspend these codec
devices.

Bug 200275736

Change-Id: I09d7e570be4e1866683873591ff76be63fdaf3fb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: http://git-master/r/1488953
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
6 years agovideo:tegra:camera: Cap request at max BW
Peter Mikolajczyk [Wed, 24 May 2017 00:34:43 +0000 (17:34 -0700)]
video:tegra:camera: Cap request at max BW

    Have the camera platform driver cap the
    bw request at max instead of failing if
    a request is too high.

    Bug 1874022

Change-Id: I33d61382248687b30a833d4590b12cb33bc4c7d4
Signed-off-by: Peter Mikolajczyk <pmikolajczyk@nvidia.com>
Reviewed-on: http://git-master/r/1488353
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agoASoC: tegra-alt: Fix parent runtime PM handling
Jon Hunter [Mon, 22 May 2017 15:02:11 +0000 (16:02 +0100)]
ASoC: tegra-alt: Fix parent runtime PM handling

Linux runtime PM automatically handles the runtime resuming and
suspending of a parent device and therefore, it is not necessary
for a child device to explicitly runtime resume or suspend the
parent.

The various Tegra ASoC codec drivers explicitly runtime resume
and suspend the parent device from within their runtime PM callback
handler. This should not be necessary.

Furthermore, currently the various Tegra ASoC codec drivers are
not suspended correctly if active when system suspend occurs. During
system suspend it is common to directly call the runtime PM callbacks
to suspend and resume the device if active from the system suspend
callbacks. However, the APIs, pm_runtime_get/put(), cannot be called
during system suspend and so the runtime PM callbacks for these codec
drivers cannot be called from the context of the system suspend
callbacks.

Remove the calls to runtime resume and suspend the parent device from
the runtime PM callbacks for the various Tegra ASoC drivers. This will
allow us to fix suspending and resuming of the Tegra ASoC drivers
across system suspend.

Bug 200275736

Change-Id: Ia2c954f206ed0276c6d54627f274e6a713d88a6f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: http://git-master/r/1487805
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agodrivers: media: vivid: Support packed 10bit bayer
Bhanu Murthy V [Wed, 15 Feb 2017 23:43:25 +0000 (15:43 -0800)]
drivers: media: vivid: Support packed 10bit bayer

Add support for packed 10bit formats in vivid driver.
Add/Modify tpg apis for new format support.

Bug 1879822
Jira CHWI-798

Change-Id: Ib3865f56a11f0f38632b8022faa528408dc1d555
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-on: http://git-master/r/1484689
(cherry picked from commit 7e2d4d3c5ed82999cac5d942fc478c3a224c00da)
Reviewed-on: http://git-master/r/1493379
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agoASoC: rt5659: cancel worker queue on suspend
Mohan Kumar [Wed, 31 May 2017 10:51:24 +0000 (16:21 +0530)]
ASoC: rt5659: cancel worker queue on suspend

Cancel the worker queue on the suspend path.

Bug 200309778

Change-Id: I7fab2b49e48200a20778314ff37d4e29f4dd8844
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1492957
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
6 years agommc: tegra: Detect non-removable device presence status
Pavan Kunapuli [Tue, 23 May 2017 06:33:01 +0000 (12:03 +0530)]
mmc: tegra: Detect non-removable device presence status

If detect-non-removable-device dt property is set, enable
support for detection of device presence status for non-removable
devices.

Bug 1855363

Reviewed-on: http://git-master/r/1487871
(cherry picked from commit a9b953a145531061671c991b90382b777ec54a7b)
Change-Id: I3a7c7bcc255c08020720cb0ce8c8cf8584aa8a21
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/1491870
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agonet: wireless: bcmdhd: Allow sdio device rescan
Pavan Kunapuli [Tue, 23 May 2017 11:13:56 +0000 (16:43 +0530)]
net: wireless: bcmdhd: Allow sdio device rescan

SDIO devices are marked as non-removable devices in mmc stack.
To reenumerate SDIO, clear rescan_entered flag before issuing
mmc detect.

Bug 1855363

Reviewed-on: http://git-master/r/1487872
(cherry picked from commit 04673c8d82f4b7b1edebd4cfd06f08890d2a0f3a)
Change-Id: I3b0eee7acab9e1ddace44cd052da65c606643857
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/1491869
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agommc: core: Check non-removable device presence status
Pavan Kunapuli [Tue, 23 May 2017 06:29:14 +0000 (11:59 +0530)]
mmc: core: Check non-removable device presence status

Provide option to check for the presence of non-removable devices.
This would be used for devices like SDIO that are not physically
removed but would have to be re-enumerated when Wifi module is loaded
or unloaded.

Bug 1855363

Reviewed-on: http://git-master/r/1487870
(cherry picked from commit e5024d7fdbad87d6438607505608f0e6a6ee2f5f)

Change-Id: Idd3485e71c10fbb0dfef920deda322a6ee0f7f29
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-on: http://git-master/r/1491868
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agogpio: of: Add support for making pin in non-GPIO mode from DT
Laxman Dewangan [Thu, 9 Mar 2017 13:04:21 +0000 (18:34 +0530)]
gpio: of: Add support for making pin in non-GPIO mode from DT

Add support to make the pin to make as non-GPIO mode from DT.
This will help to make the pin in function mode if bootloader
made it to GPIO mode.

Bug 200305703

Change-Id: I8cfc31b551bb16d1eac7c1f8d280655a1f028cb1
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1317924
(cherry picked from commit 6ce5123fd9cfbbb8cac92ec8f8b13cbc206af3c5)
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1491906

6 years agoarm64: config: t210: enable ACTMON
Shreshtha SAHU [Fri, 19 May 2017 15:25:41 +0000 (20:55 +0530)]
arm64: config: t210: enable ACTMON

Bug 200305406

boot.img size is increased by 16816 bytes

Change-Id: I2eae9b0ed4ddf27903e158407d4cb75c149cc779
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1485999
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Puneet Saxena <puneets@nvidia.com>
6 years agodrivers: tegra: t21x: actmon: add bwmgr suport
Shreshtha SAHU [Fri, 19 May 2017 13:14:30 +0000 (18:44 +0530)]
drivers: tegra: t21x: actmon: add bwmgr suport

  Add BWMGR support
  Remove obsolute TEGRA_CLK_FRAMEWORK APIs
  Use COMMON_CLK APIs
  Cleanup of function returns

Bug 200305406

Change-Id: I33ceed2478bca99daf0b6b945dac9aa1d69e0ea0
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/1485998
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
6 years agonet: eqos: fix timeout error
Bhadram Varka [Wed, 22 Mar 2017 11:24:42 +0000 (16:54 +0530)]
net: eqos: fix timeout error

Issue: EQOS trying to access the PHY registers through
mdiobus_write/read from the phy_change IRQ handler.
At this stage PHY is not in proper state to respond
to the register read/write which leads to below timeout -

[   18.116266] Decoded FIFO Entry: 0
[   18.116267]  Direction: READ
[   18.116268]  Bridge ID: 0x9
[   18.116270]  Error Type: 0x12 -- Timeout error
[   18.116271]  Length: 0
[   18.116274]  Protection: 0x2 -- Unprivileged, Non-Secure, Data Access
[   18.116276]  Source ID: 0x1 -- CCPLEX
[   18.116277]  AXI_ID: 0x4 -- A57 Core 0
[   18.116279]  Cache: 0x1 -- Device
[   18.116280]  Burst: 0x1
[   18.116310]  Address: 0x2490200 (Unknown Device)

Fix: Start the PHY while bringup the interface and
stop the PHY while the interface is going down.

Bug 200284385

Change-Id: Ib557f49b11f857f214b245e0284e045c8b4981d9
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: http://git-master/r/1488009
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Tested-by: Narayan Reddy <narayanr@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agoASoC: tegra-alt: Dump APE register for debugging
Mohan Kumar [Wed, 10 May 2017 06:59:49 +0000 (12:29 +0530)]
ASoC: tegra-alt: Dump APE register for debugging

Add support with a mixer control using which APE register
status can be dumped from userspace during an error or
while debugging.

Bug 200307023

Change-Id: I489bdaeeec16975a872b9b145a1672f3f4ef1928
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1478879
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dipesh Gandhi <dipeshg@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
6 years agofirmware: tegra: do not fail probe if debugfs is missing
Sivaram Nair [Wed, 24 May 2017 17:29:14 +0000 (10:29 -0700)]
firmware: tegra: do not fail probe if debugfs is missing

There is no reason to fail probe (and thereby deny all bpmp services to
kernel) when debugfs is absent (or its creation failed).

Bug 1929129

Change-Id: I28d6632945afdac00815caf71e51fff90e31c6bc
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/1489030
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arun Kannan <akannan@nvidia.com>
Tested-by: Arun Kannan <akannan@nvidia.com>
Reviewed-by: Timo Alho <talho@nvidia.com>
6 years agosoc: tegra: pmc: DT add wake fix
Bitan Biswas [Wed, 26 Apr 2017 12:37:08 +0000 (18:07 +0530)]
soc: tegra: pmc: DT add wake fix

tegra_of_device_add_pmc_wake was ignoring
device's own nvidia,pmc-wakeup attribute when
child nodes were present. Process own attribute
first before processing child nodes.
 - T21x wake support is through DT
   and does not use built-in wakeups table
 - tegra210-comms-p2530-0930.dtsi has
   WAKE8 in bcmdhd_wlan node

Bug 200298115
Bug 1811733
Bug 200306539

Change-Id: Id14cca693c7eb05c09969fdd8256aa72e2067327
Reviewed-on: http://git-master/r/1470483
(cherry picked from commit aa931b2cb27cad77d5b83e928f5402bbb9a682dc)
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/1488524
Tested-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: Joseph Lo <josephl@nvidia.com>
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agoi2c: tegra: flush fifos after enabling the clock
Shardar Shariff Md [Mon, 22 May 2017 08:00:04 +0000 (13:30 +0530)]
i2c: tegra: flush fifos after enabling the clock

I2C controller registers should be accessed after enabling the clock
but during multi packet feature addition (commit: 3af1f17167)
mistakenly i2c registers (fifo flush) access is done before clock is
enabled. This issue was missed as clock never disabled once clock got
enabled. Moving flushing fifos(accessing controller registers) after
clock enable to fix this issue.

Bug 200267979

Change-Id: I731b05c0a57b377e6780b4359c401f728b92542b
Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com>
(cherry picked from commit 785da1bf8a88c0ea7a50a7172c055b87c744a223)
Reviewed-on: http://git-master/r/1489038
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agogpio: tegra: add early_resume support
Suresh Mangipudi [Tue, 16 May 2017 10:30:37 +0000 (16:00 +0530)]
gpio: tegra: add early_resume support

GPIO resume needs to happen early in the resume process
to ensure proper functioning of the peripheral drivers.

This change moves the GPIO resume to early_resume.

Bug 200298115

Change-Id: Ifda130b2c031dfc605dd7c0a297f5389dc8f4b23
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/1482938
(cherry picked from commit fe8ced21e938523484fffc5890478f7994a73628)
Reviewed-on: http://git-master/r/1487957
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agopm/resume: Add support for early resume
Suresh Mangipudi [Tue, 16 May 2017 10:26:11 +0000 (15:56 +0530)]
pm/resume: Add support for early resume

Sometimes, there is a need to sequence the resume of different
drivers regardless of their registration. For example, for Tegra
platform, GPIO resume should be before the pinmux resume to avoid
glitch. On this, GPIO resume will configure the GPIO control
register before pins are enable after resume.

Add support to have the early_resume() callback which get called
before resume() so that respective driver's resume can be sequenced
over other drivers.

Bug 200298115

Change-Id: I794f6aea613a30cda8ba5decbf8ce62571c8e44b
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/1482937
(cherry picked from commit 73fa1fcde1982ea05f83b39f6d0281d8b10c968e)
Reviewed-on: http://git-master/r/1487954
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agoAdding NOTASSOCIATED FW error to disconnect wifi
Mahesh Patil [Mon, 27 Mar 2017 20:05:09 +0000 (13:05 -0700)]
Adding NOTASSOCIATED FW error to disconnect wifi

Adding NOTASSOCIATED error from FW to Disconnect wifi and
setting disconnect timer to 5 sec

Bug 200215502
Bug 200305758
Bug 200308970

Change-Id: I205f6a73780f5a5980851cb805c263e2ed9270c1
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
(cherry pick from commit f3e9994f9d2a12dea5a65df10a268dda5351c5a8)
Reviewed-on: http://git-master/r/1482285
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agonet: wireless: bcmdhd: Integrate following changes
Srinivas Ramachandran [Sat, 15 Apr 2017 01:19:58 +0000 (18:19 -0700)]
net: wireless: bcmdhd: Integrate following changes

e1a3aa1 net: wireless: bcmdhd: Re-set country code on CSA completion
5d50d5b net: wireless: bcmdhd: Re-set country code on disconnection

Bug 1883430
Bug 200305758
Bug 200308970

Change-Id: Ib3a88debe88b3e8df2613b4f1dc8d043b2bf1a31
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: http://git-master/r/1467783
(cherry picked from commit b705e20dc4c54288db1f20d8de39c68d0357929a)
Reviewed-on: http://git-master/r/1482315
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agoASoC: tegra-alt: update buffer size in HW params
Ahung Cheng [Mon, 22 May 2017 07:04:16 +0000 (15:04 +0800)]
ASoC: tegra-alt: update buffer size in HW params

Update buffer_bytes_max in HW params to match
the pre-allocated dma size.

bug 200299289

Change-Id: I8a74b053f3f811287506d5417bd7452a73d40ac0
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
Reviewed-on: http://git-master/r/1486857
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
6 years agoRevert "Revert "Revert "TEMP: crypto: tegra-se: disable suspend-resume handlers"""
Shravani Dingari [Thu, 20 Apr 2017 08:59:01 +0000 (01:59 -0700)]
Revert "Revert "Revert "TEMP: crypto: tegra-se: disable suspend-resume handlers"""

This reverts commit 708ddc371c5111de11a498012cdf3dd00cc882aa.

Revert this patch to enable SE suspend/resume handlers

Bug 200292437
Bug 200298273
Bug 200305065
Bug 200305051

Change-Id: I1be9abd635e269ce8c235f2c7ad6eb36642023b9
Signed-off-by: Shravani Dingari <shravanid@nvidia.com>
Reviewed-on: http://git-master/r/1466588
(cherry picked from commit 0b2321a2672a04287315f73733c8e8e4a424dd77)
Reviewed-on: http://git-master/r/1482867
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agotegra-se: use GFP_DMA instead of GFP_DMA32
Shravani Dingari [Wed, 10 May 2017 05:13:30 +0000 (10:43 +0530)]
tegra-se: use GFP_DMA instead of GFP_DMA32

Use GFP_DMA while allocating dma buffers
as DMA32 flag is depreciated

Bug 200292437

Change-Id: I6ce5608fa9a2eaf313940b6dec35bb0dc255ab54
Signed-off-by: Shravani Dingari <shravanid@nvidia.com>
Reviewed-on: http://git-master/r/1478788
(cherry picked from commit 8f3f1827fa2f846aeec33626ca7bb07f67caff0e)
Reviewed-on: http://git-master/r/1482879
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agoadma: tegra: fix the adma get position
Mohan Kumar [Tue, 16 May 2017 05:59:32 +0000 (11:29 +0530)]
adma: tegra: fix the adma get position

The two adma registers for dma position are read while
adma is transferring data. That might be a case when we
read the second register "TRANSFER_STATUS", the first
register "TRANSFER_DONE_COUNT" gets increment.

Bug 200265734

Change-Id: I252d3b1e384e3aaa937bd7318b0d217abe1e5b41
Signed-off-by: Mohan Kumar <mkumard@nvidia.com>
Reviewed-on: http://git-master/r/1482558
Reviewed-by: Ahung Cheng <ahcheng@nvidia.com>
Tested-by: Ahung Cheng <ahcheng@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com>
6 years agoARM64: config: t186: Enable MTD and TIGON3
Jeetesh Burman [Wed, 17 May 2017 05:56:30 +0000 (11:26 +0530)]
ARM64: config: t186: Enable MTD and TIGON3

Enable below configs to support MTD:

CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_QSPI_FLASH=y
CONFIG_MTD_UBI=m

And enable Broadcom gigabit Etheret PCIe cards:
CONFIG_TIGON3=y

boot.img size is increased by 216680 bytes

Bug 200284769

Change-Id: I716d477a8d973bf0847ba486279543bbc4356656
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/1483677
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agopcie: host: disable AFI dynamic clock gating
Ken Chang [Tue, 25 Apr 2017 04:46:02 +0000 (12:46 +0800)]
pcie: host: disable AFI dynamic clock gating

Override AFI clock enable to disable dynamic clock gating logic.

Bug 1885717
Bug 200285927
Bug 200267819

Change-Id: I15a4f67f0a0fd0fb5d28504f9317a9228fca9531
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: http://git-master/r/1469192
(cherry picked from commit fbacedca8e25ebc5400191156316efc52edc3888)
Reviewed-on: http://git-master/r/1482582
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vidya Sagar <vidyas@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
6 years agoclocksource: arm64: register unsecure timer only
Bo Yan [Thu, 27 Apr 2017 22:59:25 +0000 (15:59 -0700)]
clocksource: arm64: register unsecure timer only

Only register non-secure timer for ARM64 kernel. This is to
eliminate the conflict between kernel and secure OS.

Since ARM kernel can run in secure state, leave it unchanged.

bug 1838070

Change-Id: I1aa9fcaab4c818c6badb3a7040723cf743484fb3
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/1471666
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
(cherry picked from commit 88cb8e8bb6376d28c17df6e580681707a6b5dfa6)
Reviewed-on: http://git-master/r/1484960

6 years agoarm64: config: enable more USB gadget drivers
Stephen Warren [Wed, 19 Apr 2017 16:47:13 +0000 (10:47 -0600)]
arm64: config: enable more USB gadget drivers

This enables all options required to implement the USB protocols that L4T
wishes to expose over the USB flashing port in device mode.

- ACM for serial port access.
- RNDIS for Ethernet access from Windows (or Linux).
- ECM for Ethernet access from MacOS (or Linux).
- Bridge support to bridge the two Ethernet interfaces to a single IP
  address so users don't require different IPs depending on the protocol
  their OS uses. This also simplifies documentation.
- Loop block device support so that the L4T system can also mount the
  filesystem image that is exported over USB Mass Storage.

boot.img size increased by 140384 (T210), 120552 (T186).
(Note: boot.img taken as L4T's Image file, since these are L4T defconfigs)

Bug 1882292

Change-Id: I77cc313dcad505d5d8056c76a55a08a800c676f7
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-on: http://git-master/r/1469845
(cherry picked from commit 0a36077dea7cdedace721b33c38ba9b0c9b69e09 in dev-kernel)
Reviewed-on: http://git-master/r/1484123
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
6 years agoclk: tegra: Fix shared bus connector rate update
Alex Frid [Tue, 25 Apr 2017 01:51:00 +0000 (18:51 -0700)]
clk: tegra: Fix shared bus connector rate update

When connector rate is updated the result cannot be used directly to
set new rate, since it represents only users of this connector, and
does not take into account rates of the sibling connector (if any).
Instead, rate update of the parent (top level bus) should be called
recursively.

Bug 1903909
Bug 200269751

Change-Id: Ic2b36767c3a53c6ed584e4f5199ff4ebdf02e92e
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/1469100
(cherry picked from commit 9c854a599810da951613012a4b461b16cb1d501c)
Reviewed-on: http://git-master/r/1480205
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
6 years agommc: tegra: add nvquirk to skip RTPM forbid call
R Raj Kumar [Tue, 21 Mar 2017 05:06:21 +0000 (10:36 +0530)]
mmc: tegra: add nvquirk to skip RTPM forbid call

Add new nvquirk to skip RTPM forbid call on
t21x platforms.
pm_runtime_forbid() added in driver to ensure
that minimum clk supplied to sdhci instances
even in device shutdown state.

Bug 200296714
Bug 200286161
Bug 200290400

Change-Id: Ieb7da83589381d8c1bbcfd0d79150bc5db09850a
Signed-off-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/1324875
(cherry picked from commit ecfd0ea3e7e2583126c6b24e5ff7726fdcb13b0e)
Reviewed-on: http://git-master/r/1483823
Tested-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
6 years agoplatform: tegra: mc: mcerr: Refactor mcerr code
Krishna Reddy [Wed, 17 May 2017 03:48:05 +0000 (20:48 -0700)]
platform: tegra: mc: mcerr: Refactor mcerr code

Refactor the mcerr code to make the abstraction across SOC's cleaner
and readable.

Bug 1915984

Change-Id: I41ebf722f8e8927389a13a85c581d4be8b5ea3d9
Reviewed-on: http://git-master/r/1473034
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/1483617
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
6 years agoplatform:tegra:camera: changed vi4_init
Hien Goi [Mon, 15 May 2017 21:58:13 +0000 (14:58 -0700)]
platform:tegra:camera: changed vi4_init

-writes to CFG_INTERRUPT_MASK and CFG_INTERRUPT_STATUS were causing
vi master error messages and the writes to stall
-removed those writes in vi4_init as they are not needed
-moved vi4_init below check for bypass

Bug 1906966

Change-Id: I6552eebc8f10e8059bcdf7de4aa883f55d607047
Signed-off-by: Hien Goi <hgoi@nvidia.com>
Reviewed-on: http://git-master/r/1482282
(cherry picked from commit ad0dc28fbd03d005500b5bd3b821c730bcaa4a0e)
Reviewed-on: http://git-master/r/1483480
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nathan Lord <nlord@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agodriver: i2c: Disable dma in I2C-VI by default
Jacob Rampertab [Wed, 10 May 2017 17:54:50 +0000 (10:54 -0700)]
driver: i2c: Disable dma in I2C-VI by default

Sets Dma in I2C-VI driver to disabled by default. Removes double
negative by changing var name.

Bug 200302441

Change-Id: Ic56b760f22bc97c90d3fc1cb7a36f7cf217f5640
Reviewed-on: http://git-master/r/1479306
Tested-by: Jacob Rampertab <jrampertab@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
6 years agomisc: tegra-profiler: fix crash in power_clk stop
Igor Nabirushkin [Fri, 5 May 2017 11:56:59 +0000 (15:56 +0400)]
misc: tegra-profiler: fix crash in power_clk stop

Fix crash in profiler when using gpu and emc clocks: using
the freed clock source can cause the kernel panic.
Remove redundant clk_get_sys calls.

Bug 1918185

Change-Id: I421049c7a30fad6356f7300226e84794cecf0673
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/1476299
(cherry picked from commit 8b0d7e1748b31dd87ab2837a6b9f0a1d2e3d6ecc)
Reviewed-on: http://git-master/r/1482967
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dmitry Antipov <dantipov@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
6 years agoRevert "tegra-profiler: workaround for clks"
Igor Nabirushkin [Tue, 16 May 2017 10:31:40 +0000 (14:31 +0400)]
Revert "tegra-profiler: workaround for clks"

Revert this workaround since the main problem was resolved.
This reverts commit 8c74f1d64dc906ea66ad539ed45b86ac418a5491.

Bug 1918185

Change-Id: I8e30f4d5d4f4706d81fc470e44cd515baa38f613
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/1482966
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dmitry Antipov <dantipov@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
6 years agommc: core: Add power_restore and power_save func
Anubhav [Thu, 6 Apr 2017 11:47:32 +0000 (17:17 +0530)]
mmc: core: Add power_restore and power_save func

-Add definition of power_restore and power_save function.
In power_save function, disabling ESM.

Bug 200215393

Change-Id: Ied94fb95ee30989f5f3f4def05e1c7ac6c8c834b
Signed-off-by: Anubhav <anubhavj@nvidia.com>
Reviewed-on: http://git-master/r/1480648
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
6 years agommc: card: switching form CQ mode to normal mode
Anubhav [Wed, 12 Apr 2017 13:03:44 +0000 (18:33 +0530)]
mmc: card: switching form CQ mode to normal mode

-Since CQ needs to be disabled before invoking FFU, so
switching to normal mode from CQ mode before invoking FFU.

Bug 200215393

Change-Id: Idacf23b4dc16da1a7c1f061b1d35f337350e5107
Signed-off-by: Anubhav <anubhavj@nvidia.com>
Reviewed-on: http://git-master/r/1480647
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
6 years agoarm64: configs: t18x: enable FFU
Anubhav [Tue, 25 Apr 2017 17:27:59 +0000 (22:57 +0530)]
arm64: configs: t18x: enable FFU

boot.img size is increased by 2048 bytes

Bug 200215393

Change-Id: I31446c330258a9ee421f5fed5af95e856eb96191
Signed-off-by: Anubhav <anubhavj@nvidia.com>
Reviewed-on: http://git-master/r/1480646
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
6 years agonet: wireless: bcmdhd: fix buffer overrun in wl_android_set_roampref
Insun Song [Wed, 1 Feb 2017 00:18:40 +0000 (16:18 -0800)]
net: wireless: bcmdhd: fix buffer overrun in wl_android_set_roampref

added boundary check not to override allocated buffer.
Specially when user input corrupted or manipulated.

Signed-off-by: Insun Song <insun.song@broadcom.com>
Change-Id: Id6196da10111517696eda5f186b1e2dd19f66085
Bug: 34469904
Reviewed-on: http://git-master/r/1478926
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Tested-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agonet: wireless: bcmdhd: fix buffer overrun in wlfc reordering
Insun Song [Wed, 25 Jan 2017 19:41:49 +0000 (11:41 -0800)]
net: wireless: bcmdhd: fix buffer overrun in wlfc reordering

added boundary check not to override allocated buffer

Signed-off-by: Insun Song <insun.song@broadcom.com>
Change-Id: Iad44141ba4e4cd224eda292c05ffe525bf74227d
Bug: 34203305
Reviewed-on: http://git-master/r/1478923
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Tested-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agosdcardfs: limit stacking depth
Andrew Chant [Wed, 8 Feb 2017 23:33:48 +0000 (15:33 -0800)]
sdcardfs: limit stacking depth

Limit filesystem stacking to prevent stack overflow.

Bug: 32761463
Change-Id: I8b1462b9c0d6c7f00cf110724ffb17e7f307c51e
Signed-off-by: Andrew Chant <achant@google.com>
Reviewed-on: http://git-master/r/1478888
GVS: Gerrit_Virtual_Submit
Tested-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agonet: wireless: bcmdhd: fix buffer overrun in wl_cfg80211_add_iw_ie
Insun Song [Wed, 1 Feb 2017 03:57:20 +0000 (19:57 -0800)]
net: wireless: bcmdhd: fix buffer overrun in wl_cfg80211_add_iw_ie

added boundary check not to override allocated buffer.

Signed-off-by: Insun Song <insun.song@broadcom.com>
Change-Id: I76211db7ef595fc41cf5d5d58de79cedfe80e521
Bug: 32125310
Reviewed-on: http://git-master/r/1478872
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gagan Grover <ggrover@nvidia.com>
Tested-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agoFROMLIST: CHROMIUM: usb: gadget: configfs: Fix KASAN use-after-free
Jim Lin [Fri, 13 Jan 2017 08:07:58 +0000 (16:07 +0800)]
FROMLIST: CHROMIUM: usb: gadget: configfs: Fix KASAN use-after-free

When gadget is disconnected, running sequence is like this.
. android_work: sent uevent USB_STATE=DISCONNECTED
. Call trace:
  usb_string_copy+0xd0/0x128
  gadget_config_name_configuration_store+0x4
  gadget_config_name_attr_store+0x40/0x50
  configfs_write_file+0x198/0x1f4
  vfs_write+0x100/0x220
  SyS_write+0x58/0xa8
. configfs_composite_unbind
. configfs_composite_bind

In configfs_composite_bind, it has
"cn->strings.s = cn->configuration;"

When usb_string_copy is invoked. it would
allocate memory, copy input string, release previous pointed memory space,
and use new allocated memory.

When gadget is connected, host sends down request to get information.
Call trace:
  usb_gadget_get_string+0xec/0x168
  lookup_string+0x64/0x98
  composite_setup+0xa34/0x1ee8
  android_setup+0xb4/0x140

If gadget is disconnected and connected quickly, in the failed case,
cn->configuration memory has been released by usb_string_copy kfree but
configfs_composite_bind hasn't been run in time to assign new allocated
"cn->configuration" pointer to "cn->strings.s".

When "strlen(s->s) of usb_gadget_get_string is being executed, the dangling
memory is accessed, "BUG: KASAN: use-after-free" error occurs.

BUG=chrome-os-partner:58412
TEST=After smaug device was connected to ubuntu PC host, detached and attached
type-C cable quickly several times without seeing
"BUG: KASAN: use-after-free in usb_gadget_get_string".

Bug 31614969
Change-Id: I58240ee7c55ae8f8fb8597d14f09c5ac07abb032
Signed-off-by: Jim Lin <jilin@nvidia.com>
Signed-off-by: Siqi Lin <siqilin@google.com>
(am from https://chromium-review.googlesource.com/#/c/428059/3)
Reviewed-on: http://git-master/r/1475581
Tested-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agoenable ARCH_HAS_ELF_RANDOMIZE again
Sahara [Sun, 4 Dec 2016 08:50:18 +0000 (12:50 +0400)]
enable ARCH_HAS_ELF_RANDOMIZE again

The patch e4622e4 somehow accidentally removed ARCH_HAS_ELF_RANDOMIZE.
Without this option, arch_mmap_rnd(), called by load_elf_binary(), does
not work properly and just returns 0 instead even though a process has
PF_RANDOMIZE flag. As a result, dynamic program's mmap base is not
randomized at all.

Bug 33351919
Change-Id: Ice2df132dc436b647fa0312dd7453f9ed6160a2a
Signed-off-by: Sahara <keun-o.park@darkmatter.ae>
Reviewed-on: http://git-master/r/1475549
Tested-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agoandroid: fiq_debugger: restrict access to critical commands.
Mark Salyzyn [Tue, 20 Dec 2016 23:59:19 +0000 (15:59 -0800)]
android: fiq_debugger: restrict access to critical commands.

Sysrq must be enabled via /proc/sys/kernel/sysrq as a security
measure to enable various critical fiq debugger commands that
either leak information or can be used as a system attack.

Default disabled, this will leave the reboot, reset, irqs, sleep,
nosleep, console and ps commands.  Reboot and reset commands
will be restricted from taking any parameters.  We will also
switch to showing the limited command set in this mode.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug 32402555
Change-Id: I3f74b1ff5e4971d619bcb37a911fed68fbb538d5
Reviewed-on: http://git-master/r/1475531
Tested-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agonet: wireless: bcmdhd: remove unsed WEXT file.
Insun Song [Wed, 4 Jan 2017 00:21:01 +0000 (16:21 -0800)]
net: wireless: bcmdhd: remove unsed WEXT file.

WEXT API was already obsoleted and should be removed.

Change-Id: Iffb1c81afb9874120c64008c1072eebb8695c65f
Signed-off-by: Insun Song <insun.song@broadcom.com>
Bug 32124445
Reviewed-on: http://git-master/r/1475518
Tested-by: Sunny Li <sunnyl@nvidia.com>
Reviewed-by: Hayden Du <haydend@nvidia.com>
6 years agoARM64: config: t186: Enable BLK_DEV_LOOP
Jeetesh Burman [Fri, 28 Apr 2017 11:13:43 +0000 (16:43 +0530)]
ARM64: config: t186: Enable BLK_DEV_LOOP

Enable CONFIG_BLK_DEV_LOOP to support mount.

Below failure observed without CONFIG_BLK_DEV_LOOP:
mount: /mnt/: mount failed: Unknown error -1

boot.img size not changed.

Bug 200301497

Change-Id: I90ffc26d032408007573bc63ab58fc0cc417891d
Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/1472114
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
6 years agovideo: modedb: update vmode comparision
Naveen Kumar S [Wed, 10 May 2017 11:20:42 +0000 (16:50 +0530)]
video: modedb: update vmode comparision

To select full range quantization, userspace clears
LIMITED_RANGE flag in vmode. This shouldn't lead to
mode mismatch because the modes are still the same
even if LIMITED_RANGE flag doesn't match. Hence ignore
LIMITED_RANGE bit in vmode comparision while finding a
matching mode from modelist.

bug 200306471

Change-Id: I2b30e5232c5e0f2e2100adb674a6706a491d958a
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/1479088
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>