Revert "PM / Sleep: Use wait queue to signal "no wakeup events in progress""

This reverts commit 43c8e139f7343a147aae25fdebaf0764aee64210.
Revert "PM / Sleep: Look for wakeup events in later stages of device suspend"

This reverts commit e19eaa514a259df59c6e1660240c84a98b141139.
video: tegra: host: add per device module-reg-read-write ioctl

- currently, the ioctl NVHOST_IOCTL_CTRL_MODULE_REGRDWR is
a part of nvhost-ctrl node
- however, it doesn't deal with host1x. infact it read/write
actual module registers
- for this kernel needs to maintain a list of all nvhost_devices
registered for a SoC. currently, this is encapsulated within
nvhost_bus which provides a iterator to walk these device list
- however, once we phase out nvhost_bus and adopt the platform_bus
we do not have a way to know the list of these devices
- this commit adds a new per-device ioctl for module register
read-write functionality
- all the new code should be using this new per device ioctl. the
old will be removed as soon as all the clients are ready to use
new ioctl

bug 1154790

Change-Id: I0552aec61a4506243461de82ac0cf6e4c1f3b220
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/141579
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
video: tegra: nvmap: Introduce dma-buf exporter

Based on Terje's host nvmap exporter.

Change-Id: I9627ac9c4fc838f2e2c5c95b6972aa6185be7d6b
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Cc: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/133500
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
scatterlist: add sg_alloc_table_from_pages
video: tegra: nvmap: fix cache_maint leak

Under certain error conditions, nvmap's cache_maint would do an early
return while holding an incremented refcount and an allocated pte,
causing leaks.

Bug 1042888

Change-Id: Ie6d557f5678e7475cf46c1524a43ed464502e94c
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/131887
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
video: tegra: nvmap: fix pinning unalloc'd handles

nvmap_pin_ids takes a list of handles to pin from userspace.
Unfortunately, it does not check that the handles are actually
allocated, which will trigger a BUG_ON later in pin_locked().

Bug 1023954

Change-Id: Iba4c53bc0a6c47b7f4f740a93e59b613dc3b95f6
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/131888
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
video: tegra: nvmap: Add pin, unpin trace events

Change-Id: I62deda9d607476e3dc82428b872ad1a3e396e37e
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/143421
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
video: tegra: remove unsigned variable comparison with zero

Conflicts:

	drivers/video/tegra/dc/dsi.c
video: tegra: backport tegra 4 SCAN_COLUMN support
video: tegra: enable cp with global alpha
video: tegra: implement 2d power gating
video: tegra: introduce CMU support from tegra 4

Conflicts:

	arch/arm/mach-tegra/include/mach/dc.h
video: tegra: dc: fix swap of window output dimensions

Window position is expected in output/device coordinate
system. Window dimensions, however, were intepreted as being
in source coordinate system, which made intepretation of window
dimensions dependent on TEGRA_WIN_FLAG_SCAN_COLUMN
flag. The flag is bond to reading the source and should not
affect window content positioning on screen.

Signed-off-by: Michael Frydrych <mfrydrych@nvidia.com>
Reviewed-on: http://git-master/r/138927
(cherry picked from commit 51b2af4e99bd5a881d5f3a6fd45315c76274925d)

Change-Id: I20d27f331cb7247bf5e2d19ac2df6896ef47ea69
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/146834
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
video tegra: dont use vi client when also using tegra V4L2
video tegra: add a function to release resources
video: tegra: nvmap: Add support for nvmap_kmap

Add support for mapping a single page from a buffer to kernel address
space.

Bug 1158533

Change-Id: Ie331e787663d98b644aa2e7f220020982f15fd9d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/145503
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: host: Map cmdbuf using nvmap_kmap

Use nvmap_kmap() instead of nvmap_mmap() to map individual pages from cmdbuf.

Bug 1158533

Change-Id: I76320d1373b0177debec76fe171f0b0c02fe35cd
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/145504
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: add the cmu interface

Conflicts:

	drivers/video/tegra/dc/dc_priv.h
Revert "video: tegra: remove irq_requested flags"

This reverts commit 69487a7c87c587a5cfc248c2e50c8ae8ee0dc3ce.