Call dc_hdmi_mode_filter to validate a videomode. X prepares its
own modedb of supported HDMI modes, but all of them may not be
supported from the HDMI driver. This call makes sure a X-mode is
listed only if supported in DC driver.
Set default videomode during the dc probe. This patch enables
HDMI during the probe only and fixes following issues:
1. Until Xinit there was no display on HDMI.
2. Framebuffer console on HDMI needs it to be enabled well before
Xinit.
To avoide un-necessary powering on HDMI,Check HPD and enable HDMI
only if it's present.
Ramalingam C [Fri, 4 May 2012 06:27:55 +0000 (11:57 +0530)]
mmc: host: loglevel of a message to KERN_INFO
Some boards don't have a vddio regulator for few rails hence not getting
the regulator handle. And we assume that those rails are always powered.
Hence rephrased the error message and lowered the loglevel to KERN_INFO.
bluetooth: tibluesleep: clean up tibluesleep driver
Remove UART clock enable code, as UART clock gating is not
needed in tibluesleep driver.
Remove un-wanted tasklets, workqueues and wakelocks
Remove extra lines and spaces
Varun Wadekar [Wed, 9 May 2012 09:22:26 +0000 (14:52 +0530)]
power: earlysuspend: suspend if user space is still asleep after resume
There are cases (Android alarms to perform some housekeeping) where the
user space is not awake while resume and we need to suspend the device
again in such scenarios. Schedule a delayed work to take care of this
scenario, which checks if the device state has changed due to late_resume
and if not, then suspends the device again.
Since we do not use wakelocks.c any more, PowerManagerService is not able
to get a wake_lock upon resume which it can play with. We do not want to
get wakelocks.c back again, and this code takes care of the earlier
suspend-resume scenario.
Tested with LowPowerTest_Cmd_Display_On.apk and passed 100 iterations.
Steve Kuo [Fri, 30 Mar 2012 07:00:38 +0000 (15:00 +0800)]
mfd: tps80031: fix missed irq issue
We found missed irq could be happened if clear all INT_STS_x register in one time.
Shadow register pushes the irq status after the first byte of INT_STS_x was cleared
The proposed way to clear interrupt is to write only one INT_STS_x register.
It will also clear the other two ones.
It is reviewed on http://git-master/r/99635
It will cause HDMI power ON and emc clock bump up to 667Mhz
after resume from LP0.
bug 930136
Change-Id: I130494fdb381b3d322ac0e3fc8be2e44f2c2d7a7 Signed-off-by: Hunk Lin <hulin@nvidia.com>
Reviewed-on: http://git-master/r/100202 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com>
gpio: tegra: implement gpio_request and gpio_free.
Recent pinctrl discussions concluded that gpiolib APIs
should in fact do whatever is required to mux a GPIO onto
pins.
This change is based on the work done by Stephen Warren in mainline
kernel.
-----
commit 3e215d0a19c2a0c389bd9117573b6dd8e46f96a8
gpio: tegra: Hide tegra_gpio_enable/disable()
Recent pinctrl discussions concluded that gpiolib APIs should in fact do
whatever is required to mux a GPIO onto pins, by calling pinctrl APIs if
required. This change implements this for the Tegra GPIO driver, and removes
calls to the Tegra-specific APIs from drivers and board files.
----
Alex Frid [Fri, 4 May 2012 14:31:32 +0000 (20:01 +0530)]
ARM: tegra: clock: Add DSI implicit dependency on PLLP
Added dsi fixed clock entry derived from PLLP_OUT3. This would allow
DC driver to properly ref-count implicit dependency of DSI operations
on PLLP_OUT3 clock.
Set window enabled flag in pan display. This fixes a blank
window display while switching console from dc_ext device to
framebuffer device, and allows dc_ext and fbdev to co-exist.
Removed previous work around to unblank fb from
tegra_dc_blank function.
Bug: 970263
Bug: 963480
Change-Id: I9853da211f78815246965d240d1717345c5ab391 Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-on: http://git-master/r/99422 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Kiran Adduri <kadduri@nvidia.com> Reviewed-by: Allen Martin <amartin@nvidia.com>
asoc: codecs: spdif: Add support for setting bias level
Allow setting bias level to turn off clock extern1 on KAI when
codec is idle. Added a dummy widgets to make the target_bias_level
to BIAS_OFF as per required by the new ALSA kernel.
Bug 964287
Change-Id: I628744040866a9879eedc41ed4ee25af38ed86fb Signed-off-by: Manoj Gangwal <mgangwal@nvidia.com>
Reviewed-on: http://git-master/r/99667 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Hunk Lin <hulin@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com>
Set default videomode during the dc probe. This patch enables
HDMI during the probe only and fixes following issues:
1. Until Xinit there was no display on HDMI.
2. Framebuffer console on HDMI needs it to be enabled well before
Xinit.
Add a trace event for powergating. The existing power_domain_target is used.
state 0 is used for off and state 1 is used for on. This patch only traces
non CPU domains. The powerstate of CPU domains is already traced using
power_start events.
bug 976845
Change-Id: Ic9503f7b42b35c0bf70c7b64a7f15c4960637200 Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-on: http://git-master/r/99416 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Antti Miettinen <amiettinen@nvidia.com> Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
- Abort initialization if an I2C error to avoid excessive load on the I2C bus
since it is heavily used during initialization.
- Updated to the latest NVC framework.
- Added feature that allows for the key focus points to be set at runtime
and the relative positions recalculated.
Erik Lilliebjerg [Mon, 26 Mar 2012 15:45:01 +0000 (08:45 -0700)]
arm: tegra: sh532u focuser board support
Enabling the sh532u driver feature to not register itself
if it does not identify the sh532u device during probe.
This is for the case where the platform does not populate
the device.
Jihoon Bang [Tue, 14 Feb 2012 02:00:13 +0000 (18:00 -0800)]
media: video: tegra: ar0832: adjust frame rate
Change line_length for 1080p mode in order to change
frame rate from 31.30 to 29.50 fps.
The reason that new fps is not 30 is because flicker
detection requires fps not to be multiples of 60/50Hz.
This change helps save power and lower the chance of frame
drop.
Steve Lin [Tue, 3 Apr 2012 23:50:21 +0000 (16:50 -0700)]
arm: tegra: baseband: Discard modem remote wakeup in L3 transition
There is race between USB autopm and system PM. The device's upstream
port may not be ready if USB autopm is triggered by modem remote wakeup
GPIO during the L3 to L0 or L0/L2 to L3 transition.
Change-Id: I1a9c2dadb530144aa8741370247272b6962fe777 Signed-off-by: Steve Lin <stlin@nvidia.com>
Reviewed-on: http://git-master/r/96593 Reviewed-by: Automatic_Commit_Validation_User
ALSA: HDA: set max_channel only based on LPCM capability
Set maximum supported channels of HDA driver based on the LPCM channel
capability of the HDMI device. This is needed because user space
decides number of PCM channels to be sent to kernel based on this
information.
Moved SCLK shared users initialization from silicon only section
of init table to common silicon/emulation section - there is no
reason to limit this settings to silicon only.
ASoC: Tegra: Pass snd_soc_card handle in tegra_asoc_utils_init
Change prototype of tegra_asoc_utils_init to pass snd_soc_card handle.
It is needed to move common tegra machine driver codes to
tegra_asoc_utils interface.
Andy Carman [Wed, 7 Mar 2012 05:25:18 +0000 (10:55 +0530)]
usb: otg: tegra: change logic for enable clock
When there is PMU interrupt we need to enable controller
clock. For this currently, work is being schedule, removing
this as clock can be enabled directly without scheduling
any work.
bug 925958
bug 941899
Signed-off-by: Andy Carman <acarman@nvidia.com> Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/88777
(cherry picked from commit fc31c04b7124f30970e862dd1b21a97d18dca38e)
Terje Bergstrom [Mon, 5 Mar 2012 07:02:30 +0000 (09:02 +0200)]
video: tegra: host: Reset 3D after power on
Sometimes 3D unit comes up with incorrect scissor configuration.
Earlier patch added the scissor registers to the context save list,
but that did not solve the problem. Remove the extra registers, and
reset 3D after powering it up.
- master SoC pinmux table subtracts the reg base (for mux, tri-state &
pull-up/down). this is because, its platform data/device tree binding
adds APB base with the reg base
- however, pinmux driver has checks which results in treating reg base of
0 as invalid. thus, during boot-up pinmux/tristate/pull-up/down
registers are not set correctly as per the setting in board file
- as a result, settings are good for base regs != 0 & hence some things work
while others not
- this is revert of commit 8791f084fb6ebbd8ba2ca1c8c09cfaba1fde88c6
as the master SoC pin-mux table format is changed
PM / Freezer / Docs: Update documentation about freezing of tasks
The file Documentation/power/freezing-of-tasks.txt was still referencing
the TIF_FREEZE flag, that was removed by the commit d88e4cb67197d007fb778d62fe17360e970d5bfa(freezer: remove now unused
TIF_FREEZE).
This patch removes all the references of TIF_FREEZE that were left
behind.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Bojan Smojver [Tue, 24 Apr 2012 21:53:28 +0000 (23:53 +0200)]
PM / Hibernate: fix the number of pages used for hibernate/thaw buffering
Hibernation regression fix, since 3.2.
Calculate the number of required free pages based on non-high memory
pages only, because that is where the buffers will come from.
Commit 081a9d043c983f161b78fdc4671324d1342b86bc introduced a new buffer
page allocation logic during hibernation, in order to improve the
performance. The amount of pages allocated was calculated based on total
amount of pages available, although only non-high memory pages are
usable for this purpose. This caused hibernation code to attempt to over
allocate pages on platforms that have high memory, which led to hangs.
Signed-off-by: Bojan Smojver <bojan@rexursive.com> Signed-off-by: Rafael J. Wysocki <rjw@suse.de>
autofs: make the autofsv5 packet file descriptor use a packetized pipe
The autofs packet size has had a very unfortunate size problem on x86:
because the alignment of 'u64' differs in 32-bit and 64-bit modes, and
because the packet data was not 8-byte aligned, the size of the autofsv5
packet structure differed between 32-bit and 64-bit modes despite
looking otherwise identical (300 vs 304 bytes respectively).
We first fixed that up by making the 64-bit compat mode know about this
problem in commit a32744d4abae ("autofs: work around unhappy compat
problem on x86-64"), and that made a 32-bit 'systemd' work happily on a
64-bit kernel because everything then worked the same way as on a 32-bit
kernel.
But it turned out that 'automount' had actually known and worked around
this problem in user space, so fixing the kernel to do the proper 32-bit
compatibility handling actually *broke* 32-bit automount on a 64-bit
kernel, because it knew that the packet sizes were wrong and expected
those incorrect sizes.
As a result, we ended up reverting that compatibility mode fix, and
thus breaking systemd again, in commit fcbf94b9dedd.
With both automount and systemd doing a single read() system call, and
verifying that they get *exactly* the size they expect but using
different sizes, it seemed that fixing one of them inevitably seemed to
break the other. At one point, a patch I seriously considered applying
from Michael Tokarev did a "strcmp()" to see if it was automount that
was doing the operation. Ugly, ugly.
However, a prettier solution exists now thanks to the packetized pipe
mode. By marking the communication pipe as being packetized (by simply
setting the O_DIRECT flag), we can always just write the bigger packet
size, and if user-space does a smaller read, it will just get that
partial end result and the extra alignment padding will simply be thrown
away.
This makes both automount and systemd happy, since they now get the size
they asked for, and the kernel side of autofs simply no longer needs to
care - it could pad out the packet arbitrarily.
Of course, if there is some *other* user of autofs (please, please,
please tell me it ain't so - and we haven't heard of any) that tries to
read the packets with multiple writes, that other user will now be
broken - the whole point of the packetized mode is that one system call
gets exactly one packet, and you cannot read a packet in pieces.
Tested-by: Michael Tokarev <mjt@tls.msk.ru> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: David Miller <davem@davemloft.net> Cc: Ian Kent <raven@themaw.net> Cc: Thomas Meyer <thomas@m3y3r.de> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The actual internal pipe implementation is already really about
individual packets (called "pipe buffers"), and this simply exposes that
as a special packetized mode.
When we are in the packetized mode (marked by O_DIRECT as suggested by
Alan Cox), a write() on a pipe will not merge the new data with previous
writes, so each write will get a pipe buffer of its own. The pipe
buffer is then marked with the PIPE_BUF_FLAG_PACKET flag, which in turn
will tell the reader side to break the read at that boundary (and throw
away any partial packet contents that do not fit in the read buffer).
End result: as long as you do writes less than PIPE_BUF in size (so that
the pipe doesn't have to split them up), you can now treat the pipe as a
packet interface, where each read() system call will read one packet at
a time. You can just use a sufficiently big read buffer (PIPE_BUF is
sufficient, since bigger than that doesn't guarantee atomicity anyway),
and the return value of the read() will naturally give you the size of
the packet.
NOTE! We do not support zero-sized packets, and zero-sized reads and
writes to a pipe continue to be no-ops. Also note that big packets will
currently be split at write time, but that the size at which that
happens is not really specified (except that it's bigger than PIPE_BUF).
Currently that limit is the system page size, but we might want to
explicitly support bigger packets some day.
The main user for this is going to be the autofs packet interface,
allowing us to stop having to care so deeply about exact packet sizes
(which have had bugs with 32/64-bit compatibility modes). But user
space can create packetized pipes with "pipe2(fd, O_DIRECT)", which will
fail with an EINVAL on kernels that do not support this interface.
Tested-by: Michael Tokarev <mjt@tls.msk.ru> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: David Miller <davem@davemloft.net> Cc: Ian Kent <raven@themaw.net> Cc: Thomas Meyer <thomas@m3y3r.de> Cc: stable@kernel.org # needed for systemd/autofs interaction fix Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>