This patch clears previous interrupt and installs interrupt
handler at the end of device probe. Also it enables jack
detection only after handler is installed. This prevents,
false/stale interrupt generation and hence device access
by interrupt handler even before device probe has completed.
Deepak Nibade [Wed, 26 Mar 2014 13:23:14 +0000 (18:53 +0530)]
video: tegra: host: fix memory leaks with firmware
Pointer variables to store fecs and gpccs firmwares are local
variables.
Once firmwares are copied to local buffer, we can release
them with release_firmware() call before returning from function.
Release fecs and gpccs firmwares after copying to
fix memroy leak
tty: serial8250: add break handler quirk for tegra
On tegra,after a break is issued, uart status register
generates FIFOE error rather than the next character
ready status. For that quirk is already present. Hook is added
for the quirk so that sysrq key combination works. This helps
in debugging soft hangs
Eric Brower [Wed, 16 Apr 2014 04:13:21 +0000 (21:13 -0700)]
ARM: tegra12: enable CONFIG_TMPFS_POSIX_ACL
Enable POSIX ACL support for DEVTMPFS; this is
"optional but strongly recommended" by systemd and
required for proper operation of some Linux distributions.
regulator: as3722: sd1 external control only during suspend
If SD1 external control is enabled from boot, it has adverse
effect on power down cycle. Which can lead to long term product
stability. So enable SD1 external control only while going to
to suspend and disable while resuming
ASoc: Tegra: max98090: secondary mic only for t14x
Secondary MIC available in tegra14x platforms only. Hence adding
appropriate conditions.
Also, DMIC3 and DMIC4 are declared for max98091 and not max98090.
map_sg() miscaluculated the number of pages to map where 'offset' and
PAGE_ALIGN was ignored. This patch fixes the ext4 memory corruption
problem when USB is used. This patch was based on Nilesh More's hard
working journey to narrow down the root cause of this problem. This bug
was introduced by the commit:
Shreshtha Sahu [Mon, 24 Mar 2014 06:15:25 +0000 (11:45 +0530)]
arm: tegra12: enable dram temperature only for LPDDR2
This patch disables creating debugfs entry for non
LP DRAM variants. As currently two DRAM variants are
supported i.e. LPDDR2 and DDR3, so it enables dram
temperature entry only for LPDDR2.
Jong Kim [Sat, 5 Apr 2014 00:32:38 +0000 (17:32 -0700)]
video: tegra: hdmi: WAR: emulate hdmi hotoplug
Emulate hotplug to make DVI monitors work through HDMI-to-DVI
dongle. In the last hdmi state, enabled_state, force trigger
hotplug for the HDMi go through clean power off, read EDID,
power on, and configure sequence.
Change-Id: I0d9c3d7e5d1244d677a0d547c68c6cb9f961a956 Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/392977 Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Winnie Hsu <whsu@nvidia.com>
Jong Kim [Tue, 8 Apr 2014 17:39:16 +0000 (10:39 -0700)]
video: tegra: dc: get default mode from EDID
Override hard-coded default HDMI mode with the preferred mode
obtained from EDID read. Since the preferred mode is obtained
dynamically from EDID, the default hard-coded HDMI mode is set
to 640x480 @60Hz, which is universally supported.
Change-Id: I19bc910758015927938fe5dde3e5359a78d905d4 Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/393564 Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Winnie Hsu <whsu@nvidia.com>
Change-Id: Iecff0cabb18743a8d399965fab320ac3683f622a Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/394109 Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: I28f7f9cda4aaa4fbe7d5eb6b7ebcee54a7f492a4 Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/393645 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: Ie7519e1744bb620e54be7a9c9010290a72b941f9 Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/393174 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Jong Kim [Thu, 27 Mar 2014 16:18:58 +0000 (09:18 -0700)]
tegra: T124: HDMI: fix pixel clock setting
- Enhance the HDMI pixel clock setting by determining a better parent
clock rate. Half resolutions for HDMI pclk are not used due to
uneven duty cycle.
- Fix the divider value out of sync problem between two registers,
DISP_DISP_CLOCK_CONTROL and CLK_RST_CONTROLLER_CLK_SOURCE_HDMI, due
to the rounding difference. The clk_set_rate() routine uses round-up,
while the tegra_dc_program_mode() routine uses round-closest. Due to
the DVFS, the frequency determination can not exceed the requested
rate and this means that round-up must be used for divider handling
instead of round-closest.
Change-Id: Ib32e79f96dcd272a392de7f852c3c0285f9c453a Signed-off-by: Sungwook Kim <sungwookk@nvidia.com> Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/366390
(cherry picked from commit 6eb5d7e7b5dcd9a118649e5a8d02e35cf45a4fc6)
Reviewed-on: http://git-master/r/392419 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Pankaj Dabade [Tue, 25 Mar 2014 11:34:58 +0000 (17:04 +0530)]
video: tegra: Check DC connected status
1. Prevent any operations from user-space and tty when no HDMI
device is connected. DC will stay powergated till hotplugged.
2. Virtual Terminal requests blank after blank timeout. If HDMI
isn't connected we shouldn't allow this operation.
Change-Id: I0bd97e62ca059513044bc49b8d8c045610268016 Signed-off-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-on: http://git-master/r/391152 Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: I3186ff3ade97e7655c5c7494efa7c51b6946de5d Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/391649 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Diwakar Tundlam [Tue, 4 Mar 2014 02:11:34 +0000 (18:11 -0800)]
misc: nct1008: avoid reading bogus temperature
Added a check for temperature above max value and return error when
that happens to avoid showing insane temperature values to user. Bogus
temperature readout happens rarely due to the NCT device still being
initialized and unprepared while interrupts happen.
Diwakar Tundlam [Fri, 7 Mar 2014 01:47:19 +0000 (17:47 -0800)]
misc: nct1008: change overheat enable message
Avoid using the word 'warning' in the log message that reports
successful setup of the overheat warning message. This confuses
tests that scan for errors and warnings on console.
Also changed the level of the message to pr_debug.
Pankaj Dabade [Thu, 20 Mar 2014 08:47:27 +0000 (14:17 +0530)]
video: tegra: fb: Keep old mode list
Keeping the old mode list and framebuffer console is storing a
video mode pointer pointing to one of the modes in modelist.
Adding enable function to enable DC when hotplug succeeds.
Change-Id: I8df5c6e79933e1c9c01f35ae7938bfd360fce88f Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/384705 Tested-by: Mike Thompson <mikthompson@nvidia.com> Reviewed-by: Eric Brower <ebrower@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: Ic7cdae2afa43751b3ba045f08c62dbb2c36b6562 Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/382467 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: I027e83cde9a37e244c473b35179cf1fe529ed9af Signed-off-by: Jeetesh Burman <jburman@nvidia.com>
Reviewed-on: http://git-master/r/368728
Cherry-picked from 1217dac9195728b160e01749a222882d7519386c
Reviewed-on: http://git-master/r/376564 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: Ia9d1a97a1b89b48538010d74207ff4d1b8852083 Signed-off-by: Ken Adams <kadams@nvidia.com>
Reviewed-on: http://git-master/r/375772
(cherry picked from commit c3c7d8b60f62bc276d0e773994ea6e0a4d9422cb)
Reviewed-on: http://git-master/r/382743
GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: I18274097fddaab0a15a8ad59f1d23f9e974a50e7 Signed-off-by: Ken Adams <kadams@nvidia.com>
Reviewed-on: http://git-master/r/375651
(cherry picked from commit afd7fec44674af2569ac6443cf245e25786cc335)
Reviewed-on: http://git-master/r/376912
GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Arto Merilainen [Fri, 7 Mar 2014 07:03:47 +0000 (09:03 +0200)]
video: tegra: host: gk20a: Fix deferred mmu fault
Deferred MMU fault did not clear stored mmu_fault_engines variable
and this caused the MMU fault handler to handle subsequent MMU fault
as a fake fault.
This patch modifies the code so that we clear the mmu_fault_engines
variable if we need to continue fault handling on channel tear down.
Change-Id: Ia07b86a03e2457b192095b0bb01cc7ee900641d7 Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/381774 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: I8d1bcac377a730ac25c0a4d4814e510be4136384 Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/381773 Reviewed-by: Eric Brower <ebrower@nvidia.com>
GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: I0fdb3c0ce1a1eccdd893e417b2caecb696fb166f Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/378839 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Jong Kim [Fri, 14 Mar 2014 01:21:49 +0000 (18:21 -0700)]
arm: tegra: HDMI: set 1080p as default mode
Set 1920x1080 as default HDMI FBcon mode.
1080p is the current working common denominator for FBcon and
X11 without any anormally.
This change is the step 1 of ultimate fix for HDMI/DISPB clock
setting which is required for HDMI mode change from Ubuntu
desktop GUI.
Signed-off-by: Preetham Chandru R <pchandru@nvidia.com> Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Change-Id: I950c55361e305f10944a2210a5b30a69dea52397
Reviewed-on: http://git-master/r/377877 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Bryan Wu [Fri, 21 Feb 2014 18:45:03 +0000 (10:45 -0800)]
driver: vi: tegra_camera: correct pdev->id for DT
DT will initialize the pdev->id as -1 for both vi.0 and vi.1. This
will cause several subtle issues since checking pdev->id is used a
in VI and Tegra V4L2 camera drivers.
Set the pdev->id as the right value during probing for DT case. Then
no change is need for others
Change-Id: I2e0f660556ad175205f173ca28195ac788eca08b Signed-off-by: Jong Kim <jongk@nvidia.com> Signed-off-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-on: http://git-master/r/377514
GVS: Gerrit_Virtual_Submit Reviewed-by: Eric Brower <ebrower@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Change-Id: If114019772cff529716575456ad6dd71e871ba5d Signed-off-by: Arun G <arg@nvidia.com>
Reviewed-on: http://git-master/r/376171 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Naveen Kumar S [Fri, 21 Feb 2014 11:44:38 +0000 (17:14 +0530)]
video: tegra: host: gk20a: Do not defer ELPG init
Currently the second phase of PMU initialisation runs asynchronously
with other code. This optimises the boot-up time, however, it may
cause unexpected race in PMU code as some functions are called while
the ELPG is still being initialised.
This patch modifies the ELPG initialisation to happen synchronously
as part of power on sequence.
Pankaj Dabade [Fri, 14 Feb 2014 06:04:23 +0000 (11:34 +0530)]
video: tegra: dc: check DC suspend state
Check DC suspended state before updating window.
DC suspend function will disable dc but will only change
suspend status to true, while the enable status will
remain true. DC will be enabled by dc resume function.
Prashant Malani [Tue, 4 Feb 2014 20:39:45 +0000 (12:39 -0800)]
video: tegra: gk20a: Fix protected elpg race.
Protected elpg calls can be pre-empted in the middle by the deferred
pg_init. This can lead to refcounting errors, which will result in elpg
always remaining on.
Therefore we protect the relevant sections of elpg setup in the deferred
work with a mutex.
Neil Gabriel [Tue, 21 Jan 2014 18:03:59 +0000 (12:03 -0600)]
Attempt kernel firmware load before going to udev.
request_firmware() should fall back to usermodehelper
routines to load firmware only after a failed attempt
to load it directly. Prior to this change, the code
will attempt to lock the usermodehelper state before
attempting to load the firmware directly. If the
usermodehelper is disabled, the lock attempts will
fail and request_firmware() will exit without even
attempting a direct load.
Commit 5ffea6f ["CHROMIUM: PM/domains: add delayed power off capability"]
introduced the ability to defer the power-off of a power domain and
used a PM notifier to flush any delayed power-off work for a power
domain. The PM notifiers, however, run before tasks are frozen and
outstanding runtime PM requests are flushed. A runtime resume may
run during this time scheduling a delayed power-off which may not run
until after pm_genpd_prepare(), where the state of the domain at suspend
is recorded. As a result, a device which expected to be powered off
across suspend may be powered up unexpectedly during resume because
pm_genpd_prepare() recorded the state of the device as on at suspend.
Fix this race by flushing delayed power-off work in pm_genpd_prepare()
instead.
Arto Merilainen [Mon, 25 Nov 2013 14:10:54 +0000 (16:10 +0200)]
Revert "video: tegra: host: gk20a: Do not suspend if active"
This reverts commit 63078e87a62b265111622e58e66d9e67a2e1519b. The
original patch was added to protect kernel from applications that
injected jobs just after pm had suspended the device. This lead
the bookkeeping to get mixed as some callbacks were not called
correctly before the device was suspended.
We have now revisited the suspend sequences and identified that
we actually used to use some callbacks in a wrong way and the
original patch was simply a workaround to hide the issue. Now
that the issues are fixed, we can safely remove the hack.