video: tegra: nvmap: Change function declaration order.

Change function declaration order to avoid multiple
CONFIG_TEGRA_NVMAP #ifdef's.

Change-Id: Icb10380f8da4b8037b90e787f961a28e8528814f
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/103990
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
video: tegra: nvmap: Clean up carveout to iovmm conversion.

Clean up carveout to iovmm conversion code.
Fixed bug in converting iovmm requests to carveout.

Change-Id: I35a5238c955d0478f0e1a295e501bae9ee52b0a8
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/103991
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
video: tegra: nvmap: Fix debug allocations data shown.

Debug allocations data for iovmm has carvout allocations
also and vice versa. Fixed it to show only iovmm for iovmm
and carveout for carveout.
Add missing "FLAGS" print for iovmm allocations.

Change-Id: I0fd271be24d0d2d3924ca473fd32476776fdcf84
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/104246
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
video: tegra: host: Merge waitchk and relocation

Job pinning and relocation already maps the gather buffers to
kernel memory. Move waitchk to be done at the same time so that we
do not need to re-map the memory to patch expired waits.

Bug 965206

Change-Id: I23634b501a45de080200e57d3debf267b39fea38
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/104415
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
video: tegra: host: Replace nvmap structs with own

Replace usage of nvmap_pinarray_elem with own nvhost_reloc and
nvhost_reloc_shift structs.

Bug 965206

Change-Id: I90618d8a34d79156d8880d9925dadbf416353811
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/104450
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
video: tegra: nvmap: Remove nvhost specific APIs

Remove nvmap_pin_array() and nvmap_patch_word() and their utility
functions.

Bug 965206

Change-Id: I217a427934b0b99b5252b33ab3ac4eaaa8c7e076
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/104451
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: host: Throttle lower priority jobs

Implement per channel counter for jobs in each priority level. If
there are jobs active with higher priority than the one being
submitted, throttle.

Bug 926690

Change-Id: I5fed341e3f248325873b31d1c53bf57bf0a78074
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/104939
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

Conflicts:

	drivers/video/tegra/host/bus_client.c
video: tegra: host: Dump sync queue in debug dump

Dump contents of sync queue when debug dump is requested, either
because of a stuck sync point, or when the debugfs entry is accessed.

Exclude FIFO from normal debugfs dump. Dumping FIFO is invasive and
actually changes how the channel behaves. It's safe to dump only when
system is in fault condition.

Change-Id: I12c68e8186acd7bd17e4ab52b2589f765396ed17
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/104970
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: host: Use correct units in default timeout

Convert the jiffies to msecs when assigning a channel the default
timeout.

Change-Id: If9b6fb7c695e9621a0c50d99d4d1362b6dd214b6
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/105022
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
video: tegra: host: Remove nvhost dsi driver

Remove nvhost dsi driver. Real dsi driver is in tegradc.

Bug 982965

Change-Id: I86044ba586d796ae8d049471a154dcf37bd0e6ed
Reviewed-on: http://git-master/r/104975
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: Config option for cache maint by set/ways.

Add config option to enable/disable cache maintenance by set/ways.

Change-Id: Ie795e19650b2c05cd4789dbc1e8f04f9edc70bf1
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/104290
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
video: tegra: host: Restrict register access

Register access (read/write) to modules MPE, ISP and VI lack sanity
check for the register number. Add checks to ensure only aperture is
accessed. Also make sure that the check accounts for wrapping of
values of offset and count.

Also fixes the register offset for reads which are done in multiple
blocks.

Bug 992938

Change-Id: I35f30cbd1dda31956286e48c5995b24fd262d1ae
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/105585
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
video: tegra: host: Remove error case panics

Remove BUG_ON()s in error cases:
* If IOCTL size is too large, return error instead
* If sync point id is out of range, return error. Prevents panics in
  sanity checks nvhost_cdma.

Bug 993642

Change-Id: I3cfa7a23dc557c811e20b726885f82666437de7f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/105866
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: nvmap: Use config option NVMAP_CACHE_MAINT_BY_SET_WAYS

Change-Id: I762929a0d72a0b26aa1451a946993f4a57806fd4
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/104292
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kaz Fukuoka <kfukuoka@nvidia.com>
Reviewed-by: Bo Yan <byan@nvidia.com>
Reviewed-by: Hiro Sugawara <hsugawara@nvidia.com>
GVS: Gerrit_Virtual_Submit
video: tegra: nvsd: Fix Phase In Issue with Aggressiveness

Change to correct behavior for changing settings while
phase_in_adjustments is set.  Manual K values should not be overridden
in the case where DIDIM was on and aggressiveness was changed.
They should maintain state to avoid flickering.

Bug 992995

Change-Id: Ic35c32a0fd5c6caaeee147dff114649ea25770c5
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Reviewed-on: http://git-master/r/105523
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
video: tegra: dc: Export dispay feature table.

Bug 992947

Change-Id: I0d1ecc9f8f042956cbe631779260a38573936616
Signed-off-by: Kevin Huang <kevinh@nvidia.com>
Reviewed-on: http://git-master/r/105776
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
video: tegra: dsi: remove build warnings

Added void to function prototypes and initialized some variables.

Change-Id: I69250f5e17560f900fffddec9697e496af6ad4d2
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/106073
Reviewed-by: Automatic_Commit_Validation_User
video: tegra: dc: remove tegra_dc_host_trigger

The function tegra_dc_host_trigger() is no longer used, removing it.

Change-Id: I929450bdf0224779910e8569bc8d1b3edb93f12d
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/106075
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
video: tegra: dc: fix unused variable warning

remove and rename unused variable in tega_dc_get_stride
Signed-off-by: Jon Mayo <jmayo@nvidia.com>

Change-Id: I0d101de22c08609f9727469ad7e4708de8de59ef
Reviewed-on: http://git-master/r/106072
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
video: tegra: dc: remove unused function

removed tegra_dc_hdmi_mode_equal.
It was replaced by tegra_dc_hdmi_cvt_mode_equal

Change-Id: I7988d02a1c0b91eed88fdf573d8c993b6ee7be8d
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/106074
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Shashank Sharma <shashanks@nvidia.com>
GVS: Gerrit_Virtual_Submit