video: Squashed commits form P4

    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>

    Conflicts:

    	drivers/video/tegra/host/nvhost_syncpt.c
    	drivers/video/tegra/host/nvhost_syncpt.h

    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

    video: tegra: host: Improve timing of syncpt wait

    nvhost_syncpt_wait_timeout() relies on sync point interrupt to
    signal reaching the sync point value. With low timeout values, the
    resolution is not good enough and an error is returned even when
    the value is reached.

    Update syncpoint value from hardware when doing a sync point wait and
    do an explicit check for reaching the value even if wait returns a
    timeout.

    bug 984166
    bug 986788
    bug 987597

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

    Conflicts:

    	drivers/video/tegra/host/nvhost_syncpt.c

    -add sp to syncpt_op() in syncpt_update_min_is_expired

    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/106232
    Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>
    Tested-by: Prajakta Gudadhe <pgudadhe@nvidia.com>

Change-Id: I6883d3ce9507e7c65da47e17308d419bbde54f18