Once again interactive 3.4

This reverts commit 97a6365fa60ae14a0dd743a4fffa7a6785dfcc94.

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c
A little tweak
makefile: fix module loading when building with linaro
Ondemand tweaks
mm: Fix incorrect cache attribute restoration.

armv7 uses cache policy as WRITEALLOC. CPA is
restoring the cache attributes to WRITEBACK during
set_pages_array_wb().
Fixed issues in pmd to pte prot translation and vice versa.

Change-Id: I8406b784f62d559f657ef7bc08e77c83ac6e5690
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/122472
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
tegra_pcm: support audio up to 32bits
ARM: tegra: lp0 WAKE2 status clear

Tegra pmc WAKE2 status registers also need to be cleared
before re-entering lp0 mode.

Change-Id: I1bd5c48baf86ba23d0352594e97c360d363ce991
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/121185
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
video: tegra: host: Fix section mismatches

nvhost context related functions were in init section, even though
they are called from non-init functions.

Bug 1022681

Change-Id: Ie85e9dd3f19873aec4153e34c7bffa19f40d37fa
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/120884
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
video: tegra: host: Disable host1x irqs at suspend

host1x interrupts have been left on at suspend due to using wrong
constant for the interrupt register. Disable host1x interrupts at
suspend.

Change-Id: I915fc4e663e6ad90fccacff6fb223c5080e21fcd
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/123055
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Andrew Howe <ahowe@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: nvmap: Add support for zeroed pages

Add support to alloc zeroed pages for user space alloc requests. Also
define a config option to force userspace allocation requests to be
zeroed.

Change-Id: I75d3b2bc36e808f1470b423578ec4cba99e0f967
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/122549
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
video: tegra: host: Fix leak in 3D register read

When 3D register is read, and we need to do a context switch, the old
context reference is incremented, but it never gets decremented. Fix
by using nvhost_job_get_hwctx() to acquire the reference.

Bug 1031746

Change-Id: Ic72637cb2399f960e2297733bfe45e585a8ec180
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/123678
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
GVS: Gerrit_Virtual_Submit
video: tegra: nvmap: Add sanity checks for page pools.

Check return code for set_page_array_* calls.

Change-Id: Ie62ac78b82321939d5bd9d2a636d72dadea50d28
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/123544
video: tegra: nvmap: Fix overflow in nvmap_heap

do_heap_alloc locates a suitable free block from a nvmap heap given a
size and alignment. Unfortunately, if a heap block happens to be
smaller than the alignment passed to the function, an integer overflow
will occur, and a block that's too small gets accidentally returned.

Bug 1032642

Change-Id: Ic650c520409134d753e968f62f144ddeb065ccc7
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/123076
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
video: tegra: dc: Make framebuffer console init OK

Update framebuffer's modelist after we changed it's fb_var_screeninfo.
This makes sure the framebuffer console can be inited successfully.
During framebuffer console init, it'll check whether the var info of
the framebuffer is consistent with the modelist.
Unsuccessful init of framebuffer console driver makes VT driver
doesn't work in right way.

Bug 996992

Signed-off-by: Mark Zhang <markz@nvidia.com>
Change-Id: I96a1db1f389be75dcba48b20447cf1510ad3768b
Reviewed-on: http://git-master/r/107866
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shashank Sharma <shashanks@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
video: tegra: host: Clear intr list at intr_put

Process wait list when removing a waiter. This clears the interrupt
once it is no longer needed.

Bug 1031724

Change-Id: Ifb46672f70c8bbd6359d0a8aeaac0d718a5394b2
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/125230
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: dc: fix boot issue with HDMI

Set default mode for probe and resume to enable initialization of dc.1
Skipping this initialization results in hard system hang.

bug 1030415

Reviewed-on: http://git-master/r/124001
(cherry picked from commit 50fa5e50b74a0534d7524fb6d7dcaa65b2e6e74c)

Change-Id: Id9ad95e114a27c1667f0286443534a23b7fa64d4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/128533
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
video: tegra: fb: Configure dc from fb

This patch contains following changes:
1. Modify tegra_fb_update_monspecs to select best mode to apply
   on framebuffer, in HDMI hotplug.
2. Add a console_lock to prevent corruption while fbcon running
   in multiple threads.
3. Add a tegra_dc_disable/enable in tegra_fb_set_par to reflect
   the programmed new mode applied on DC.

Bug: 1005399
Change-Id: I133b38b00f25f767afc05549550fecde8d092fb2
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-on: http://git-master/r/120932
(cherry picked from commit ec7552ef36c0d0979cb31db6d2d4bd54e7f1c9fb)
Reviewed-on: http://git-master/r/140031
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
arm: tegra: fb: Apply new mode even if its current

Set activation of a mode forcefully via setting FB_ACTIVATE_FORCE
flag. Required for stereo modes also.

Bug 1005399
Change-Id: I37872cc2a04abc8774a5f9f9df7d9e90f2c977f6
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-on: http://git-master/r/122087
(cherry picked from commit 80a7b7b2d10a97427e12884d469a518cc2b5f765)
Reviewed-on: http://git-master/r/140033
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
arm: tegra: fb: Update fix line_length

Update framebuffer's fix line_length parameter when changing
video mode dynamically.The new line_length should be according
to new x resolution. On addition, check the return value from
dc driver while setting a mode.

Bug 1163682
Bug 1056767
Bug 1056782
Signed-off-by: Shashank Sharma <shashanks@nvidia.com>
Change-Id: Ib0ab48474f0af3235556a7f7f0d8354af3b50994
Reviewed-on: http://git-master/r/147511
(cherry picked from commit 5856c4afde9459ba6afaf2cdcb07361d9fbf8c79)
Reviewed-on: http://git-master/r/160788
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
media: video: nvavp: Add bsea/vcp clocks for Audio

1) Enable bsea/vcp clocks for Audio support by ioctl
2) Send kernel event NVE276_OS_INTERRUPT_APP_NOTIFY
to user space
3) Suspend Resume support

bug 964514

Change-Id: I72fb790baa093b4bcd99a128c886dc049fa0fbb6
Signed-off-by: Vandana Salve <vsalve@nvidia.com>
Reviewed-on: http://git-master/r/108493
cherry picked from commit 4432c5fa5e9072ff019d994f3bc8239bd34ddad1
Reviewed-on: http://git-master/r/114589
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>