Revert "ARM: tegra: clock: Don't fail clk_enable when max_rate has been lowered"

This reverts commit 8d351aa5478de533114e614f2607bc85ed23df91.

The above commit introduced recursive call of clk enable/set rate APIs
that may hang the system.

Change-Id: I04eff9e1c3ddee82f6d2e17690122cc41fad203f
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/100710
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
video: tegra: host: Add context switch to trace dump

Add context switch to the ftrace dump.

Change-Id: I5df032273982b919fb94263cff38d8b8b6b6be45
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/101523
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: host: Add syncpt trace events

Add trace events for updating the syncpt value from hardware, and
wait check.

Change-Id: If17de153ae36c0665fe0af2f405dfe42f7fcd656
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/101524
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Ken Adams <kadams@nvidia.com>
video: tegra: dc: Add display feature table support.

Add display feature table so that user and kernel could set and
update window attributes properly.

Bug 962353

Change-Id: I08490a225892660126f3eefe4d5b7a4bb61d9bf7
Signed-off-by: Kevin Huang <kevinh@nvidia.com>
Reviewed-on: http://git-master/r/101078
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
media: video: tegra: ov5640: add support

add ov5640 yuv sensor support - initial.

bug 921322

Change-Id: I813afa8963e39afe475f9fdd43152cfaf1a16ae1
Signed-off-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-on: http://git-master/r/99506
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
video: tegra: host: move chip_support out of nvhost_master

- currently, nvhost_master holds the reference to struct
chip_support
- the struct chip_support hides the chip specific implementation
for channel submit, cdma, push buffer operations etc. so
it exposed all the internal structures through nvhost_master
- move chip_support to be a part of nvhost_bus since it only has
function pointers to chip specific api implementations
- nvhost_master is host1x device specific private data so
ideally it should not hold reference to chip specifics

Bug 871237

Change-Id: I4f3f48ee5fc47a90288d110ea8eef905150275a0
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/94421
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
video: tegra: implement HOST1X syncpt init
Revert "ARM: tegra: clock: Add DSI implicit dependency on PLLP"

This reverts commit 215de8c40083469c24c93afd661320230c28516f.
video: tegra: dsi: WAR to stop on going host write

WAR comprises of soft reset dsi controller followed by
explicitly clearing host trigger.

Bug 982919

Change-Id: Ia8c497dd496435e429cd5b5ee8aaf1b7d78dc797
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/102204
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
video: tegra: dc: correct dc initialisation sequence

-Move _tegra_dc_enable to before irq_request and remove
 disable_dc_irq.
-It will remove warning of "IRQ when DC not powered!".

Bug 955184

Change-Id: If9b039f3f1635d92f10bfc54af08101972fc3d57
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/101498
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
video: tegra: dc: remove obsolete IRQF_DISABLED

Bug 955184

Change-Id: I7ac0a290c2b6acd454de05d094bd676b88f4b476
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/101546
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
video: tegra: dc: make functions static in rgb.c

Use static for functions that are not called externally.

Change-Id: Iacccb83e31e860d10f92897041421298231e45b1
Reviewed-on: http://git-master/r/102623
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Tested-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
video: tegra: dc: fix build warnings

Makes function pointer type for mode_filter match the function in hdmi.c

Change-Id: Id61f319a4ddef003b79782391e9e7f2f8cb32dda
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/102630
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shashank Sharma <shashanks@nvidia.com>
video: tegra: dc: add list of preferred formats

Move WinB's format limitations to a list of preferred formats.

Bug 985197

Change-Id: Ife37c79441b2737592ace51e94ab0c80af4af917
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/102629
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Chao Xu <cxu@nvidia.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Michael Frydrych <mfrydrych@nvidia.com>
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
ARM: tegra: power: Don't enable auto-hotplug as PM QoS side-effect

On Tegra3, if PM QoS hotplug request is received when auto-hotplug
is disabled, do not enable auto-hotplug as side effect of the
request.

Change-Id: I8928d9ecd22e2d2df5fe60274fed30da0c565b47
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/102118
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
video: tegra: host: remove nvhost_channel from nvhost_master

- nvhost_master holds a reference to all the channels for
a chip architecture
- however, nvhost_master is a private data of host1x hardware
device. so it should contain only members needed by host1x
hardware device
- add chip specific apis to allocate and free channels
- this will also help to remove the static binding between
nvhost_device and a channel per SoC in future

Bug 871237

Change-Id: I2148db57b995b4cb60954ebb6e670f588552eca4
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/91687
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
video: tegra: host: Do not panic on hardware timeout

nvhost panics if hardware does not respond within 30 seconds. Remove
this behavior, as it causes problems in emulation and simulation.
Panic should be used only to prevent corruption.

Submits are now given a default timeout of 30 seconds. The clients
can still override with their own timeout value.

MPE doesn't provide the number of slots for context save/restore.
This information is needed to be able to use the submit timeout for
MPE.

Bug 982946

Change-Id: I0f54d639df0fb726cc3163b317bf9c90bf56798b
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/100246
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
video: tegra: host: Simplify robustness

nvhost attempts to purge all buffers from timed out contexts. This is
very error prone, and not necessary. Change behavior so that only the
hung job, and the immediately following jobs from same context are
purged. This simplifies code, and corrects bug where the push buffer
modifications caused panics.

Bug 982946

Change-Id: Ifb26484cf02ef40f8d5b20338eebc0a731f453cf
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/102234
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
video: tegra: host: Yield in case of race of waits

If two threads need to wait for CDMA to become quiet at the same
time, the second one will cause a BUG(). Replace the BUG() with a
code to yield and try again.

Change-Id: I7925ad0cc0e8292919e54d0fa45f7837f453358d
Reviewed-on: http://git-master/r/102437
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
GVS: Gerrit_Virtual_Submit
mac80211: handle SMPS action frames

When a peer changes SMPS state we should update
rate control so it doesn't have to detect it by
itself. It can't detect "dynamic" mode anyway
since that just requires rts-cts handshaking.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>